/* ==========================================
   Responsive
========================================== */

@media (max-width: 992px) {

    h1{
        font-size:40px;
    }

    h2{
        font-size:30px;
    }

    section{
        padding:70px 0;
    }

    /* Header */

    .top-bar{
        display:none;
    }

    .header-inner{
        min-height:70px;
        padding:0 20px;
    }

    .header-buttons{
        display:none;
    }

    .mobile-toggle{
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        gap:5px;
        width:42px;
        height:42px;
        background:transparent;
        border:0;
        cursor:pointer;
    }

    .hamburger-line{
        width:24px;
        height:2px;
        background:#fff;
        border-radius:999px;
    }

    .main-navigation{
        display:none;
        position:absolute;
        top:100%;
        right:0;
        left:0;
        background:#112235;
        padding:20px;
        border-radius:0 0 16px 16px;
        z-index:999;
    }

    .main-navigation.is-open{
        display:block;
    }

    .main-menu{
        display:flex;
        flex-direction:column;
        gap:20px;
        margin:0;
        padding:0;
    }

    .main-menu li{
        width:100%;
    }

    .main-menu a{
        display:block;
        color:#fff;
        font-size:18px;
        padding:10px 0;
    }

    /* Hero */

    .hero-wrapper{
        flex-direction:column-reverse;
    }

    .hero-content,
    .hero-image{
        width:100%;
    }

    .hero-content h1{
        font-size:38px;
    }

    /* Footer */

    .footer-grid{
        grid-template-columns:1fr;
        text-align:center;
    }

}

@media (max-width: 576px) {

    h1{
        font-size:32px;
    }

    h2{
        font-size:26px;
    }

    .container{
        width:94%;
    }

}
@media (max-width:768px){

    .hero-doctor{
        width:220px;
        height:220px;
        max-width:none;
        border-radius:50%;
        object-fit:cover;
        margin:30px auto 0;
        display:block;
    }

}
/* =========================================================
   DESKTOP HEADER / HERO FINAL LAYOUT
   Mobile layout intentionally remains unchanged.
========================================================= */
@media (min-width: 993px){
    body{
        padding-top:124px;
        font-size:17px;
    }

    .site-header{
        padding:10px 0;
    }

    .site-header .top-bar,
    .site-header .header-main{
        width:min(1280px,92%);
        margin-inline:auto;
        border-radius:18px;
    }

    .site-header .top-bar{
        margin-bottom:12px;
        border-bottom:1px solid rgba(255,255,255,.10);
    }

    .site-header .header-main{
        border:1px solid rgba(255,255,255,.10);
        box-shadow:0 12px 35px rgba(0,0,0,.14);
    }

    .site-header .top-bar-inner{
        min-height:46px;
        padding:0 18px;
    }

    .site-header .header-inner{
        min-height:72px;
        padding:0 18px;
    }

    /* دو ردیف: ردیف اول دو کارت جراحی، ردیف دوم دو دکمه */
    .premium-hero .hero-action-row{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px;
        width:100%;
        margin-top:28px;
    }

    .premium-hero .hero-credentials,
    .premium-hero .hero-buttons{
        display:contents;
    }

    .premium-hero .hero-credential,
    .premium-hero .appointment-btn,
    .premium-hero .phone-btn{
        width:100%;
        min-height:68px;
        height:68px;
        box-sizing:border-box;
    }

    .premium-hero .hero-credential{
        background:linear-gradient(135deg,rgba(39,105,155,.18),rgba(255,255,255,.055));
        border-color:rgba(91,181,235,.18);
    }

    .premium-hero .hero-credential strong{
        font-size:15px;
    }

    .premium-hero .hero-credential small{
        font-size:12px;
    }

    .premium-hero .appointment-btn,
    .premium-hero .phone-btn{
        margin:0;
        font-size:16px;
    }
}

/* متن و فوتر خواناتر؛ فقط اندازه فونت، بدون تغییر چیدمان موبایل */
.site-footer .footer-about,
.site-footer .footer-menu a,
.site-footer .footer-contact li,
.site-footer .footer-bottom{
    font-size:15px;
    line-height:2;
}

.site-footer .footer-widget h3{
    font-size:19px;
}

