/* =====================================================================
   Expert Educare — Modern Design System (theme.css)
   One font (Poppins), brand tokens, consistent spacing & components.
   ===================================================================== */

:root {
    /* Brand */
    --brand:        #403782;   /* indigo/purple */
    --brand-dark:   #2c2560;
    --brand-light:  #efedf7;
    --accent:       #f67812;   /* orange */
    --accent-dark:  #d9660a;

    /* Neutrals */
    --ink:          #1c1b2e;
    --body:         #4a4a5a;
    --muted:        #7a7a8c;
    --line:         #e7e7ef;
    --bg:           #ffffff;
    --bg-soft:      #f7f7fb;

    /* System */
    --radius:       16px;
    --radius-sm:    10px;
    --shadow:       0 10px 30px rgba(28,27,46,.08);
    --shadow-lg:    0 20px 50px rgba(28,27,46,.14);
    --container:    1160px;
    --gutter:       clamp(1.25rem, 4vw, 2rem);
    --section-y:    clamp(3.5rem, 7vw, 6rem);
    --font:         'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--body);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* contain the off-canvas mobile drawer so it can't push the page wide */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5 { font-family: var(--font); color: var(--ink); line-height: 1.2; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { margin: 0 0 1rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--brand { background: var(--brand); color: #fff; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }

.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
.section-head { max-width: 720px; margin: 0 auto clamp(2rem,4vw,3rem); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.text-accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--body); }

/* ---------- Buttons ---------- */
.btn2 {
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
    font-family: var(--font); font-weight: 600; font-size: 1rem; line-height: 1;
    padding: .9rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s; white-space: nowrap;
}
.btn2:hover { transform: translateY(-2px); }
.btn2--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(246,120,18,.35); }
.btn2--primary:hover { background: var(--accent-dark); color: #fff; }
.btn2--brand { background: var(--brand); color: #fff; }
.btn2--brand:hover { background: var(--brand-dark); color: #fff; }
.btn2--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn2--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn2--light { background: #fff; color: var(--brand); }
.btn2--light:hover { background: var(--brand-light); color: var(--brand); }
.btn2--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

/* ---------- Navbar ---------- */
/* z-index 1002 keeps the header (and the drawer nested inside it) above the backdrop (1001),
   so the open menu is bright & clickable while only the main page dims. No backdrop-filter:
   it created a stacking context + containing block that trapped the fixed drawer under the backdrop. */
.site-header { position: sticky; top: 0; z-index: 1002; background: #fff; border-bottom: 1px solid var(--line); }
.navbar2 { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.15rem; }
.navbar2 .brand img { height: 56px; width: auto; }
/* Desktop: brand | links (fill/center) | actions — all on one row */
.nav-collapse { display: flex; align-items: center; flex: 1; gap: 1.25rem; margin-left: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0 auto 0 0; padding: 0; }
.nav-links a { display: block; padding: .5rem .8rem; border-radius: 8px; color: var(--ink);
    font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav-links a:hover { background: var(--brand-light); color: var(--brand); }
.nav-links a.active { color: var(--brand); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav-actions .btn2 { padding: .6rem 1rem; font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--brand); cursor: pointer; }
@media (max-width: 991px) {
    .nav-toggle { display: block; }
    .nav-collapse { position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh;
        width: min(320px, 84vw); background: #fff;
        transform: translateX(100%); transition: transform .3s; box-shadow: var(--shadow-lg);
        padding: 5rem 1.5rem 2rem; margin-left: 0; flex: none; display: flex; flex-direction: column;
        align-items: stretch; gap: 1rem; overflow-y: auto; z-index: 1002; }
    .nav-collapse.open { transform: translateX(0); }
    .nav-links { flex-direction: column; align-items: stretch; gap: .25rem; margin: 0; }
    .nav-links a { padding: .8rem 1rem; }
    .nav-actions { flex-direction: column; align-items: stretch; }
    .nav-actions .btn2 { justify-content: center; }
    .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden;
        transition: .3s; z-index: 1001; }
    .nav-backdrop.open { opacity: 1; visibility: visible; }
    .nav-close { position: absolute; top: 1.2rem; right: 1.3rem; background: none; border: 0;
        font-size: 1.8rem; color: var(--ink); cursor: pointer; }
}
@media (min-width: 992px) { .nav-close { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(246,120,18,.35), transparent 70%); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem,5vw,4rem); align-items: center; padding-block: clamp(3rem,7vw,5.5rem); }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hero-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.hero-pills span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; }
@media (max-width: 860px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin-inline: auto; }
    .hero-cta, .hero-pills { justify-content: center; }
    .hero-media { order: -1; }
}

/* ---------- Home hero slider ---------- */
.hslider { position: relative; overflow: hidden; background: var(--brand-dark); margin-top: 18px; }
.hslider__track { display: flex; transition: transform .6s ease; }
.hslider__slide { min-width: 100%; }
.hslider__slide img { width: 100%; height: auto; display: block; }
.hslider__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    background: rgba(0,0,0,.32); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%;
    cursor: pointer; font-size: 1.5rem; display: grid; place-items: center; transition: background .2s; }
.hslider__arrow:hover { background: var(--accent); }
.hslider__arrow.prev { left: 16px; } .hslider__arrow.next { right: 16px; }
.hslider__dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 2;
    display: flex; justify-content: center; gap: 8px; }
.hslider__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.55); cursor: pointer; transition: all .2s; }
.hslider__dots button.active { background: #fff; width: 26px; border-radius: 6px; }
@media (max-width: 640px) { .hslider__arrow { width: 36px; height: 36px; font-size: 1.2rem; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card2 { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s; }
.card2:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card2__body { padding: 1.6rem; flex: 1; }
.card2__icon { width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center;
    background: var(--brand-light); color: var(--brand); font-size: 1.6rem; margin-bottom: 1rem; }
.card2 h3 { margin-bottom: .6rem; }
.card2 p { color: var(--body); font-size: .96rem; margin: 0; }
.card2__foot { padding: 1rem 1.6rem; border-top: 1px solid var(--line); }
.card2__foot a { font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; text-align: center; }
.stats .num { font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 700; color: #fff; line-height: 1; }
.stats .lbl { color: rgba(255,255,255,.8); font-size: .95rem; margin-top: .4rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2,1fr); gap: 2rem 1rem; } }

/* Testimonials */
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.8rem; height: 100%; }
.tcard .quote { color: var(--body); font-size: .98rem; font-style: italic; }
.tcard .who { display: flex; align-items: center; gap: .85rem; margin-top: 1.25rem; padding-top: 1.25rem;
    border-top: 1px solid var(--line); }
.tcard .who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.tcard .who .ini { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-weight: 600; font-size: 1.05rem;
    background: var(--brand); color: #fff; }
.tcard .who .ini--accent { background: var(--accent); }
.tcard .who h5 { margin: 0; font-size: 1rem; }
.tcard .who span { color: var(--muted); font-size: .85rem; }

/* ---------- Gallery (responsive grid + lightbox) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-grid a { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3;
    box-shadow: var(--shadow); position: relative; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.07); }
.lightbox { position: fixed; inset: 0; background: rgba(10,10,20,.92); display: none; place-items: center;
    z-index: 2000; padding: 1.5rem; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close, .lightbox .lb-nav { position: absolute; background: rgba(255,255,255,.15); color: #fff;
    border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-close { top: 1.2rem; right: 1.2rem; }
.lightbox .lb-nav.prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-nav.next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-nav:hover, .lightbox .lb-close:hover { background: var(--accent); }

/* ---------- Page banner (for interior pages) ---------- */
.page-banner { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
    text-align: center; padding-block: clamp(2.5rem,6vw,4rem); }
.page-banner h1 { color: #fff; margin-bottom: .5rem; }
.page-banner p { color: rgba(255,255,255,.8); margin: 0; }
.crumbs { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: .75rem; }
.crumbs a { color: rgba(255,255,255,.9); }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); }
.field input, .field textarea, .field select {
    width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 1rem; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus {
    outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(64,55,130,.12); }

/* ---------- Media rows ---------- */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,3.5rem); align-items: center; }
.media-row img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.media-row.reverse .media-row__text { order: 2; }
@media (max-width: 800px) { .media-row, .media-row.reverse .media-row__text { grid-template-columns: 1fr; order: 0; } }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff;
    border-radius: var(--radius); padding: clamp(2rem,5vw,3.2rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 55ch; margin: 0 auto 1.5rem; }

