/* =============================================
   مدارس البيان الأهلية — Design tokens
============================================= */
:root {
    --navy: #0F2748;
    --navy-2: #16324F;
    --navy-3: #0A1B32;
    --gold: #C8862E;
    --gold-light: #E3A857;
    --teal: #14684F;
    --paper: #FAF8F4;
    --paper-2: #F1EBDD;
    --ink: #1C1F26;
    --ink-soft: #566072;
    --white: #FFFFFF;
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 10px 24px -14px rgba(15, 39, 72, .28);
    --shadow: 0 24px 48px -20px rgba(15, 39, 72, .32);
    --ease: cubic-bezier(.22, .68, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    line-height: 1.3;
}

p { margin: 0 0 1rem; color: var(--ink-soft); }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--navy);
}
.h2--light { color: var(--white); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: var(--gold);
    background: rgba(200, 134, 46, .1);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 14px;
    letter-spacing: .2px;
}
.eyebrow--light { color: var(--gold-light); background: rgba(255,255,255,.12); }

.section { padding: 88px 0; }
.section--tint { background: var(--paper-2); }
.section--navy { background: linear-gradient(180deg, var(--navy-3), var(--navy)); }

.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head--light p { color: rgba(255,255,255,.7); }

/* =============================================
   Buttons
============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    border: 2px solid transparent;
    border-radius: 100px;
    padding: 13px 26px;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
    white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: .85rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--gold { background: var(--gold); color: var(--white); box-shadow: 0 12px 24px -10px rgba(200,134,46,.55); }
.btn--gold:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); transform: translateY(-2px); }

.btn--ghost { background: rgba(255,255,255,.08); color: var(--white); border-color: rgba(255,255,255,.4); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }

.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); }

/* =============================================
   Announcement bar
============================================= */
.announce { background: var(--navy-3); color: var(--white); font-size: .85rem; }
.announce__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 24px; }
.announce__text { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); }
.announce__text i { color: var(--gold-light); }
.announce__link { color: var(--gold-light); font-weight: 700; display: flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .announce__text span { display: none; } }

/* =============================================
   Header
============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 244, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15,39,72,.08);
    transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 24px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { width: 48px; height: 48px; object-fit: contain; }
.brand__text { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.brand__text em { font-style: normal; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink-soft);
    position: relative;
    padding: 6px 0;
    transition: color .2s;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0; left: auto;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width .25s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--navy); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 16px; }
.header__phone { display: flex; align-items: center; gap: 6px; font-family: 'Cairo'; font-weight: 700; color: var(--navy); font-size: .92rem; }
.header__phone i { color: var(--gold); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }

@media (max-width: 960px) {
    .header__phone { display: none; }
    .nav {
        position: fixed; inset: 0 0 0 auto; top: 0; height: 100vh; width: min(320px, 82vw);
        background: var(--white); flex-direction: column; align-items: flex-start;
        padding: 100px 32px 32px; gap: 22px; box-shadow: var(--shadow);
        transform: translateX(105%); transition: transform .35s var(--ease), visibility .35s;
        z-index: 90; visibility: hidden;
    }
    /* NOTE: this RTL override must stay MORE specific than the base .nav rule above,
       but the open-state rule below must in turn be more specific than this one —
       otherwise .is-open can never win the cascade and the drawer gets stuck. */
    html[dir="rtl"] .nav { right: 0; left: auto; transform: translateX(-105%); }
    html[dir="rtl"] .nav.is-open,
    .nav.is-open { transform: translateX(0); visibility: visible; }

    .nav-toggle { display: flex; position: relative; z-index: 92; }
    .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
    .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-backdrop {
        position: fixed; inset: 0; background: rgba(10, 27, 50, .45);
        z-index: 89; opacity: 0; visibility: hidden;
        transition: opacity .35s var(--ease), visibility .35s;
    }
    .nav-backdrop.is-open { opacity: 1; visibility: visible; }

    body.nav-locked { overflow: hidden; }
}