/* =========================================================
   MOBILE HERO — REAL VISUAL ORDER
   Only mobile: title -> image -> rest of content
========================================================= */
@media (max-width:768px){
    .premium-hero .hero-wrapper{
        display:flex;
        flex-direction:column;
    }
    .premium-hero .hero-content{
        display:contents;
    }
    .premium-hero .hero-title{order:1;}
    .premium-hero .hero-image{order:2;}
    .premium-hero .hero-badge{order:3;}
    .premium-hero .hero-title-line{order:4;}
    .premium-hero .hero-subtitle{order:5;}
    .premium-hero .hero-description{order:6;}
    .premium-hero .hero-action-row{order:7; width:100%;}
    .premium-hero .hero-credentials{display:flex; flex-direction:column; width:100%;}
    .premium-hero .hero-credential{width:100%;}
    .premium-hero .hero-buttons{display:flex; flex-direction:column; width:100%;}
    .premium-hero .appointment-btn,
    .premium-hero .phone-btn{width:100%;}
}

/* =========================================================
   DAY MODE — premium light theme
========================================================= */
body.light-mode{
    --background:#f4f7fb;
    --surface:#ffffff;
    --surface-light:#eef4f9;
    --text:#172033;
    --text-muted:#607087;
    --border:rgba(18,39,63,.10);
    --bg:#f4f7fb;
    --muted:#607087;
    background:#f4f7fb;
    color:#172033;
}

