/*
Theme Name: TaleshiMath
Theme URI: https://taleshimath.com
Author: Maryam Taleshi
Author URI: https://taleshimath.com
Description: قالب تدریس خصوصی ریاضی طالشی مث — سئو محلی کرج
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taleshimath
Tags: rtl-language, right-to-left, education, local-business
*/

/* ==========================================================
   1. TOKENS
========================================================== */
:root {
  --g1:#083520; --g2:#0F4A2D; --g3:#1A6640; --g4:#28855A;
  --g-pale:#EBF7EF; --g-soft:#F2FAF5;
  --gold:#C8943A; --gold2:#E4AE4A;
  --gold-p:#FEF7E7; --gold-s:#FFF4CC;
  --cream:#FEFCF7; --bg:#F5F2EB; --white:#FFFFFF;
  --ink:#0F1923; --ink2:#2D3748; --ink3:#718096; --ink4:#A0AEC0;
  --brd:rgba(200,148,58,.16); --brd2:rgba(0,0,0,.07);
  --ff:'Vazirmatn',system-ui,sans-serif;
  --fw5:500; --fw6:600; --fw7:700; --fw9:900;
  --r-sm:10px; --r-md:16px; --r-lg:22px; --r-xl:32px; --r-full:9999px;
  --sh1:0 2px 8px rgba(0,0,0,.06);
  --sh2:0 6px 24px rgba(0,0,0,.10);
  --sh3:0 16px 48px rgba(0,0,0,.14);
  --sh-g:0 8px 28px rgba(8,53,32,.38);
  --sh-o:0 8px 28px rgba(200,148,58,.32);
  --ease:cubic-bezier(.4,0,.2,1);
  --cw:1160px;
}

/* ==========================================================
   2. RESET & BASE
========================================================== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;direction:rtl;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:var(--ff);font-size:15px;line-height:1.7;
  color:var(--ink);background:var(--bg);
  direction:rtl;text-align:right;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--g3);text-decoration:none;transition:color .2s var(--ease)}
a:hover{color:var(--gold)}
ul,ol{list-style:none}
button,input,select,textarea{font-family:var(--ff)}

/* Skip link */
.skip-link{
  position:absolute;top:-100px;right:20px;z-index:9999;
  background:var(--g1);color:#fff;padding:12px 20px;
  border-radius:0 0 var(--r-md) var(--r-md);
  font-weight:var(--fw6);font-size:14px;
  transition:top .2s;
}
.skip-link:focus{top:0}
.screen-reader-text{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;white-space:nowrap}
.visually-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;white-space:nowrap}

/* ==========================================================
   3. LAYOUT
========================================================== */
.container{max-width:var(--cw);margin:0 auto;padding:0 24px}
.site-wrapper{display:flex;flex-direction:column;min-height:100vh}
main{flex:1}
.section-pad{padding:80px 0}
.section-pad-sm{padding:56px 0}

/* ==========================================================
   4. TYPOGRAPHY
========================================================== */
h1,h2,h3,h4,h5,h6{font-weight:var(--fw7);line-height:1.2;color:var(--ink)}
p{color:var(--ink2);margin-bottom:12px}

/* ==========================================================
   5. FOCUS (WCAG 2.1 AA)
========================================================== */
:focus-visible{outline:3px solid var(--gold);outline-offset:3px;border-radius:4px}