@media (max-width: 420px) {
    .header__inner { padding: 10px 16px; gap: 10px; }
    .brand__text { font-size: .95rem; }
    .header__actions { gap: 8px; }
    .header__actions .btn--sm { padding: 8px 14px; font-size: .8rem; }
}

/* =============================================
   Hero
============================================= */
.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,27,50,.55) 0%, rgba(10,27,50,.75) 55%, var(--navy-3) 100%);
}
.hero__content { position: relative; z-index: 2; padding: 140px 24px 120px; max-width: 760px; }
.hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; margin-bottom: 20px; }
.hero__title span { color: var(--gold-light); }
.hero__lede { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__dots { position: absolute; bottom: 28px; right: 50%; transform: translateX(50%); display: flex; gap: 10px; z-index: 2; }
.hero__dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.4); border: 0; padding: 0; transition: all .3s; }
.hero__dots button.is-active { background: var(--gold); width: 26px; border-radius: 6px; }

/* =============================================
   Stat bridge
============================================= */
.stat-bridge {
    margin-top: -64px;
    position: relative; z-index: 3;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: space-between;
    padding: 34px 40px;
    flex-wrap: wrap; gap: 24px;
}
.stat-bridge__item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 130px; }
.stat-bridge__num { font-family: 'Cairo'; font-weight: 900; font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--navy); }
.stat-bridge__label { font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.stat-bridge__div { width: 1px; height: 44px; background: rgba(15,39,72,.1); }
@media (max-width: 760px) { .stat-bridge__div { display: none; } .stat-bridge { justify-content: center; text-align: center; } }

/* =============================================
   About
============================================= */
.about { display: grid; grid-template-columns: .85fr 1fr; gap: 64px; align-items: center; }
.about__media { position: relative; }
.about__media img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow); }
.about__badge {
    position: absolute; bottom: -22px; left: -22px;
    background: var(--navy); color: var(--white);
    border-radius: var(--radius); padding: 16px 22px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow); font-family: 'Cairo';
}
.about__badge i { font-size: 1.6rem; color: var(--gold-light); }
.about__badge strong { display: block; font-size: 1.1rem; }
.about__badge span { font-size: .75rem; color: rgba(255,255,255,.7); }

.check-list { display: grid; gap: 14px; margin: 24px 0 32px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-family: 'Cairo'; font-weight: 600; color: var(--navy); font-size: .98rem; }
.check-list i { color: var(--teal); margin-top: 3px; }

@media (max-width: 860px) {
    .about { grid-template-columns: 1fr; }
    .about__badge { position: static; margin-top: -40px; margin-right: 20px; width: fit-content; }
}

/* =============================================
   Feature grid
============================================= */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--white); border-radius: var(--radius);
    padding: 32px 26px; box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-card__icon {
    width: 54px; height: 54px; border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold-light); display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 8px; }
.feature-card p { font-size: .92rem; margin: 0; }

@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* =============================================
   Tracks
============================================= */
.track-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.track-card {
    background: var(--white); border-radius: var(--radius);
    padding: 34px 26px; text-align: center;
    border-top: 4px solid var(--accent, var(--gold));
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.track-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.track-card__icon {
    width: 60px; height: 60px; margin: 0 auto 18px;
    border-radius: 50%; background: color-mix(in srgb, var(--accent, var(--gold)) 14%, white);
    color: var(--accent, var(--gold));
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.track-card h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; }
.track-card p { font-size: .92rem; margin: 0; }

@media (max-width: 860px) { .track-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .track-grid { grid-template-columns: 1fr; } }

/* =============================================
   Stages
============================================= */
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stage-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease); }
.stage-card:hover { transform: translateY(-6px); }
.stage-card__img { aspect-ratio: 4/3; overflow: hidden; }
.stage-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.stage-card:hover .stage-card__img img { transform: scale(1.06); }
.stage-card__body { padding: 22px 20px; }
.stage-card__body h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 8px; }
.stage-card__body p { font-size: .87rem; margin: 0; }

@media (max-width: 960px) { .stage-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stage-grid { grid-template-columns: 1fr; } }