/* Blog */
.blog-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius);
    overflow:hidden; box-shadow: var(--shadow); display:flex; flex-direction:column; transition: transform .2s, box-shadow .2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card__img { aspect-ratio: 16/10; overflow: hidden; }
.blog-card__img img { width:100%; height:100%; object-fit: cover; }
.blog-card__body { padding: 1.4rem; flex:1; display:flex; flex-direction:column; }
.blog-card .date { font-size:.8rem; color: var(--muted); margin-bottom:.4rem; }
.blog-card h3 { font-size:1.15rem; margin-bottom:.5rem; }
.blog-card h3 a { color: var(--ink); }
.blog-card h3 a:hover { color: var(--brand); }
.blog-card p { font-size:.92rem; color: var(--body); }
.article { max-width: 760px; margin-inline: auto; }
.article img { border-radius: var(--radius); margin: 1.5rem 0; }
.article h1,.article h2,.article h3 { margin-top: 1.6rem; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding-top: clamp(3rem,6vw,4.5rem); }
.site-footer h4 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 3rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-social { display: flex; gap: .75rem; margin-top: 1rem; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1);
    display: grid; place-items: center; color: #fff; font-size: 1.1rem; }
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.3rem; text-align: center;
    font-size: .85rem; color: rgba(255,255,255,.55); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utilities */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.text-center{text-align:center}
.floating-book { position: fixed; right: 1rem; bottom: 1rem; z-index: 900; box-shadow: var(--shadow-lg); }
@media (min-width: 992px) { .floating-book { display: none; } }