body.light-mode .site-header .top-bar{
    background:rgba(255,255,255,.86);
    border-bottom-color:rgba(18,39,63,.08);
    box-shadow:0 8px 24px rgba(31,55,80,.06);
}
body.light-mode .site-header .header-main{
    background:rgba(255,255,255,.82);
    border-color:rgba(18,39,63,.09);
    box-shadow:0 12px 35px rgba(31,55,80,.10);
}
body.light-mode .site-header a,
body.light-mode .main-menu a{color:#172033;}
body.light-mode .seo-keyword{color:#53657b;}
body.light-mode .premium-hero{
    background:linear-gradient(180deg,#f8fbff 0%,#eef4f8 100%);
}
body.light-mode .premium-hero .hero-description,
body.light-mode .premium-hero .hero-subtitle{color:#52647a;}
body.light-mode .premium-hero .hero-credential{
    background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(229,239,247,.88));
    border-color:rgba(25,91,139,.13);
    box-shadow:0 10px 28px rgba(28,62,91,.08);
}
body.light-mode .premium-hero .hero-credential strong{color:#172033;}
body.light-mode .premium-hero .hero-credential small{color:#61748a;}
body.light-mode .premium-hero .phone-btn{
    color:#172033;
    background:rgba(255,255,255,.78);
    border-color:rgba(18,39,63,.12);
}
body.light-mode .section-header p,
body.light-mode .section-subtitle{color:#607087;}
body.light-mode .glass-card,
body.light-mode .service-card,
body.light-mode .doctor-card,
body.light-mode .faq-item{
    background:rgba(255,255,255,.78);
    border-color:rgba(18,39,63,.09);
    color:#172033;
}
body.light-mode .site-footer{
    background:linear-gradient(180deg,#eaf1f6 0%,#dce7ef 100%);
}
body.light-mode .site-footer .footer-widget{
    background:rgba(255,255,255,.72);
    border-color:rgba(18,39,63,.10);
    box-shadow:0 10px 28px rgba(30,55,78,.08);
}
body.light-mode .site-footer .footer-widget h3,
body.light-mode .site-footer .footer-about,
body.light-mode .site-footer .footer-menu a,
body.light-mode .site-footer .footer-contact li,
body.light-mode .site-footer .footer-bottom{color:#34465b;}
body.light-mode .golshan-chat-box{
    background:rgba(255,255,255,.97);
    border-color:rgba(18,39,63,.10);
    box-shadow:0 20px 60px rgba(26,53,78,.18);
}
body.light-mode .golshan-chat-header strong,
body.light-mode .golshan-chat-text strong{color:#172033;}
body.light-mode .golshan-chat-header span,
body.light-mode .golshan-chat-text small{color:#65778b;}
body.light-mode .golshan-chat-item{background:rgba(20,60,90,.045);border-color:rgba(18,39,63,.08);}

/* Day/night switch */
.theme-toggle{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:12px;
    background:rgba(255,255,255,.08);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:21px;
    transition:.25s ease;
}
.theme-toggle:hover{transform:translateY(-2px);}
body.light-mode .theme-toggle{
    color:#20334a;
    background:rgba(20,60,90,.06);
    border-color:rgba(18,39,63,.10);
}

/* Mobile footer accordion */
@media(max-width:768px){
    .site-footer .footer-widget{padding:0 12px;}
    .site-footer .footer-accordion-toggle{
        width:100%;
        min-height:54px;
        padding:0;
        border:0;
        background:transparent;
        color:inherit;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        font-family:inherit;
        font-size:15px;
        font-weight:800;
        cursor:pointer;
        text-align:right;
    }
    .site-footer .footer-accordion-toggle b{
        font-size:22px;
        font-weight:400;
        transition:transform .25s ease;
    }
    .site-footer .footer-accordion-toggle[aria-expanded="true"] b{transform:rotate(45deg);}
    .site-footer .footer-accordion-content{
        display:none;
        padding:0 0 14px;
    }
    .site-footer .footer-widget.is-open .footer-accordion-content{display:block;}
    .site-footer .footer-widget h3{display:none;}
    .site-footer .footer-map{height:200px;}
}


/* =========================================================
   FINAL FIXES — Mobile Navigation / Footer / Light Theme
========================================================= */

/* Header must be the positioning context for the mobile dropdown. */
@media (max-width: 992px){
    .site-header .header-main{position:relative;}
    .site-header .header-inner{position:relative;}

    .site-header .main-navigation{
        display:none;
        position:absolute;
        top:calc(100% + 8px);
        right:0;
        left:0;
        width:100%;
        max-height:calc(100vh - 90px);
        overflow-y:auto;
        background:rgba(10,25,40,.98);
        border:1px solid rgba(255,255,255,.10);
        border-radius:0 0 18px 18px;
        padding:14px 18px 18px;
        box-shadow:0 20px 45px rgba(0,0,0,.28);
        z-index:10000;
    }

    .site-header .main-navigation.is-open{display:block !important;}

    .site-header .main-menu{display:flex;flex-direction:column;gap:4px;width:100%;}
    .site-header .main-menu li{width:100%;}
    .site-header .main-menu a{display:block;width:100%;padding:12px 8px;color:#fff;}

    .site-header .mobile-toggle{position:relative;z-index:10001;display:flex !important;}
}

@media (max-width: 992px){
    body.light-mode .site-header .main-navigation{
        background:rgba(255,255,255,.98);
        border-color:rgba(18,39,63,.10);
        box-shadow:0 20px 45px rgba(30,55,78,.16);
    }
    body.light-mode .site-header .main-menu a{color:#172033;}
    body.light-mode .hamburger-line{background:#172033;}
}

/* Footer accordion: headings remain visible on desktop, the + is mobile-only. */
@media (min-width:769px){
    .site-footer .footer-accordion-toggle{
        display:block;
        width:100%;
        padding:0;
        margin:0 0 18px;
        border:0;
        background:transparent;
        color:#fff;
        font-family:inherit;
        font-size:16px;
        font-weight:800;
        line-height:1.6;
        text-align:right;
        cursor:default;
    }
    .site-footer .footer-accordion-toggle b{display:none !important;}
    .site-footer .footer-accordion-content{display:block !important;padding:0;}
    .site-footer .footer-widget{padding:22px;}
}

@media (max-width:768px){
    .site-footer .footer-accordion-toggle{display:flex;}
}

/* Comprehensive light-mode text correction for sections that previously inherited white. */
body.light-mode,
body.light-mode .premium-hero,
body.light-mode .doctor-section,
body.light-mode .services-section,
body.light-mode .articles-section,
body.light-mode .statistics-section,
body.light-mode .faq-section,
body.light-mode .cta-section,
body.light-mode .contact-section,
body.light-mode .patient-video-section{
    color:#172033;
}

body.light-mode .premium-hero .hero-title,
body.light-mode .premium-hero .hero-title .main-keyword,
body.light-mode .section-header h2,
body.light-mode .section-heading,
body.light-mode .doctor-trust-header h2,
body.light-mode .doctor-stat-card strong,
body.light-mode .service-card h3,
body.light-mode .article-card .article-content h3,
body.light-mode .faq-question,
body.light-mode .cta-content h2,
body.light-mode .contact-card h3{
    color:#172033;
}

body.light-mode .premium-hero .hero-title .main-keyword{color:#0F6CBD;}
body.light-mode .premium-hero .hero-subtitle{color:#43576d;}
body.light-mode .premium-hero .hero-description{color:#52647a;}
body.light-mode .premium-hero .hero-title-line{background:linear-gradient(90deg,#0F6CBD,rgba(15,108,189,0));}
body.light-mode .section-header p,
body.light-mode .doctor-stat-card span,
body.light-mode .service-card p,
body.light-mode .article-card .article-content p,
body.light-mode .faq-answer,
body.light-mode .doctor-trust-section p,
body.light-mode .cta-content p{color:#607087;}

body.light-mode .doctor-stat-card,
body.light-mode .service-card,
body.light-mode .article-card,
body.light-mode .faq-item,
body.light-mode .contact-card,
body.light-mode .social-card,
body.light-mode .patient-video-card{
    background:rgba(255,255,255,.82);
    border-color:rgba(18,39,63,.10);
    color:#172033;
    box-shadow:0 12px 32px rgba(30,55,78,.08);
}

body.light-mode .hero-floating-badge{
    background:rgba(255,255,255,.94);
    border-color:rgba(18,39,63,.10);
    color:#172033;
    box-shadow:0 12px 30px rgba(30,55,78,.12);
}
body.light-mode .hero-floating-badge strong{color:#172033;}
body.light-mode .hero-floating-badge small{color:#607087;}

body.light-mode .site-footer .footer-accordion-toggle{color:#34465b;}
body.light-mode .site-footer .footer-menu a:hover{color:#172033;}

/* Remove stale dark body/header rules that otherwise flash before JS. */
body.light-mode .site-logo a{color:#172033;}

/* Prevent the fixed desktop header spacing from affecting phones. */
@media (max-width:992px){body{padding-top:0 !important;}}

@media (max-width:768px){
  .main-navigation{display:none!important;position:absolute;top:100%;right:12px;left:12px;z-index:9999}
  .main-navigation.is-open{display:block!important}
  .main-navigation .main-menu{display:flex;flex-direction:column;gap:0}
  .main-navigation .main-menu li a{display:block;padding:14px 18px}
  .header-inner{position:relative}
  .header-buttons{display:none!important}
}

body.light-mode .hero-title,body.light-mode .hero-subtitle,body.light-mode .hero-description,body.light-mode .section-header h2,body.light-mode .section-header p,body.light-mode .doctor-card,body.light-mode .review-text,body.light-mode .medical-content,body.light-mode .treatment-card,body.light-mode .language-hero{color:#182230}
body.light-mode .review-text,body.light-mode .medical-entry,body.light-mode .treatment-content p{color:#344054}
body.light-mode .site-footer{color:#243042}
body.light-mode .footer-widget h3,body.light-mode .footer-about,body.light-mode .footer-menu a,body.light-mode .footer-contact a{color:#243042}
body.light-mode .main-navigation.is-open{background:#fff;color:#182230;box-shadow:0 18px 45px rgba(0,0,0,.12)}

/* =========================================================
   MOBILE HEADER + LANGUAGE CONTROL — FINAL
========================================================= */
.language-switcher{position:relative;display:flex;align-items:center;margin-inline:8px;z-index:10005;}
.language-switcher-toggle{
    display:flex;align-items:center;gap:6px;height:38px;padding:0 10px;border:1px solid rgba(255,255,255,.14);
    border-radius:12px;background:rgba(255,255,255,.07);color:inherit;font:700 12px/1 Vazirmatn,sans-serif;cursor:pointer;
    backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:.2s ease;
}
.language-switcher-toggle:hover{transform:translateY(-1px);background:rgba(255,255,255,.11);}
.language-globe{font-size:12px;opacity:.8}.language-chevron{font-size:15px;line-height:1;opacity:.7;transition:.2s}.language-switcher.is-open .language-chevron{transform:rotate(180deg)}
.language-menu{display:none;position:absolute;top:calc(100% + 8px);right:0;min-width:155px;padding:7px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(12,28,44,.97);box-shadow:0 18px 45px rgba(0,0,0,.28);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.language-switcher.is-open .language-menu{display:block}
.language-menu a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border-radius:10px;color:#fff!important;font-size:12px}.language-menu a:hover{background:rgba(255,255,255,.09)}.language-menu a span{font-weight:900}.language-menu a small{opacity:.7;font-size:11px}
body.light-mode .language-switcher-toggle{color:#172033;background:rgba(255,255,255,.72);border-color:rgba(18,39,63,.10)}
body.light-mode .language-menu{background:rgba(255,255,255,.98);border-color:rgba(18,39,63,.10);box-shadow:0 18px 45px rgba(30,55,78,.16)}
body.light-mode .language-menu a{color:#172033!important}.language-menu a:hover{background:rgba(20,60,90,.06)}

@media(max-width:992px){
    .site-header{top:8px;width:calc(100% - 16px);max-width:none;}
    .site-header .header-inner{min-height:58px;padding:0 10px;gap:6px;}
    .site-header .site-logo{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:38%;}
    .site-header .language-switcher{order:2;margin-inline:auto 2px;}
    .site-header .theme-toggle{order:3;width:38px;height:38px;flex-basis:38px;border-radius:11px;font-size:18px;}
    .site-header .mobile-toggle{order:4;width:38px;height:38px;flex:0 0 38px;}
    .site-header .hamburger-line{width:21px;height:2px;}
    .site-header .main-navigation{top:calc(100% + 7px);right:0;left:0;width:100%;border-radius:16px;padding:9px 12px;}
    .site-header .main-menu a{padding:10px 8px;font-size:14px;}
    .language-menu{right:0;min-width:145px;}
}
@media(max-width:480px){
    .site-header .site-logo{max-width:42%;font-size:13px;}
    .language-switcher-toggle{height:36px;padding:0 9px;gap:5px;}
    .language-menu{min-width:140px;}
}
.mobile-theme-toggle{display:none;}
@media(max-width:992px){.site-header .mobile-theme-toggle{display:flex!important;order:3;width:38px;height:38px;flex:0 0 38px;border-radius:11px;font-size:18px}.site-header .desktop-theme-toggle{display:none!important;}}

/* =========================================================
   FINAL MOBILE HEADER POLISH
========================================================= */
.language-globe{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px}
.language-globe svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:992px){
    .site-header .header-inner{min-height:54px;padding:0 8px;gap:10px}
    .site-header .site-logo{display:none!important}
    .site-header .language-switcher{order:2;margin:0 0 0 auto}
    .site-header .theme-toggle{order:3!important;width:40px;height:40px;flex:0 0 40px;border-radius:12px}
    .site-header .mobile-toggle{order:4;width:40px;height:40px;flex:0 0 40px;border-radius:12px}
    .language-switcher-toggle{height:40px;min-width:46px;padding:0 10px;gap:6px;border-radius:12px}
    .language-current{font-size:11px;font-weight:900}
    .language-chevron{font-size:13px}
    .language-menu{top:calc(100% + 9px);min-width:155px}
}
@media(max-width:480px){
    .site-header{width:calc(100% - 12px);top:6px}
    .site-header .header-inner{gap:8px;padding:0 7px}
    .site-header .theme-toggle,.site-header .mobile-toggle{width:38px;height:38px;flex-basis:38px}
    .language-switcher-toggle{height:38px;min-width:44px;padding:0 9px}
}

/* v1.2.13 — multilingual doctor visual + doctors sizing */
.language-hero{position:relative;overflow:hidden;padding-right:340px!important;min-height:360px}
.language-doctor-visual{position:absolute;right:28px;top:28px;width:275px;height:310px;border-radius:28px;overflow:hidden;border:1px solid rgba(255,255,255,.14);box-shadow:0 25px 60px rgba(0,0,0,.18);background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.025));z-index:1}
.language-doctor-visual img{width:100%;height:100%;object-fit:cover;object-position:center top;display:block;position:relative;z-index:2}
.language-doctor-glow{position:absolute;inset:-30%;background:radial-gradient(circle,rgba(216,168,91,.24),transparent 62%);z-index:0}
.doctors-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}
.doctor-profile-card{max-width:390px;margin:auto}
.doctor-profile-media{height:250px!important}
.doctor-profile-content{padding:18px!important}
.doctor-profile-content h3{font-size:18px!important}
@media(max-width:900px){.language-hero{padding-right:0!important;padding-top:270px!important}.language-doctor-visual{right:50%;transform:translateX(50%);top:22px;width:210px;height:230px}.doctors-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.doctors-grid{grid-template-columns:1fr!important}.doctor-profile-media{height:220px!important}.language-hero{padding-top:245px!important}.language-doctor-visual{width:190px;height:210px}}