/* ==========================================================
   6. BUTTONS
========================================================== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 28px;border-radius:var(--r-full);
  font-weight:var(--fw6);font-size:15px;
  cursor:pointer;border:none;white-space:nowrap;
  font-family:var(--ff);transition:all .2s var(--ease);
  text-decoration:none;
  /* WCAG touch target */
  min-height:44px;
}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important}
.btn-primary{
  background:linear-gradient(135deg,var(--g2),var(--g1));
  color:#fff;box-shadow:var(--sh-g);
}
.btn-primary:hover{filter:brightness(1.12);color:#fff;transform:translateY(-2px)}
.btn-gold{
  background:linear-gradient(135deg,var(--gold),var(--gold2));
  color:var(--g1);font-weight:var(--fw7);box-shadow:var(--sh-o);
}
.btn-gold:hover{filter:brightness(1.08);color:var(--g1);transform:translateY(-2px)}
.btn-outline{background:transparent;border:2px solid var(--g3);color:var(--g3)}
.btn-outline:hover{background:var(--g3);color:#fff}
.btn-ghost-white{
  background:rgba(255,255,255,.12);
  border:1.5px solid rgba(255,255,255,.55);
  color:#fff;backdrop-filter:blur(4px);
}
.btn-ghost-white:hover{background:rgba(255,255,255,.22);color:#fff}
.btn-lg{padding:14px 34px;font-size:16px;font-weight:var(--fw7)}
.btn-sm{padding:10px 18px;font-size:13px;min-height:44px} /* Fix WCAG 2.2 touch target */
.btn-block{width:100%;justify-content:center}

/* ==========================================================
   7. SECTION HEADER
========================================================== */
.section-header{text-align:center;margin-bottom:52px}
.section-tag{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--gold-p);color:var(--gold);
  border:1px solid rgba(200,148,58,.25);
  padding:6px 18px;border-radius:var(--r-full);
  font-size:13px;font-weight:var(--fw6);margin-bottom:12px;
}
.section-title{
  font-size:2.2rem;font-weight:var(--fw9);
  color:var(--ink);margin-bottom:12px;line-height:1.2;
}
.section-title .hl{color:var(--g3)}
.section-desc{font-size:15px;color:var(--ink3);max-width:540px;margin:0 auto;line-height:1.7}

/* ==========================================================
   8. ANNOUNCEMENT BAR
========================================================== */
.announcement-bar{
  background:linear-gradient(90deg,var(--g1),var(--g2));
  color:#fff;text-align:center;padding:10px 24px;
  font-size:13px;font-weight:var(--fw5);position:relative;
  overflow:hidden;
}
.announcement-bar a{color:var(--gold2);text-decoration:underline}
.ann-close{
  position:absolute;top:50%;left:16px;transform:translateY(-50%);
  background:rgba(255,255,255,.15);border:none;color:#fff;cursor:pointer;
  width:28px;height:28px;border-radius:50%;font-size:16px;line-height:1;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s;min-height:28px;
}
.ann-close:hover{background:rgba(255,255,255,.28)}

/* ==========================================================
   9. HEADER
========================================================== */
.site-header{
  position:sticky;top:0;z-index:900;
  background:rgba(254,252,247,.96);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--brd2);
  box-shadow:0 2px 16px rgba(0,0,0,.06);
}
.header-inner{
  display:flex;align-items:center;
  justify-content:space-between;
  height:68px;gap:16px;
}
.site-branding{
  display:flex;align-items:center;gap:10px;
  text-decoration:none;flex-shrink:0;
}
.logo-img{height:46px;width:auto;object-fit:contain}
.site-name{font-weight:var(--fw9);font-size:17px;color:var(--g1);display:block;line-height:1.2}
.site-sub{font-size:11px;color:var(--ink4);display:block}

/* Nav desktop */
.nav-wrapper{display:flex;align-items:center}
.nav-menu{display:flex;align-items:center;gap:2px}
.nav-menu li a{
  display:flex;align-items:center;
  padding:8px 14px;border-radius:var(--r-sm);
  font-size:14px;font-weight:var(--fw5);color:var(--ink2);
  transition:all .2s;min-height:44px;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a{color:var(--g3);background:rgba(8,53,32,.07)}

.header-actions{display:flex;align-items:center;gap:12px}
.header-phone{
  display:flex;align-items:center;gap:6px;
  font-weight:var(--fw6);color:var(--g2);font-size:14px;
  direction:ltr;min-height:44px;
}
/* Hamburger */
.hamburger{
  display:none;background:none;border:none;
  cursor:pointer;padding:8px;flex-direction:column;
  gap:5px;min-width:44px;min-height:44px;
  align-items:center;justify-content:center;
}
.hamburger span{
  display:block;width:22px;height:2px;
  background:var(--ink);border-radius:2px;
  transition:all .2s var(--ease);
}
.hamburger.active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.active span:nth-child(2){opacity:0}
.hamburger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ==========================================================
   10. READING PROGRESS
========================================================== */
.reading-progress{
  position:fixed;top:0;right:0;left:0;z-index:9999;
  height:3px;background:rgba(0,0,0,.06);
}
.reading-progress-bar{
  height:100%;width:0;
  background:linear-gradient(90deg,var(--g3),var(--gold));
  transition:width .1s linear;
}

/* ==========================================================
   11. BREADCRUMB
========================================================== */
.breadcrumb-nav{background:var(--white);border-bottom:1px solid var(--brd2)}
.breadcrumb-inner{max-width:var(--cw);margin:0 auto;padding:10px 24px}
.breadcrumb-list{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.breadcrumb-item{font-size:13px;color:var(--ink4)}
.breadcrumb-item+.breadcrumb-item::before{content:"›";margin-left:8px}
.breadcrumb-item a{color:var(--g3)}
.breadcrumb-item span{color:var(--ink3)}

/* ==========================================================
   12. HERO SECTION
========================================================== */
.hero-section{
  background:var(--g1);
  padding:96px 0 104px;
  position:relative;overflow:hidden;
}
/* لایه گرادیان */
.hero-section::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(ellipse 70% 80% at 10% 50%, rgba(26,102,64,.6) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 90% 40%, rgba(200,148,58,.18) 0%, transparent 60%);
}
/* اشکال تزئینی */
.hero-deco{position:absolute;pointer-events:none;border-radius:50%}
.hero-deco-1{
  width:480px;height:480px;
  border:1px solid rgba(255,255,255,.05);
  top:-200px;right:-120px;
}
.hero-deco-2{
  width:240px;height:240px;
  border:1px solid rgba(200,148,58,.1);
  bottom:-80px;left:-60px;
}

/* Grid دو ستون دسکتاپ */
.hero-grid{
  display:grid;
  grid-template-columns:1fr 380px;
  gap:56px;align-items:center;
  position:relative;z-index:1;
}
.hero-content{color:#fff}

.hero-badge{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(200,148,58,.15);
  border:1px solid rgba(200,148,58,.4);
  color:var(--gold2);
  padding:7px 18px;border-radius:var(--r-full);
  font-size:13px;font-weight:var(--fw6);
  margin-bottom:20px;
}
.hero-title{
  font-size:3rem;font-weight:var(--fw9);
  color:#fff;line-height:1.18;margin-bottom:16px;
}
.hero-title .hl{
  color:var(--gold2);
  background:linear-gradient(135deg,var(--gold),var(--gold2));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
}
.hero-grades{
  display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;
}
.grade-chip{
  padding:6px 16px;border-radius:var(--r-full);
  font-size:13px;font-weight:var(--fw5);
  background:rgba(255,255,255,.1);color:rgba(255,255,255,.9);
  border:1px solid rgba(255,255,255,.18);
  transition:all .2s;
}
.grade-chip:hover{background:var(--gold);color:var(--g1);border-color:var(--gold)}
.hero-desc{
  font-size:16px;color:rgba(255,255,255,.82);
  line-height:1.75;margin-bottom:28px;
}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:40px}
/* آمار */
.hero-stats{
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
}
.hero-stat{
  text-align:center;padding:16px 8px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--r-md);
}
.hero-stat .num{
  font-size:1.6rem;font-weight:var(--fw9);
  color:var(--gold2);display:block;line-height:1;
}
.hero-stat .lbl{
  font-size:11px;color:rgba(255,255,255,.6);
  margin-top:4px;display:block;
}

/* کارت معلم */
.hero-card{
  background:var(--white);border-radius:var(--r-xl);
  padding:32px 28px;
  box-shadow:0 24px 64px rgba(0,0,0,.22);
  position:relative;z-index:1;
}
.teacher-img-wrap{
  width:110px;height:110px;border-radius:50%;
  overflow:hidden;margin:0 auto 14px;
  border:3px solid var(--gold);
  box-shadow:0 0 0 6px rgba(200,148,58,.15);
  background:var(--gold-p);
  display:flex;align-items:center;justify-content:center;
}
.teacher-img-wrap img{width:100%;height:100%;object-fit:cover}
.teacher-name{
  font-size:1.2rem;font-weight:var(--fw9);
  color:var(--g1);text-align:center;margin-bottom:4px;
}
.teacher-title{font-size:12px;color:var(--ink3);text-align:center;margin-bottom:18px}
.card-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.card-stat{
  text-align:center;padding:10px 6px;
  background:var(--g-soft);border-radius:var(--r-sm);
  border:1px solid rgba(26,102,64,.12);
}
.card-stat .num{font-size:14px;font-weight:var(--fw9);color:var(--g1)}
.card-stat .lbl{font-size:10px;color:var(--ink3);margin-top:2px;display:block}
.card-guarantee{
  margin-top:14px;padding:10px 12px;
  background:var(--gold-s);border:1px solid rgba(200,148,58,.25);
  border-radius:var(--r-sm);
  text-align:center;font-size:12px;font-weight:var(--fw6);color:var(--g1);
}

/* ==========================================================
   13. SERVICES
========================================================== */
.services-section{background:var(--bg);position:relative}
.services-section::before{
  content:'';position:absolute;top:0;left:0;right:0;height:4px;
  background:linear-gradient(90deg,var(--g1),var(--g4),var(--gold));
}
.filter-tabs{
  display:flex;gap:8px;flex-wrap:wrap;
  justify-content:center;margin-bottom:40px;
}
.filter-tab{
  padding:9px 22px;border-radius:var(--r-full);
  font-size:13px;font-weight:var(--fw6);
  background:var(--white);border:1.5px solid var(--brd);
  cursor:pointer;color:var(--ink2);font-family:var(--ff);
  transition:all .2s;min-height:40px;
}
.filter-tab.active,.filter-tab:hover{
  background:var(--g1);color:#fff;border-color:var(--g1);
  box-shadow:var(--sh-g);
}
.services-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:22px;
}
.service-card{
  background:var(--white);border-radius:var(--r-lg);
  overflow:hidden;box-shadow:var(--sh1);
  border:1px solid var(--brd2);
  display:flex;flex-direction:column;
  transition:all .25s var(--ease);
  position:relative;
}
.service-card:hover{box-shadow:var(--sh2);transform:translateY(-5px)}
/* خط رنگی بالا */
.service-card::before{
  content:'';position:absolute;top:0;left:0;right:0;
  height:3px;transition:height .2s;
}
.service-card[data-color="grad-1"]::before{background:linear-gradient(90deg,#1A6640,#28855A)}
.service-card[data-color="grad-2"]::before{background:linear-gradient(90deg,#C8943A,#E4AE4A)}
.service-card[data-color="grad-3"]::before{background:linear-gradient(90deg,#4F46E5,#818CF8)}
.service-card[data-color="grad-4"]::before{background:linear-gradient(90deg,#DC2626,#F87171)}
.service-card[data-color="grad-5"]::before{background:linear-gradient(90deg,#0891B2,#38BDF8)}
.service-card[data-color="grad-6"]::before{background:linear-gradient(90deg,#7C3AED,#A78BFA)}
.service-card:hover::before{height:5px}

.service-card-header{padding:24px 22px 18px;text-align:center;position:relative}
.service-card[data-color="grad-1"] .service-card-header{background:linear-gradient(160deg,#EBF7EF,#D4EDDC)}
.service-card[data-color="grad-2"] .service-card-header{background:linear-gradient(160deg,#FEF7E7,#FEEFB4)}
.service-card[data-color="grad-3"] .service-card-header{background:linear-gradient(160deg,#EEF2FF,#DDE5FF)}
.service-card[data-color="grad-4"] .service-card-header{background:linear-gradient(160deg,#FEF2F2,#FEE2E2)}
.service-card[data-color="grad-5"] .service-card-header{background:linear-gradient(160deg,#F0F9FF,#BAE6FD)}
.service-card[data-color="grad-6"] .service-card-header{background:linear-gradient(160deg,#F5F3FF,#EDE9FE)}

.service-emoji{font-size:48px;line-height:1;display:block;margin-bottom:8px}
.service-type-badge{
  position:absolute;top:10px;right:10px;
  padding:3px 10px;border-radius:var(--r-full);
  font-size:11px;font-weight:var(--fw6);
}
.badge-private{background:rgba(26,102,64,.1);color:var(--g3)}
.badge-group  {background:rgba(200,148,58,.14);color:var(--gold)}
.badge-online {background:rgba(8,145,178,.1);color:#0369A1}

.service-card-body{padding:18px 22px 14px;flex:1;display:flex;flex-direction:column}
.service-title{font-size:15px;font-weight:var(--fw7);color:var(--ink);margin-bottom:8px;line-height:1.4}
.service-desc{font-size:13px;color:var(--ink3);flex:1;line-height:1.65;margin-bottom:12px}
.service-meta{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.service-meta span{font-size:12px;color:var(--ink3)}

.service-footer{
  border-top:1px solid var(--brd2);padding:12px 22px;
  display:flex;align-items:center;justify-content:space-between;
}
.service-price{font-size:15px;font-weight:var(--fw9);color:var(--g1)}
.services-cta-wrap{text-align:center;margin-top:44px}
.services-quality{margin-top:12px;font-size:13px;color:var(--ink3)}

/* ==========================================================
   14. ABOUT
========================================================== */
.about-section{background:var(--cream)}
.about-grid{
  display:grid;grid-template-columns:1fr 1fr;
  gap:64px;align-items:center;
}
.about-img-wrap{
  position:relative;border-radius:var(--r-xl);
  overflow:hidden;aspect-ratio:4/5;
  box-shadow:var(--sh3);
}
.about-img-wrap img{
  width:100%;height:100%;
  object-fit:cover;position:absolute;inset:0;
}
.about-img-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(8,53,32,.5) 0%,transparent 55%);
}
.about-float{
  position:absolute;background:var(--white);
  border-radius:var(--r-md);padding:11px 16px;
  box-shadow:var(--sh2);
  display:flex;align-items:center;gap:8px;
  font-size:13px;font-weight:var(--fw6);color:var(--ink);
}
.about-float-1{top:20px;left:-16px}
.about-float-2{bottom:28px;right:-16px}

.about-creds{margin:20px 0 24px;display:flex;flex-direction:column;gap:10px}
.about-cred{
  display:flex;align-items:flex-start;gap:14px;
  padding:12px 16px;background:var(--white);
  border-radius:var(--r-md);border-right:3px solid var(--g3);
  box-shadow:var(--sh1);transition:box-shadow .2s;
}
.about-cred:hover{box-shadow:var(--sh2)}
.about-cred-icon{
  width:40px;height:40px;border-radius:50%;
  background:var(--g-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:19px;flex-shrink:0;
}
.about-cred-title{font-weight:var(--fw6);color:var(--ink);font-size:14px}
.about-cred-desc{font-size:12px;color:var(--ink3);margin-top:2px}
.about-actions{display:flex;gap:12px;flex-wrap:wrap}

/* ==========================================================
   15. VIDEOS
========================================================== */
.videos-section{background:var(--bg)}
.videos-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.video-card{
  background:var(--white);border-radius:var(--r-lg);
  overflow:hidden;box-shadow:var(--sh1);
  border:1px solid var(--brd2);
  transition:all .25s;
}
.video-card:hover{box-shadow:var(--sh2);transform:translateY(-4px)}
.video-thumb{
  position:relative;aspect-ratio:16/9;
  background:var(--g1);overflow:hidden;
}
.video-thumb iframe{width:100%;height:100%;border:none}
.video-placeholder{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:8px;
  height:100%;min-height:160px;
  background:linear-gradient(160deg,var(--g1),var(--g2));
  color:rgba(255,255,255,.4);
}
.video-placeholder .icon{font-size:36px;opacity:.4}
.video-placeholder p{font-size:11px;text-align:center;padding:0 16px;line-height:1.5}
.video-body{padding:14px 16px}
.video-title{font-size:14px;font-weight:var(--fw6);color:var(--ink);margin-bottom:4px}
.video-desc{font-size:12px;color:var(--ink3)}

/* ==========================================================
   16. REVIEWS
========================================================== */
.reviews-section{background:var(--white)}
.aggregate-rating-box{
  display:flex;flex-direction:column;align-items:center;
  background:linear-gradient(135deg,var(--g1),var(--g2));
  border-radius:var(--r-xl);
  padding:48px;margin-bottom:48px;
  text-align:center;box-shadow:var(--sh-g);
  position:relative;overflow:hidden;
}
.aggregate-rating-box::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(circle at 75% 25%,rgba(200,148,58,.2),transparent 55%);
  pointer-events:none;
}
.aggregate-rating-box .big-rating{
  font-size:5rem;font-weight:var(--fw9);
  color:var(--gold2);line-height:1;position:relative;
}
.aggregate-rating-box .rating-stars{
  font-size:2rem;color:var(--gold2);margin:8px 0;position:relative;
}
.aggregate-rating-box .rating-label{
  font-size:14px;color:rgba(255,255,255,.8);position:relative;
}
.reviews-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.review-card{
  background:var(--white);border-radius:var(--r-lg);
  padding:24px;box-shadow:var(--sh1);
  border:1px solid var(--brd2);
  position:relative;overflow:hidden;
  transition:all .25s;
}
.review-card::before{
  content:'"';position:absolute;top:-8px;left:14px;
  font-size:80px;color:var(--g-pale);
  font-family:Georgia,serif;line-height:1;pointer-events:none;
}
.review-card:hover{box-shadow:var(--sh2);transform:translateY(-4px)}
.review-card:nth-child(3n+1){border-top:3px solid var(--g3)}
.review-card:nth-child(3n+2){border-top:3px solid var(--gold)}
.review-card:nth-child(3n+3){border-top:3px solid var(--g4)}
.review-stars{font-size:14px;color:var(--gold);margin-bottom:10px;position:relative;z-index:1}
.review-text{font-size:14px;color:var(--ink2);line-height:1.75;margin-bottom:14px;position:relative;z-index:1}
.reviewer-info{position:relative;z-index:1}
.reviewer-name{font-weight:var(--fw6);color:var(--ink);font-size:14px}
.reviewer-meta{font-size:12px;color:var(--ink3);margin-top:2px}

/* ==========================================================
   17. FAQ
========================================================== */
.faq-section{background:var(--bg)}
.faq-grid{display:grid;grid-template-columns:1fr 320px;gap:48px;align-items:start}
.faq-list{display:flex;flex-direction:column;gap:8px}
.faq-item{
  background:var(--white);border-radius:var(--r-md);
  border:1px solid var(--brd2);overflow:hidden;
  transition:box-shadow .2s;
}
.faq-item.open{box-shadow:var(--sh1);border-color:rgba(26,102,64,.18)}
.faq-question{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;cursor:pointer;
  font-weight:var(--fw6);color:var(--ink);
  gap:12px;user-select:none;
  transition:color .2s;min-height:52px;
}
.faq-question:hover{color:var(--g3)}
.faq-icon{
  width:30px;height:30px;border-radius:50%;flex-shrink:0;
  background:var(--g-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;line-height:1;
  transition:all .2s;color:var(--g3);
  border:1.5px solid rgba(26,102,64,.14);
}
.faq-item.open .faq-icon{background:var(--g3);color:#fff;border-color:var(--g3);transform:rotate(45deg)}
.faq-answer{
  display:none;
  padding:0 20px 16px;font-size:14px;
  color:var(--ink2);line-height:1.75;
  border-top:1px solid var(--brd2);
}
.faq-item.open .faq-answer{display:block;padding:14px 20px 16px}

.faq-contact-box{
  background:linear-gradient(160deg,var(--g1),#0a3822);
  border-radius:var(--r-xl);padding:32px 28px;
  color:#fff;text-align:center;
  position:sticky;top:88px;
  box-shadow:var(--sh-g);overflow:hidden;
}
.faq-contact-box::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(circle at 80% 20%,rgba(200,148,58,.2),transparent 55%);
  pointer-events:none;
}
.faq-contact-box h3{color:#fff;font-size:1.3rem;margin-bottom:8px;position:relative}
.faq-contact-box p{color:rgba(255,255,255,.72);margin-bottom:18px;font-size:14px;position:relative}
.faq-contact-phone{
  font-size:1.7rem;font-weight:var(--fw9);
  color:var(--gold2);direction:ltr;
  margin-bottom:18px;position:relative;
}
.faq-cta-wrap{display:flex;flex-direction:column;gap:10px;position:relative}

/* ==========================================================
   18. CTA BANNER
========================================================== */
.cta-banner{
  background:linear-gradient(135deg,var(--g1),#071e12);
  padding:72px 0;text-align:center;
  position:relative;overflow:hidden;
}
.cta-banner::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(circle 500px at 80% 50%,rgba(200,148,58,.16),transparent 60%);
  pointer-events:none;
}
.cta-inner{position:relative;z-index:1}
.cta-tag{
  display:inline-block;
  background:rgba(200,148,58,.15);border:1px solid rgba(200,148,58,.35);
  color:var(--gold2);padding:6px 18px;border-radius:var(--r-full);
  font-size:13px;font-weight:var(--fw6);margin-bottom:16px;
}
.cta-title{font-size:2.2rem;font-weight:var(--fw9);color:#fff;margin-bottom:12px}
.cta-desc{color:rgba(255,255,255,.7);max-width:460px;margin:0 auto 28px;font-size:15px;line-height:1.7}
.cta-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}

/* ==========================================================
   19. BLOG
========================================================== */
.blog-section{background:var(--cream)}
.blog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.blog-card{
  background:var(--white);border-radius:var(--r-lg);
  overflow:hidden;box-shadow:var(--sh1);
  border:1px solid var(--brd2);
  transition:all .25s;
}
.blog-card:hover{box-shadow:var(--sh2);transform:translateY(-4px)}
.blog-thumb{aspect-ratio:16/9;overflow:hidden;background:var(--g-soft)}
.blog-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.blog-card:hover .blog-thumb img{transform:scale(1.05)}
.blog-body{padding:18px 18px 20px}
.blog-meta{display:flex;gap:12px;align-items:center;margin-bottom:8px;font-size:12px;color:var(--ink4)}
.blog-title{font-size:15px;font-weight:var(--fw7);color:var(--ink);line-height:1.4;margin-bottom:6px}
.blog-title a{color:inherit}
.blog-title a:hover{color:var(--g3)}
.blog-excerpt{font-size:13px;color:var(--ink3);line-height:1.6}
.blog-empty{text-align:center;padding:80px 20px}
.blog-empty h3{color:var(--ink3);margin-bottom:10px}

/* ==========================================================
   20. CONTACT
========================================================== */
.contact-section{background:var(--bg)}
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px}
.contact-info-list{display:flex;flex-direction:column;gap:12px;margin-bottom:28px}
.contact-info-item{
  display:flex;align-items:flex-start;gap:14px;
  padding:14px 16px;background:var(--white);
  border-radius:var(--r-md);
  box-shadow:var(--sh1);
  border-right:3px solid var(--g4);
  transition:box-shadow .2s;
}
.contact-info-item:hover{box-shadow:var(--sh2)}
.contact-info-icon{
  width:44px;height:44px;border-radius:50%;
  background:var(--g-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:20px;flex-shrink:0;
}
.contact-info-label{font-size:11px;color:var(--ink4);font-weight:var(--fw5)}
.contact-info-value{font-size:15px;color:var(--ink);font-weight:var(--fw6);margin-top:2px}
.contact-info-value a{color:var(--g3)}
.areas-grid{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.area-chip{
  padding:4px 12px;border-radius:var(--r-full);
  background:var(--g-soft);border:1px solid rgba(26,102,64,.14);
  font-size:12px;color:var(--g3);font-weight:var(--fw5);
}

.contact-form-wrap{
  background:var(--white);border-radius:var(--r-xl);
  padding:36px 32px;
  box-shadow:var(--sh2);border:1px solid var(--brd2);
}
.contact-form-title{
  font-size:1.2rem;font-weight:var(--fw7);color:var(--g1);
  margin-bottom:22px;padding-bottom:14px;
  border-bottom:2px solid var(--gold-p);
}

/* ==========================================================
   21. FORM
========================================================== */
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-group{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.form-label{font-size:13px;font-weight:var(--fw6);color:var(--ink2)}
.form-control{
  width:100%;padding:11px 13px;
  border:1.5px solid var(--brd);border-radius:var(--r-sm);
  font-size:15px;font-family:var(--ff);color:var(--ink);
  background:var(--bg);transition:all .2s;direction:rtl;
  min-height:44px;
}
.form-control:focus{
  outline:none;border-color:var(--g3);background:var(--white);
  box-shadow:0 0 0 3px rgba(26,102,64,.1);
}
.form-control::placeholder{color:var(--ink4)}
textarea.form-control{resize:vertical;min-height:88px}
select.form-control{cursor:pointer}

/* ==========================================================
   22. FOOTER
========================================================== */
.site-footer{
  background:var(--g1);
  color:rgba(255,255,255,.68);
  padding:64px 0 0;
}
.footer-grid{
  display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;
  gap:36px;margin-bottom:48px;
}
.footer-brand .site-name{color:var(--white)}
.footer-brand .site-sub{color:rgba(255,255,255,.38)}
.footer-brand-desc{
  font-size:13px;color:rgba(255,255,255,.5);
  line-height:1.7;margin:14px 0 16px;
}
.footer-social{display:flex;gap:8px;flex-wrap:wrap}
.social-link{
  width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);
  display:flex;align-items:center;justify-content:center;
  font-size:16px;text-decoration:none;
  transition:all .2s;min-height:38px;
}
.social-link:hover{background:var(--g4);border-color:var(--g4);transform:translateY(-2px)}
.footer-col h4{
  font-size:12px;font-weight:var(--fw7);color:var(--white);
  margin-bottom:12px;letter-spacing:.08em;text-transform:uppercase;
}
.footer-col ul li{margin-bottom:8px}
.footer-col ul li a{font-size:13px;color:rgba(255,255,255,.48);transition:color .2s}
.footer-col ul li a:hover{color:var(--gold2)}
.footer-contact-item{
  display:flex;align-items:center;gap:10px;
  margin-bottom:10px;font-size:13px;color:rgba(255,255,255,.56);
}
.footer-contact-item a{color:var(--gold2)}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.07);
  padding:16px 0;text-align:center;
  font-size:12px;color:rgba(255,255,255,.3);
}
.footer-seo-text{font-size:10px;color:rgba(255,255,255,.15);margin-top:5px}

/* ==========================================================
   23. FAB
========================================================== */
.fab-area{position:fixed;bottom:24px;left:24px;z-index:800;display:flex;flex-direction:column;gap:10px}
.fab{
  width:52px;height:52px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;box-shadow:var(--sh2);cursor:pointer;
  border:none;text-decoration:none;transition:all .2s;
}
.fab:hover{transform:scale(1.1)}
.fab-wa{background:#25D366;color:#fff}
.fab-top{background:var(--g3);color:#fff;font-size:18px;display:none;opacity:0;transition:opacity .3s}
.fab-top.visible{display:flex;opacity:1}

/* ==========================================================
   24. WIDGETS & SIDEBAR
========================================================== */
.widget{background:var(--white);border-radius:var(--r-md);padding:22px;margin-bottom:18px;box-shadow:var(--sh1)}
.widget-title{font-size:14px;font-weight:var(--fw7);color:var(--g1);margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--gold-p)}

/* ==========================================================
   25. SINGLE POST
========================================================== */
.single-post-layout{display:grid;grid-template-columns:1fr 290px;gap:40px}
.post-thumb{border-radius:var(--r-lg);overflow:hidden;margin-bottom:22px;aspect-ratio:16/9}
.post-thumb img{width:100%;height:100%;object-fit:cover}
.post-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--ink3);font-size:13px;margin-bottom:14px}
.post-content{font-size:16px;line-height:1.9;color:var(--ink2)}
.post-content h2,.post-content h3{color:var(--ink);margin:24px 0 10px}
.post-content p{margin-bottom:14px}
.post-content img{border-radius:var(--r-md);margin:14px 0}
.post-content a{color:var(--g3);text-decoration:underline}
.toc-box{background:var(--gold-p);border:1px solid rgba(200,148,58,.22);border-radius:var(--r-md);padding:16px 18px;margin-bottom:22px}
.toc-title{font-weight:var(--fw6);color:var(--g1);margin-bottom:10px}
.toc-item a{font-size:13px;color:var(--ink2)}
.toc-item a:hover{color:var(--g3)}

/* ==========================================================
   26. PAGINATION
========================================================== */
.pagination{display:flex;justify-content:center;gap:6px;margin:48px 0}
.pagination .page-numbers{
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--white);border:1.5px solid var(--brd);
  font-size:14px;color:var(--ink2);transition:all .2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover{background:var(--g3);color:#fff;border-color:var(--g3)}

/* ==========================================================
   27. 404
========================================================== */
.error-404{text-align:center;padding:100px 20px}
.error-404 .error-emoji{font-size:80px;margin-bottom:16px}
.error-404 h1{color:var(--g3)}

/* ==========================================================
   28. UTILITIES
========================================================== */
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:var(--r-full);font-size:11px;font-weight:var(--fw6)}
.badge-primary{background:rgba(26,102,64,.1);color:var(--g3)}
.badge-gold{background:var(--gold-p);color:var(--gold)}
.text-center{text-align:center}
.text-primary{color:var(--g3)}
.text-gold{color:var(--gold)}

/* ==========================================================
   29. PERFORMANCE HINTS
========================================================== */
.service-card,.review-card,.blog-card,.video-card{contain:layout style}
.blog-thumb,.video-thumb,.post-thumb{aspect-ratio:16/9}
.about-img-wrap{contain:layout}

/* ==========================================================
   30. RESPONSIVE — ONE BLOCK PER BREAKPOINT, NO DUPLICATES
========================================================== */

/* ─── max-width: 1100px ─────────────────────────────── */
@media(max-width:1100px){
  .footer-grid{grid-template-columns:1fr 1fr;gap:28px}
}

/* ─── max-width: 1024px ─────────────────────────────── */
@media(max-width:1024px){
  .container{padding:0 20px}
  .hero-grid{grid-template-columns:1fr;text-align:center}
  .hero-content{order:1}
  .hero-card{order:2;max-width:400px;margin:0 auto}
  .hero-grades{justify-content:center}
  .hero-desc{max-width:520px;margin-left:auto;margin-right:auto}
  .hero-actions{justify-content:center}
  .hero-stats{max-width:520px;margin-left:auto;margin-right:auto}
  .hero-deco{display:none}

  .about-grid{grid-template-columns:1fr}
  .about-img-wrap{max-width:420px;margin:0 auto;aspect-ratio:3/2}
  .about-float-1,.about-float-2{display:none}

  .services-grid{grid-template-columns:repeat(2,1fr)}
  .videos-grid{grid-template-columns:repeat(2,1fr)}
  .reviews-grid{grid-template-columns:repeat(2,1fr)}
  .blog-grid{grid-template-columns:repeat(2,1fr)}
  .faq-grid{grid-template-columns:1fr}
  .faq-contact-box{position:static;max-width:480px;margin:0 auto}
  .contact-grid{grid-template-columns:1fr}
  .single-post-layout{grid-template-columns:1fr}

  .hero-section{padding:72px 0 80px}
  .section-pad{padding:64px 0}
  .section-pad-sm{padding:44px 0}
  .section-title{font-size:1.9rem}
  .aggregate-rating-box{padding:36px}
}

/* ─── max-width: 768px ──────────────────────────────── */
@media(max-width:768px){
  /* header mobile */
  .hamburger{display:flex}
  .header-phone-text{display:none}
  .nav-wrapper{
    display:none;position:fixed;
    top:68px;left:0;right:0;bottom:0;
    background:var(--cream);z-index:800;
    padding:24px 16px;overflow-y:auto;
    flex-direction:column;
    -webkit-overflow-scrolling:touch;
  }
  .nav-wrapper.open{display:flex}
  .nav-menu{flex-direction:column;width:100%;gap:4px}
  .nav-menu li{width:100%}
  .nav-menu li a{
    padding:13px 16px;font-size:16px;
    border-radius:var(--r-sm);
  }

  /* hero */
  .hero-section{padding:52px 0 60px;min-height:auto}
  .hero-title{font-size:2.1rem}
  .hero-badge{font-size:12px;padding:6px 14px}
  .hero-stats{grid-template-columns:repeat(2,1fr)}
  .hero-card{padding:24px 20px}
  .teacher-img-wrap{width:96px;height:96px}

  /* sections */
  .section-pad{padding:52px 0}
  .section-pad-sm{padding:36px 0}
  .section-header{margin-bottom:36px}
  .section-title{font-size:1.7rem}

  /* services */
  .services-grid{grid-template-columns:1fr}
  .filter-tab{font-size:12px;padding:7px 16px}

  /* reviews */
  .reviews-grid{grid-template-columns:1fr}
  .aggregate-rating-box{padding:28px 20px;border-radius:var(--r-lg)}
  .aggregate-rating-box .big-rating{font-size:3.5rem}
  .aggregate-rating-box .rating-stars{font-size:1.5rem}

  /* videos */
  .videos-grid{grid-template-columns:1fr}

  /* blog */
  .blog-grid{grid-template-columns:1fr}

  /* faq */
  .faq-question{padding:14px 16px;font-size:14px;min-height:48px}
  .faq-contact-box{padding:24px 20px}
  .faq-contact-phone{font-size:1.4rem}

  /* cta */
  .cta-banner{padding:52px 0}
  .cta-title{font-size:1.7rem}
  .cta-actions{flex-direction:column;align-items:center}
  .cta-actions .btn{width:100%;max-width:300px}

  /* contact */
  .contact-info-item{padding:12px 14px}
  .contact-form-wrap{padding:24px 20px}

  /* about */
  .about-actions{flex-direction:column}
  .about-actions .btn{text-align:center}

  /* footer */
  .footer-grid{grid-template-columns:1fr 1fr;gap:20px}

  /* form */
  .form-row{grid-template-columns:1fr}
  .form-control{font-size:16px} /* iOS zoom prevention */
  select.form-control{font-size:16px}

  /* fab */
  .fab-area{bottom:16px;left:16px}
  .fab{width:48px;height:48px;font-size:20px}
}

/* ─── max-width: 600px ──────────────────────────────── */
@media(max-width:600px){
  .container{padding:0 14px}
  .header-inner{height:62px}
  .nav-wrapper{top:62px}
  .logo-img{height:40px}
  .site-name{font-size:15px}
  .site-sub{display:none}

  .hero-section{padding:44px 0 52px}
  .hero-title{font-size:1.75rem}
  .hero-badge{font-size:11px}
  .grade-chip{font-size:12px;padding:5px 12px}
  .hero-actions .btn{font-size:14px;padding:12px 22px}
  .hero-stat .num{font-size:1.3rem}
  .hero-stat .lbl{font-size:10px}

  .hero-card{padding:20px 16px}
  .teacher-img-wrap{width:88px;height:88px}
  .teacher-name{font-size:1.1rem}
  .card-stat .num{font-size:13px}

  .section-title{font-size:1.5rem}
  .section-tag{font-size:12px}
  .section-desc{font-size:14px}
  .section-header{margin-bottom:28px}

  .service-card-header{padding:20px 18px 14px}
  .service-emoji{font-size:40px}
  .service-card-body{padding:14px 18px}
  .service-title{font-size:14px}
  .service-footer{padding:12px 18px}

  .review-card{padding:18px 16px}
  .review-card::before{font-size:60px}

  .aggregate-rating-box{padding:22px 16px}
  .aggregate-rating-box .big-rating{font-size:3rem}

  .faq-icon{width:28px;height:28px;font-size:16px}
  .faq-contact-phone{font-size:1.3rem}

  .contact-form-wrap{padding:18px 14px}

  .footer-grid{grid-template-columns:1fr}
  .footer-bottom{font-size:11px}

  .section-pad{padding:44px 0}
  .section-pad-sm{padding:30px 0}
}

/* ─── max-width: 400px ──────────────────────────────── */
@media(max-width:400px){
  .container{padding:0 12px}
  .hero-title{font-size:1.5rem}
  .hero-stats{gap:6px}
  .hero-stat{padding:10px 4px}
  .hero-stat .num{font-size:1.1rem}
  .filter-tab{padding:6px 12px;font-size:11px}
  .hero-actions{flex-direction:column}
  .hero-actions .btn{width:100%;justify-content:center}
}

/* ─── landscape phones ──────────────────────────────── */
@media(max-width:768px) and (orientation:landscape){
  .hero-section{padding:32px 0}
  .hero-title{font-size:1.7rem}
  .hero-grid{grid-template-columns:1fr 1fr;text-align:right}
  .hero-grades{justify-content:flex-start}
  .hero-actions{justify-content:flex-start}
  .hero-stats{max-width:100%}
}

/* ─── iOS safe area ─────────────────────────────────── */
@supports(padding:max(0px)){
  .header-inner{
    padding-right:max(0px,env(safe-area-inset-right));
    padding-left:max(0px,env(safe-area-inset-left));
  }
  .fab-area{
    bottom:max(24px,env(safe-area-inset-bottom));
    left:max(24px,env(safe-area-inset-left));
  }
  .footer-bottom{
    padding-bottom:max(16px,env(safe-area-inset-bottom));
  }
}

/* ─── prefers-reduced-motion ────────────────────────── */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* ─── high contrast ─────────────────────────────────── */
@media(forced-colors:active){
  .btn-primary,.btn-gold{border:2px solid ButtonText}
  .service-card,.review-card,.faq-item{border:1px solid ButtonText}
}

/* ─── print ─────────────────────────────────────────── */
@media print{
  .site-header,.fab-area,.announcement-bar,
  .hero-actions,.cta-banner,.hamburger,.header-actions,
  .footer-social{display:none!important}
  body{font-size:12pt;color:#000;background:#fff}
  a{color:#000}
}

/* =============================================================
   TaleshiMath v2.3.0 — Fixes & New Styles
============================================================= */

/* ── About Teacher Image — حذف inline style ── */
.about-teacher-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* ── Author Avatar Image در single.php ── */
.author-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--g3);
}
.author-avatar-img + .author-avatar-large,
.author-avatar-img ~ .author-avatar-large { display: none; }

/* ── Video Facade Pattern ── */
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
}
.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, opacity .3s ease;
}
.video-facade:hover img { transform: scale(1.04); opacity: .85; }
.video-facade:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.video-facade:hover .video-play-btn { transform: scale(1.1); }
.video-facade-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  background: rgba(0,0,0,.6);
  padding: 16px;
  text-align: center;
}
.video-facade-placeholder span { font-size: 40px; }

/* ── FAQ Button — رفع نشانگر اشتباه ── */
button.faq-question {
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

/* ── Reveal animation ── */
.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-ready.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready { opacity: 1; transform: none; transition: none; }
}

/* ── Breakpoint جدید 375px برای iPhone SE و اندروید‌های کوچک ── */
@media (max-width: 390px) {
  .hero-title { font-size: 1.45rem; line-height: 1.22; }
  .hero-badge { font-size: 10px; padding: 5px 10px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .hero-stat { padding: 10px 6px; }
  .hero-stat .num { font-size: 1.05rem; }
  .hero-stat .lbl { font-size: 9px; }
  .section-title { font-size: 1.35rem; }
  .btn-lg { padding: 12px 22px; font-size: 15px; }
  .grade-chip { font-size: 11px; padding: 4px 10px; }
  .filter-tab { padding: 6px 10px; font-size: 10px; }
  .hero-card { padding: 16px 14px; }
  .teacher-img-wrap { width: 80px; height: 80px; }
  .card-stat .num { font-size: 12px; }
  .faq-question { font-size: 13px; padding: 12px 14px; }
  .contact-form-wrap { padding: 16px 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .container { padding: 0 10px; }
}

/* ── Announcement bar — رفع role=banner تکراری ── */
.announcement-bar[role="region"] {
  /* استایل قبلی حفظ می‌شود، فقط role در HTML تغییر کرد */
}

/* ── حذف footer-seo-text ── */
.footer-seo-text { display: none !important; }

/* ── Focus visible بهتر برای همه عناصر ── */
:focus-visible {
  outline: 3px solid var(--gold, #E4AE4A);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold, #E4AE4A);
  outline-offset: 3px;
}

/* ── Customizer — اضافه کردن tm_teacher_photo support ── */
/* (در customizer.php هم باید اضافه شود) */

/* =============================================================
   TaleshiMath v2.3.1 — MOBILE OVERFLOW FIX (CRITICAL)
   مشکل اصلی: site-branding flex-shrink:0 + site-name متن بلند
   → header از viewport بزرگتر → overflow-x → scroll چپ/راست
============================================================= */

/* ────────────────────────────────────────────────────────────
   1. جلوگیری کامل از horizontal scroll در همه دستگاه‌ها
──────────────────────────────────────────────────────────── */
html {
  overflow-x: clip !important;
  max-width: 100%;
}
body {
  overflow-x: hidden !important;
  max-width: 100vw;
}
#page,
.site-wrapper {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
main,
.site-main {
  overflow-x: hidden;
  width: 100%;
}

/* ────────────────────────────────────────────────────────────
   2. FIX اصلی header: site-branding متن بلند overflow
──────────────────────────────────────────────────────────── */

/* حذف flex-shrink:0 — باید کوچک بشه */
.site-branding {
  flex-shrink: 1;
  min-width: 0;          /* ضروری: بدون این flex item از container خارج می‌شه */
  max-width: 60%;
  overflow: hidden;
}
.site-branding-text {
  min-width: 0;
  overflow: hidden;
}
.site-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}
.header-actions {
  flex-shrink: 0;        /* actions (همبرگر، CTA) هرگز کوچک نشن */
}

/* ────────────────────────────────────────────────────────────
   3. موبایل: فقط لوگو، بدون متن site-name
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-branding {
    flex-shrink: 0;
    max-width: none;
    overflow: visible;
  }
  .site-branding-text {
    display: none;         /* موبایل: فقط لوگوی تصویری */
  }
  .logo-img {
    height: 40px !important;
    width: auto;
  }
  .header-inner {
    height: 60px !important;
    gap: 8px;
  }
  .header-phone-text {
    display: none;         /* شماره رو موبایل پنهان */
  }
  /* دکمه CTA هدر موبایل: کوچک‌تر */
  .header-actions .btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  /* موبایل کوچک: CTA هدر هم مخفی — فقط همبرگر */
  .header-actions .btn-primary {
    display: none;
  }
}

/* ────────────────────────────────────────────────────────────
   4. FIX hero section: grid و layout
──────────────────────────────────────────────────────────── */
.hero-section,
.about-section,
.services-section,
.videos-section,
.reviews-section,
.faq-section,
.cta-banner,
.blog-section,
.contact-section {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Hero Grid موبایل */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
    gap: 32px;
  }
  .hero-content {
    width: 100%;
  }
  .hero-card {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .hero-card {
    max-width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    max-width: 100%;
    text-align: center;
  }
  .hero-stats {
    width: 100%;
  }
  .grade-chip {
    max-width: 100%;
  }
}

/* ────────────────────────────────────────────────────────────
   5. FIX container: همه بریک‌پوینت‌ها
──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
}
@media (max-width: 480px) {
  .container {
    padding: 0 12px !important;
    width: 100% !important;
  }
}

/* ────────────────────────────────────────────────────────────
   6. FIX grids: عرض درست روی همه موبایل‌ها
──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .services-grid,
  .reviews-grid,
  .videos-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .filter-tabs {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
  .faq-grid {
    grid-template-columns: 1fr !important;
  }
  .about-grid {
    grid-template-columns: 1fr !important;
  }
  .card-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ────────────────────────────────────────────────────────────
   7. FIX images: هرگز از container بزرگتر نشن
──────────────────────────────────────────────────────────── */
img {
  max-width: 100% !important;
  height: auto;
}
.service-card,
.review-card,
.blog-card,
.video-card {
  width: 100%;
  max-width: 100%;
}
.about-img-wrap {
  width: 100% !important;
  max-width: 100%;
  overflow: hidden;
}
.about-teacher-img {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ────────────────────────────────────────────────────────────
   8. FIX فرم: iOS zoom + overflow
──────────────────────────────────────────────────────────── */
.form-control,
select.form-control,
textarea.form-control {
  font-size: 16px !important;  /* iOS anti-zoom */
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.contact-form-wrap,
.tm-contact-form {
  max-width: 100%;
  overflow: hidden;
}

/* ────────────────────────────────────────────────────────────
   9. FIX CTA banner: دکمه‌ها موبایل
──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .cta-actions .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ────────────────────────────────────────────────────────────
   10. FIX FAB: موبایل position و z-index
──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .fab-area {
    bottom: 16px;
    left: 12px;
    gap: 8px;
  }
  .fab {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px;
  }
}

/* ────────────────────────────────────────────────────────────
   11. FIX areas-grid و chips موبایل
──────────────────────────────────────────────────────────── */
.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}
.area-chip,
.grade-chip {
  white-space: nowrap;
  max-width: 100%;
}
.hero-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
@media (max-width: 600px) {
  .hero-grades {
    justify-content: center;
  }
}

/* ────────────────────────────────────────────────────────────
   12. FIX footer
──────────────────────────────────────────────────────────── */
.site-footer {
  overflow: hidden;
  width: 100%;
}
@media (max-width: 600px) {
  .footer-col h4 {
    font-size: 14px;
  }
  .footer-col ul li a {
    font-size: 13px;
  }
  .footer-brand-desc {
    font-size: 13px;
  }
}

/* ────────────────────────────────────────────────────────────
   13. FIX announcement bar overflow
──────────────────────────────────────────────────────────── */
.announcement-bar {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.announcement-bar a,
.announcement-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ────────────────────────────────────────────────────────────
   14. Elementor interference fix
   Elementor ممکنه global padding/width بذاره
──────────────────────────────────────────────────────────── */
.elementor-default .hero-section,
.elementor-default .site-main {
  max-width: 100% !important;
  width: 100% !important;
}

/* ────────────────────────────────────────────────────────────
   15. FIX nav-wrapper mobile: top باید با header-inner height هماهنگ باشه
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-wrapper {
    top: 60px !important;
    width: 100% !important;
    max-width: 100vw;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box;
  }
}

/* =============================================================
   v2.3.1 — Contrast Fixes (WCAG AA 4.5:1 minimum)
   منبع خطاها: Lighthouse Accessibility Audit
============================================================= */

/*
  رنگ‌های اصلاح‌شده:
  --ink3: #718096 روی --bg:#F5F2EB → contrast ratio ~3.5 (FAIL)
  --ink4: #A0AEC0 روی سفید/کرم    → contrast ratio ~2.4 (FAIL)
  --gold: #C8943A روی --gold-p     → contrast ratio ~3.2 (FAIL)

  اصلاح‌شده:
  --ink3-aa: #5A6474 روی سفید  → 4.6:1 (PASS AA)
  --ink4-aa: #6B7280 روی سفید  → 4.7:1 (PASS AA)
  --gold-aa: #8B5E12 روی --gold-p → 5.1:1 (PASS AA)
*/

/* 1. section-tag: طلایی روی پس‌زمینه کرم — FAIL → PASS */
.section-tag {
  color: #7A5010 !important; /* از #C8943A به تیره‌تر */
}

/* 2. section-desc: خاکستری روشن — FAIL → PASS */
.section-desc {
  color: #4A5568 !important; /* از var(--ink3):#718096 به تیره‌تر */
}

/* 3. services-quality: سبز تیره روی کرم */
.services-quality {
  color: #2D5A3D !important; /* از var(--ink3) به سبز تیره */
  font-weight: 500;
}

/* 4. section-tag در هر بخش */
span.section-tag {
  color: #7A5010 !important;
}

/* 5. site-sub: زیرنویس هدر خاکستری — FAIL → PASS */
.site-sub {
  color: #4A5568 !important; /* از --ink4:#A0AEC0 */
}

/* 6. contact-info-label: label های کوچک — FAIL → PASS */
.contact-info-label {
  color: #4A5568 !important; /* از --ink4 */
  font-size: 12px !important; /* اندکی بزرگ‌تر هم کمک می‌کند */
}

/* 7. footer-brand-desc: سفید شفاف روی تیره — FAIL → PASS */
.footer-brand-desc {
  color: rgba(255,255,255,.75) !important; /* از .5 به .75 */
}

/* 8. footer-col links: سفید شفاف روی تیره — FAIL → PASS */
.footer-col ul li a {
  color: rgba(255,255,255,.78) !important; /* از .48 */
}

/* 9. footer-contact-item: سفید شفاف — FAIL → PASS */
.footer-contact-item {
  color: rgba(255,255,255,.78) !important; /* از .56 */
}

/* 10. footer-bottom copyright: بسیار کم contrast — FAIL → PASS */
.footer-bottom {
  color: rgba(255,255,255,.65) !important; /* از .3 */
}
.footer-copyright {
  color: rgba(255,255,255,.65) !important;
}

/* 11. reviewer-meta: خاکستری — FAIL → PASS */
.reviewer-meta {
  color: #4A5568 !important; /* از var(--ink3) */
}

/* 12. blog-meta: تاریخ و زمان خواندن */
.blog-meta {
  color: #4A5568 !important; /* از var(--ink4) */
}

/* 13. blog-excerpt */
.blog-excerpt {
  color: #4A5568 !important; /* از var(--ink3) */
}

/* 14. form privacy text — color:#8A8AA0 روی سفید FAIL */
.tm-contact-form p[style*="color:#8A8AA0"],
.contact-form-wrap p:last-child {
  color: #5A6474 !important;
}

/* 15. hero-stat lbl: سفید کمرنگ روی تصویر تیره — OK معمولاً
   ولی روی card سفید ممکن است مشکل داشته باشد */
.hero-card .hero-stat .lbl,
.card-stat .lbl {
  color: #4A5568;
}

/* 16. video placeholder text */
.video-placeholder p,
.video-facade-placeholder p {
  color: rgba(255,255,255,.9);
}

/* 17. faq-contact-box paragraph */
.faq-contact-box p {
  color: rgba(255,255,255,.85) !important; /* اگر پس‌زمینه تیره است */
}

/* 18. about-cred-desc */
.about-cred-desc {
  color: #4A5568 !important;
}

/* --- Social link touch target fix: 38px → 44px --- */
.social-link {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
}

/* ── Form privacy text — contrast fix ── */
.form-privacy-text {
  text-align: center;
  font-size: 12px;
  color: #5A6474; /* از #8A8AA0 به 4.8:1 contrast */
  margin-top: 12px;
}
