/*
Theme Name: Árabe para Brasileiros
Theme URI: https://arabeparabrasileiros.com.br
Author: Yassine Elkhallouki
Description: Tema do site Árabe para Brasileiros: aulas de árabe em português, artigos, vídeos e loja de livros (WooCommerce).
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apb
*/

:root {
  --paper: #F4EFE4;
  --paper-2: #EBE4D4;
  --paper-3: #FFFDF7;
  --ink: #14213D;
  --ink-2: #3A4458;
  --muted: #5A6274;
  --green: #1F5C4A;
  --gold: #C99A3D;
  --gold-dark: #B8862B;
  --gold-light: #E2BE72;
  --line: #D6CCB6;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Work Sans', system-ui, sans-serif;
  --arabic: 'Amiri', 'Noto Naskh Arabic', serif;
  --calli: 'Aref Ruqaa', 'Amiri', serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
body.apb-large-text { font-size: 19px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ar { font-family: var(--arabic); direction: rtl; unicode-bidi: isolate; }
.calli { font-family: var(--calli); direction: rtl; unicode-bidi: isolate; }
.italic-note { font-family: var(--serif); font-style: italic; color: var(--green); font-size: 1.2em; }

/* buttons */
.btn, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: 16px 26px; border-radius: 3px;
  font: 500 16px var(--sans); border: 0; cursor: pointer; line-height: 1.2;
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--green); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--ink); color: #fff; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .calli { font-size: 34px; color: var(--green); line-height: 1; }
.brand-name { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 25px; }
.brand img { max-height: 52px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.main-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav a:hover { border-bottom-color: var(--gold-dark); }
.header-tools { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.text-size { background: none; border: 1px solid var(--line); border-radius: 3px; height: 40px; padding: 0 10px; font: 500 15px var(--sans); color: var(--ink); cursor: pointer; }
.header-tools .account { color: var(--ink); padding: 10px 12px; }
.header-tools .cart { color: #fff; background: var(--ink); text-decoration: none; padding: 11px 16px; border-radius: 3px; font-weight: 500; }

/* hero */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero-text { flex: 7 1 520px; min-width: 0; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -0.025em; margin: 18px 0 22px; }
.hero .lead { font-size: 19px; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 26px; }
.hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); margin-top: 34px; }
.hero-facts div { padding: 18px 18px 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.hero-facts div:first-child { padding-left: 0; }
.hero-facts div + div { border-left: 1px solid var(--line); }
.hero-facts strong { display: block; color: var(--ink); font-weight: 600; }
.word-panel { flex: 5 1 320px; max-width: 460px; margin: 0 auto; background: var(--green); color: var(--paper); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 22px; box-shadow: 14px 16px 0 var(--paper-2); }
.word-panel .top { display: flex; justify-content: space-between; font-size: 14px; color: #CFE0D8; }
.word-panel .big { font-size: clamp(84px, 14vw, 140px); line-height: 1.05; color: var(--gold-light); text-align: center; }
.word-panel .meaning { display: flex; justify-content: space-between; border-top: 1px solid rgba(244,239,228,.3); padding-top: 16px; }
.word-panel .meaning i { font-family: var(--serif); font-size: 22px; }
.letters4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; direction: rtl; }
.letters4 span { background: rgba(244,239,228,.1); padding: 10px 4px; display: flex; flex-direction: column; align-items: center; }
.letters4 b { font-family: var(--arabic); font-size: 28px; line-height: 1.2; }
.letters4 small { font-size: 12px; direction: ltr; color: #CFE0D8; }
.word-panel figcaption { font-size: 14px; color: #CFE0D8; line-height: 1.5; }

/* sections */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark a { color: var(--gold-light); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.section-head h2 { font-size: 34px; margin: 0; }
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > * { min-width: 0; }

/* featured lesson */
.feature { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.thumb-calli { position: relative; aspect-ratio: 16 / 10; background: var(--green); display: grid; place-items: center; text-decoration: none; flex: 1 1 460px; min-width: 0; }
.thumb-calli .calli { font-size: clamp(3rem, 7vw, 5.6rem); color: var(--paper); }
.thumb-calli img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-calli .play { position: absolute; left: 0; bottom: 0; background: var(--ink); color: #fff; padding: 14px 20px; font-size: 15px; }
.feature-text { flex: 1 1 400px; min-width: 0; }
.feature-text h2 { font-size: 40px; }

/* vocab */
.vocab { width: 100%; border-collapse: collapse; }
.vocab td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vocab td.pt { font-weight: 500; }
.vocab td.tr { color: var(--muted); font-style: italic; }
.vocab td.ar { font-size: 28px; font-weight: 700; text-align: right; white-space: nowrap; }

/* plan */
.plan { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); flex: 2 1 560px; }
.plan li { display: flex; gap: 24px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); }
.plan .n { font-family: var(--serif); font-size: 40px; color: var(--gold-dark); width: 56px; flex: 0 0 auto; }
.plan h3 { font-size: 25px; margin: 0 0 4px; }
.plan p { margin: 0; color: var(--ink-2); font-size: 16px; }
.plan .lvl { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }

/* lists of posts / lessons */
.row-link { display: flex; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row-link .tile { flex: 0 0 auto; width: 132px; height: 96px; background: var(--green); color: var(--paper); display: grid; place-items: center; overflow: hidden; }
.row-link .tile img { width: 100%; height: 100%; object-fit: cover; }
.row-link .tile .calli { font-size: 30px; }
.row-link .meta { font-size: 14px; color: var(--green); font-weight: 500; display: block; margin-bottom: 6px; }
.row-link .title { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.row-link:hover .title { text-decoration: underline; }

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.lesson-list .n { font-family: var(--serif); font-size: 30px; color: var(--gold-dark); width: 52px; }
.lesson-list .body { flex: 1 1 320px; min-width: 0; }
.lesson-list h3 { font-size: 24px; margin: 0 0 4px; }
.lesson-list h3 a { color: var(--ink); text-decoration: none; }
.lesson-list p { margin: 0; color: var(--ink-2); font-size: 15px; }
.lesson-list .dur { font-size: 15px; color: var(--muted); width: 110px; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs a { padding: 16px 24px 14px 0; margin-right: 24px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; font-size: 18px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* page headers */
.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 14px; }
.page-head p { font-size: 18px; color: var(--ink-2); max-width: 620px; }
.crumbs { font-size: 15px; color: var(--muted); padding-top: 28px; }

/* lesson single */
.lesson { display: flex; flex-wrap: wrap; gap: 56px; padding-bottom: 96px; }
.lesson article { flex: 999 1 640px; min-width: 0; }
.lesson aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); margin: 24px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .calli { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: clamp(3rem, 8vw, 6rem); }
.box { background: var(--paper-2); padding: 28px; }
.box h3 { font-size: 24px; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); margin-top: 32px; }

/* article */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.article h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -0.02em; }
.byline { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; font-size: 15px; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.entry { font-size: 18px; line-height: 1.75; color: #2B3448; }
.entry h2 { font-size: 30px; margin-top: 1.6em; color: var(--ink); }
.entry h3 { font-size: 24px; margin-top: 1.4em; color: var(--ink); }
.entry table { width: 100%; border-collapse: collapse; font-size: 17px; }
.entry th { text-align: left; border-bottom: 2px solid var(--ink); padding: 12px 8px; }
.entry td { border-bottom: 1px solid var(--line); padding: 12px 8px; }
.entry blockquote { margin: 1.5em 0; padding: 0 0 0 20px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 22px; }
.entry :lang(ar), .entry [dir=rtl] { font-family: var(--arabic); font-size: 1.3em; }

/* store home */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px; }
.book { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; }
.book .cover { aspect-ratio: 2 / 3; background: var(--paper-2); box-shadow: 10px 12px 0 rgba(0,0,0,.2); overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .info { display: flex; justify-content: space-between; gap: 12px; }

/* footer */
.site-footer { background: var(--ink); color: #C8CEDA; }
.site-footer a { color: #C8CEDA; }
.footer-top { display: flex; flex-wrap: wrap; gap: 48px; padding: 64px 0 40px; border-bottom: 1px solid #2A3A5C; }
.footer-top > * { flex: 1 1 160px; }
.footer-top .lead { flex: 2 1 380px; font-family: var(--serif); font-size: 28px; color: #fff; line-height: 1.25; }
.footer-top h4 { font-family: var(--sans); color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0 30px; font-size: 14px; }
.footer-bottom .calli { font-size: 26px; color: var(--gold); }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; align-items: center; gap: 10px; background: var(--green); color: #fff !important; text-decoration: none; padding: 14px 18px; border-radius: 3px; box-shadow: 0 10px 26px rgba(20,33,61,.35); font-weight: 500; font-size: 15px; }
.wa-float svg { width: 22px; height: 22px; }

/* forms */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], select, textarea {
  font: 400 16px var(--sans); padding: 12px 14px; border: 1px solid #A99C7E; border-radius: 3px; background: var(--paper-3); color: var(--ink); max-width: 100%;
}

/* WooCommerce */
.woocommerce .wrap-shop { padding: 48px 24px 88px; }
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 40px 32px; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.woocommerce ul.products li.product img { box-shadow: 10px 12px 0 rgba(20,33,61,.12); margin-bottom: 16px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--serif); font-weight: 400; font-size: 21px !important; color: var(--ink); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink) !important; font-weight: 600; }
.woocommerce div.product .product_title { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.woocommerce span.onsale { background: var(--gold); color: var(--ink); border-radius: 3px; min-height: 0; line-height: 1; padding: 8px 10px; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--green) !important; background: var(--paper-3) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--green) !important; }
.woocommerce table.shop_table { border-radius: 0; background: var(--paper-3); }

@media (max-width: 720px) {
  .hero-facts div + div { border-left: 0; }
  .hero-facts div { padding-left: 0; }
  .plan .lvl { display: none; }
  .row-link .tile { width: 96px; height: 72px; }
  .section { padding: 64px 0; }
  .wa-float span { display: none; }
}

/* lesson cards (home) */
.lesson-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin-top: 24px; }
.lesson-card { background: var(--paper-3); border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.lesson-card .lc-art { background: var(--green); color: var(--paper); height: 150px; display: grid; place-items: center; font-size: 46px; }
.lesson-card.soon .lc-art { background: var(--paper-2); color: var(--muted); }
.lesson-card .lc-meta { font-size: 14px; color: var(--green); font-weight: 500; padding: 18px 20px 0; }
.lesson-card .lc-title { font-family: var(--serif); font-size: 23px; line-height: 1.2; padding: 6px 20px 0; }
.lesson-card .lc-cta { padding: 16px 20px 20px; font-size: 15px; color: var(--ink-2); margin-top: auto; }
.lesson-card:hover .lc-title { text-decoration: underline; }
.book-teaser { flex: 0 0 240px; aspect-ratio: 2 / 3; background: var(--paper); color: var(--ink); border-left: 10px solid var(--gold); padding: 26px 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 12px 14px 0 rgba(0,0,0,.25); }
.book-teaser .calli { font-size: 64px; color: var(--green); text-align: right; }
.book-teaser strong { font-family: var(--serif); font-size: 30px; line-height: 1.05; font-weight: 600; }
.book-teaser small { font-size: 13px; }

/* quiz */
.quiz { background: var(--paper-2); padding: 32px; margin-top: 40px; }
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.quiz-head h2 { font-size: 30px; margin: 0; }
.quiz-count { font-size: 15px; color: var(--muted); }
.quiz-q { font-size: 20px; margin: 16px 0; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opts button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 16px 18px; font: 400 17px var(--sans); color: var(--ink); cursor: pointer; }
.quiz-opts button.ar-opt { text-align: right; font-family: var(--arabic); font-size: 24px; direction: rtl; }
.quiz-opts button:hover:not([disabled]) { border-color: var(--ink); }
.quiz-opts button.right { background: #DDEBE4; border-color: var(--green); }
.quiz-opts button.wrong { background: #F3DCD6; border-color: #A33B2B; }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; min-height: 52px; }
.quiz-feedback { font-weight: 500; }
.quiz-feedback.ok { color: var(--green); } .quiz-feedback.no { color: #A33B2B; }
.done-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 32px; }
.done-bar button[aria-pressed=true] { background: var(--green); color: #fff; box-shadow: none; }

.brand .apb-mark { flex: 0 0 auto; }
.brand-name i { color: var(--green); }

/* aulas particulares */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.plan-card { background: var(--paper-3); border: 1px solid var(--line); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.plan-card h3 { font-size: 26px; margin: 0; }
.plan-card .price { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.plan-card .desc { color: var(--ink-2); font-size: 16px; }
.plan-card .btn { margin-top: auto; text-align: center; }
.steps4 { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; color: var(--ink-2); }
.faq details { border-top: 1px solid #A99C7E; padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid #A99C7E; }
.faq summary { font-weight: 500; font-size: 17px; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