/* =============================================
   Testimonials
============================================= */
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.voice-card { background: var(--white); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.voice-card__stars { color: var(--gold); font-size: .85rem; margin-bottom: 14px; letter-spacing: 2px; }
.voice-card p { color: var(--ink); font-size: .95rem; margin-bottom: 20px; }
.voice-card__author { display: flex; align-items: center; gap: 12px; }
.voice-card__avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--navy); color: var(--gold-light);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cairo'; font-weight: 800; flex-shrink: 0;
}
.voice-card__author strong { display: block; font-size: .92rem; color: var(--navy); }
.voice-card__author small { color: var(--ink-soft); font-size: .8rem; }

@media (max-width: 860px) { .voice-grid { grid-template-columns: 1fr; } }

/* =============================================
   CTA band
============================================= */
.cta-band { background: linear-gradient(120deg, var(--navy-3), var(--navy) 60%, var(--teal)); padding: 56px 0; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.75); margin: 0; }
.cta-band__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* =============================================
   Contact
============================================= */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__lede { max-width: 460px; }
.contact-list { display: grid; gap: 18px; margin: 26px 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-list i { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.contact-list strong { display: block; font-family: 'Cairo'; color: var(--navy); font-size: .92rem; margin-bottom: 2px; }
.contact-list a, .contact-list span { color: var(--ink-soft); font-size: .92rem; }
.contact-list a:hover { color: var(--gold); }

.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--navy); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, transform .25s;
}
.social-row a:hover { background: var(--gold); transform: translateY(-3px); }

.contact__form {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 36px; box-shadow: var(--shadow);
    display: grid; gap: 18px;
}
.form-row { display: grid; gap: 8px; }
.form-row label { font-family: 'Cairo'; font-weight: 700; font-size: .88rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
    border: 1.5px solid rgba(15,39,72,.14);
    border-radius: var(--radius-sm);
    padding: 12px 16px; font-family: 'Tajawal'; font-size: .95rem;
    background: var(--paper); color: var(--ink);
    transition: border-color .2s;
    resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--gold); outline: none; }
.form-note { font-size: .78rem; color: var(--ink-soft); text-align: center; margin: 0; }

@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* Map */
.map-card {
    position: relative;
    margin-top: 56px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 420px;
}
.map-card iframe { display: block; filter: grayscale(.15) contrast(1.02); }
.map-card__cta {
    position: absolute; bottom: 20px; right: 20px;
    background: var(--white); color: var(--navy);
    font-family: 'Cairo'; font-weight: 700; font-size: .88rem;
    padding: 12px 20px; border-radius: 100px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), background .25s;
}
.map-card__cta i { color: var(--gold); }
.map-card__cta:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.map-card__cta:hover i { color: var(--gold-light); }

@media (max-width: 560px) {
    .map-card { height: 320px; }
    .map-card__cta span { display: none; }
}

/* =============================================
   Footer
============================================= */
.site-footer { background: var(--navy-3); color: rgba(255,255,255,.72); padding-top: 64px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__brand img { width: 46px; height: 46px; }
.footer__brand span { font-family: 'Cairo'; font-weight: 800; color: var(--white); font-size: 1.05rem; }
.footer__brand p { font-size: .85rem; margin: 0; }
.footer__col h4 { font-family: 'Cairo'; color: var(--white); font-size: .95rem; margin-bottom: 18px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col a { font-size: .88rem; display: flex; align-items: center; gap: 8px; transition: color .2s; }
.footer__col a:hover { color: var(--gold-light); }
.footer__bottom { text-align: center; padding: 22px 0; font-size: .82rem; }

@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__inner { grid-template-columns: 1fr; } }

/* =============================================
   Back to top
============================================= */
.back-to-top {
    position: fixed; bottom: 26px; left: 26px; z-index: 80;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--navy); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }

/* =============================================
   Scroll reveal
============================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.from-right { transform: translateX(-32px); }
.reveal.from-left { transform: translateX(32px); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .18s; }
.reveal.delay-3 { transition-delay: .28s; }
