/* =========================================================
   Tholkappiyaa Tamil Phonics School — style.css
   Replaces style.css in full, including the header, gallery
   and account-dropdown blocks that were appended to the end.

   FONTS: the @import on line 1 of the old file is gone.
   Put these in <head>, BEFORE this stylesheet:

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Hind+Madurai:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap">
   ========================================================= */

/* =========================================================
   1. TOKENS
   ========================================================= */

:root {
    --blue:   #073f91;
    --blue2:  #082f6e;
    --teal:   #008e9a;
    --gold:   #f0b83d;
    --cream:  #fbf7ec;
    --ink:    #172033;
    --muted:  #647087;
    --white:  #fff;
    --line:   #e5e9f0;

    --shadow: 0 18px 50px rgba(10, 37, 84, .12);
    --radius: 20px;

    /* Manrope carries Latin, Hind Madurai carries Tamil.
       Manrope has no Tamil glyphs, so Tamil falls through to
       Hind Madurai automatically. */
    --font-ui: Manrope, "Hind Madurai", system-ui, sans-serif;
    --font-ta: "Hind Madurai", "Noto Sans Tamil", sans-serif;

    /* Tamil needs more leading than Latin: ெ ே ை sit above the
       x-height and ு ூ ஞ ழ hang below the baseline. */
    --lh-display: 1.45;
    --lh-heading: 1.4;
    --lh-body:    1.7;

    --header-h: 160px;
}

/* =========================================================
   2. BASE
   ========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-ui);
    line-height: var(--lh-body);

    /* Hind Madurai ships 300–700 only. Without this, any rule
       asking for 800 gets a synthesised bold that smears the
       loops in ழ ஞ ண. Nothing below asks for 800 any more. */
    font-synthesis: none;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

:focus-visible {
    outline: 3px solid rgba(0, 149, 168, .45);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 20px;
    background: #fff;
    color: var(--blue);
    font-weight: 700;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* =========================================================
   3. TOP BAR
   ========================================================= */

.topbar {
    background: var(--blue2);
    color: #dce8ff;
    font-size: 13px;
}

.topbar-inner {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar a:hover { color: var(--gold); }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.lang-switch {
    padding: 2px 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.7;
}
.lang-switch:hover { border-color: #fff; color: #fff; }

/* =========================================================
   4. HEADER — two rows on desktop, one row with a drawer below
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 4px 22px rgba(8, 47, 110, .08);
}

.nav-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    min-height: var(--header-h);
    padding: 14px 0 12px;
}

.brand {
    display: flex;
    align-items: center;
    align-self: flex-start;
    gap: 18px;
}

.brand img {
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    object-fit: contain;
    border-radius: 50%;
}

.brand span { display: flex; flex-direction: column; }

.brand strong {
    font-family: var(--font-ta);
    font-size: 23px;
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--blue);
}

.brand small {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
}

.main-nav > a {
    padding: 10px 16px;
    border-radius: 8px;
    white-space: nowrap;
}
.main-nav > a:hover { color: var(--teal); }

.main-nav > a[aria-current="page"] {
    color: var(--blue);
    background: #eef4fc;
}

.nav-login {
    padding: 10px 22px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--blue) !important;
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 26px;
    color: var(--blue);
    cursor: pointer;
}

/* =========================================================
   5. ACCOUNT DROPDOWN
   ========================================================= */

.account-menu { position: relative; margin-left: 8px; }

.account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(6, 63, 145, .18);
    transition: background-color .2s ease, box-shadow .2s ease;
}

.account-button:hover,
.account-button:focus-visible,
.account-menu.is-open .account-button {
    background: #0095a8;
    box-shadow: 0 7px 18px rgba(0, 149, 168, .22);
}

.account-icon { display: inline-flex; width: 20px; height: 20px; }

.account-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-arrow {
    margin-left: 2px;
    font-size: 12px;
    transition: transform .2s ease;
}
.account-menu.is-open .account-arrow { transform: rotate(180deg); }

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1500;
    width: 290px;
    padding: 9px;
    border: 1px solid #dbe6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 43, 67, .18);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.account-menu.is-open .account-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Supports the hidden attribute as well as the class, so either
   JS approach works. */
.account-dropdown[hidden] { display: none; }

.account-dropdown-heading {
    margin: 0;
    padding: 9px 11px 10px;
    border-bottom: 1px solid #edf2f5;
    color: #687b88;
    font-size: 12px;
    font-weight: 700;
}

.account-dropdown > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px;
    border-radius: 9px;
    color: #16364a;
    transition: color .18s ease, background-color .18s ease;
}

.account-dropdown > a:hover,
.account-dropdown > a:focus-visible {
    color: var(--blue);
    background: #eef8fa;
}

.role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #edf8fa;
    font-size: 18px;
}

.account-dropdown a > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-dropdown strong { font-size: 14px; line-height: 1.35; }

.account-dropdown small {
    color: #7a8b95;
    font-size: 11px;
    font-weight: 600;
}

.account-other {
    display: block;
    margin-top: 4px;
    padding: 10px 11px;
    border-top: 1px solid #edf2f5;
    color: #7a8b95;
    font-size: 12.5px;
    font-weight: 600;
}

/* =========================================================
   6. PAGE HERO (interior pages) + HOME HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, var(--cream) 0%, #fff 52%, #eaf8f8 100%);
}

.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -90px;
    width: 410px;
    height: 410px;
    border: 1px solid rgba(240, 184, 61, .35);
    border-radius: 50%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    gap: 70px;
    min-height: 680px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--teal);
}

.hero h1 {
    margin: 15px 0 20px;
    font-family: var(--font-ta);
    font-size: clamp(38px, 4.6vw, 60px);
    font-weight: 700;
    line-height: var(--lh-display);
    color: var(--blue2);
}

.hero-copy > p {
    max-width: 650px;
    font-size: 17px;
    color: var(--muted);
}

.hero-actions { display: flex; gap: 14px; margin: 30px 0; }

.trust-row {
    display: flex;
    gap: 22px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.hero-emblem { position: relative; text-align: center; }

.emblem-ring {
    width: min(470px, 100%);
    aspect-ratio: 1;
    margin: auto;
    padding: 25px;
    border: 1px solid rgba(240, 184, 61, .5);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
}

.emblem-ring img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.page-hero {
    padding: 80px 0;
    background: linear-gradient(120deg, var(--blue2), var(--blue));
    color: #fff;
}
.page-hero.teal { background: linear-gradient(120deg, #006d77, var(--teal)); }

.page-hero h1 {
    margin: 8px 0;
    font-family: var(--font-ta);
    font-size: clamp(32px, 3.6vw, 46px);
    font-weight: 700;
    line-height: var(--lh-display);
}
.page-hero p { color: #dce6fa; }

/* =========================================================
   7. BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-gold    { background: var(--gold); color: #152441; box-shadow: 0 8px 22px rgba(240, 184, 61, .27); }
.btn-outline { border: 1px solid var(--blue); color: var(--blue); }
.btn-blue    { background: var(--blue); color: #fff; }
.btn-light   { background: #eff3f9; color: var(--blue); }
.full        { width: 100%; }

/* =========================================================
   8. SECTIONS & HEADINGS
   ========================================================= */

.section { padding: 92px 0; }
.soft-bg  { background: #f5f9fc; }

.section-heading {
    max-width: 720px;
    margin: 0 auto 45px;
    text-align: center;
}

.section-heading h2,
.two-column h2 {
    margin: 8px 0;
    font-family: var(--font-ta);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--blue2);
}

.section-heading p { color: var(--muted); }

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    max-width: none;
    text-align: left;
}
.split-heading > a { color: var(--teal); font-weight: 700; }

/* =========================================================
   9. CARDS
   ========================================================= */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.feature-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: #b9dfe2;
    box-shadow: var(--shadow);
}

.feature-no { float: right; color: #c7d5ea; font-weight: 700; }

.feature-card h3 {
    margin: 0;
    font-family: var(--font-ta);
    font-size: 26px;
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--blue);
}
.feature-card strong { color: var(--teal); }
.feature-card p { margin-bottom: 0; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.content-card,
.empty-card,
.news-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 26px rgba(8, 47, 110, .05);
}

.content-card h2,
.content-card h3 {
    font-family: var(--font-ta);
    font-size: 24px;
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--blue2);
}
.content-card p { color: var(--muted); }

.pill {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: #e5f7f6;
    color: #087c84;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.card-foot strong { color: var(--blue); font-size: 19px; }
.card-foot a { color: var(--teal); font-weight: 700; }

/* =========================================================
   10. TWO-COLUMN, STORIES, PORTALS
   ========================================================= */

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
}

.story-row {
    display: grid;
    grid-template-columns: 65px 1fr 20px;
    gap: 15px;
    padding: 19px 0;
    border-bottom: 1px solid var(--line);
}
.story-row span { color: var(--teal); font-size: 12px; font-weight: 700; }
.story-row:hover strong { color: var(--teal); }

.portal-panel {
    padding: 45px;
    border-radius: 28px;
    background: linear-gradient(145deg, var(--blue2), var(--blue));
    color: #fff;
    box-shadow: var(--shadow);
}
.portal-panel h2 { color: #fff; }
.portal-panel p  { color: #cddcf7; }
.light { color: #ccebea; }

.portal-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.portal-links a {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 10px;
}
.portal-links a:hover { background: var(--teal); }

/* =========================================================
   11. HOME GALLERY / CLASSES / REVIEWS
   ========================================================= */

.home-gallery-section { padding: 80px 0; background: #f8fbfd; }

.home-three-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.ios-card {
    padding: 24px;
    border: 1px solid #eef2f5;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .06);
    transition: transform .3s ease;
}
.ios-card:hover { transform: translateY(-6px); }

.card-title {
    margin-bottom: 20px;
    color: #0b7f83;
    font-weight: 700;
    letter-spacing: 1px;
}

.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }

.gallery-grid img {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: transform .3s ease;
}
.gallery-grid img:hover { transform: scale(1.05); }

.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: #f2f7fb;
    font-weight: 700;
}

.class-item { display: flex; gap: 15px; margin-bottom: 18px; }
.class-item h4 { margin: 0; font-size: 15px; line-height: var(--lh-heading); }
.class-item p  { margin: 4px 0 0; color: #777; font-size: 13px; }

.ios-button {
    display: block;
    margin-top: 20px;
    padding: 12px;
    border: 1px solid #0b7f83;
    border-radius: 12px;
    color: #0b7f83;
    font-weight: 700;
    text-align: center;
}

.gallery-tabs { display: flex; gap: 10px; margin-bottom: 15px; }

.gallery-tabs button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font: inherit;
    cursor: pointer;
}
.gallery-tabs .active { background: #0b7f83; color: #fff; border-color: #0b7f83; }

.review-box { padding: 20px; text-align: center; }
.review-box p { margin: 20px 0; font-style: italic; line-height: 1.8; }

/* =========================================================
   12. NEWS & ARTICLES
   ========================================================= */

.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }

.news-card time { color: var(--teal); font-size: 12px; font-weight: 700; }

.news-card h2 {
    font-family: var(--font-ta);
    font-size: 26px;
    font-weight: 700;
    line-height: var(--lh-heading);
    color: var(--blue2);
}
.news-card > div { display: flex; gap: 20px; color: var(--teal); font-weight: 700; }

.article-page { max-width: 850px; margin: 75px auto; padding: 0 25px; }

.article-page h1 {
    font-family: var(--font-ta);
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 700;
    line-height: var(--lh-display);
    color: var(--blue2);
}
.article-page header > p { font-size: 19px; color: var(--muted); }

.share-row { display: flex; gap: 12px; margin: 25px 0 40px; }

.share-row a,
.share-row button {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--teal);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.article-content {
    font-family: var(--font-ta);
    font-size: 18px;
    line-height: 1.85;   /* long-form Tamil needs the most leading */
}

/* =========================================================
   13. FORMS
   ========================================================= */

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.contact-grid h2 { color: var(--blue2); font-size: 34px; line-height: var(--lh-heading); }

.contact-form,
.login-card form,
.admin-form { display: flex; flex-direction: column; gap: 15px; }

.contact-form label,
.login-card label,
.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #455067;
    font-size: 13px;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8dee9;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--teal);
    outline: 2px solid rgba(0, 142, 154, .2);
}

.login-section {
    display: flex;
    justify-content: center;
    min-height: 680px;
    padding: 65px 20px;
    background: linear-gradient(140deg, #eff8f8, var(--cream));
}

.login-card {
    width: min(460px, 100%);
    padding: 38px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}
.login-card > img { width: 120px; height: 120px; object-fit: contain; border-radius: 50%; }
.login-card h1 { margin: 7px; font-size: 30px; line-height: var(--lh-heading); color: var(--blue2); }
.login-card > p { color: var(--muted); }
.login-card form { margin: 25px 0; text-align: left; }
.login-card small { color: var(--muted); }
.login-card small a { color: var(--teal); font-weight: 700; }

.alert { margin: 12px 0; padding: 13px 16px; border-radius: 9px; }
.alert.error   { background: #ffeded; color: #a82b2b; }
.alert.success { background: #e6f8ed; color: #237a42; }

/* =========================================================
   14. FOOTER
   ========================================================= */

.site-footer { padding-top: 65px; background: #061f49; color: #c9d5e9; }

.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 50px; }
.footer-grid section { display: flex; flex-direction: column; align-items: flex-start; }
.footer-grid h3 { color: #fff; line-height: var(--lh-heading); }
.footer-grid a { margin: 5px 0; }
.footer-grid a:hover,
.gold-link { color: var(--gold); }

.footer-logo {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.copyright {
    margin-top: 55px;
    padding: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
    font-size: 12px;
}

/* =========================================================
   15. ADMIN
   ========================================================= */

.admin-body  { background: #f1f5fa; }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 255px;
    padding: 18px 15px;
    background: #071f49;
    color: #ced9ee;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 5px 7px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.admin-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: contain; }
.admin-brand span { display: flex; flex-direction: column; }
.admin-brand strong { color: #fff; }
.admin-brand small { color: var(--gold); font-size: 10px; text-transform: uppercase; }

.admin-sidebar nav { display: flex; flex-direction: column; gap: 3px; margin-top: 18px; }

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.admin-sidebar nav a span { width: 20px; text-align: center; color: #77cbd0; }
.admin-sidebar nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.admin-main { width: calc(100% - 255px); margin-left: 255px; }

.admin-top {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 92px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.admin-top h1 { margin: 0; font-size: 22px; line-height: var(--lh-heading); color: var(--blue2); }
.admin-top p  { margin: 2px 0; color: var(--muted); font-size: 11px; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 700;
}
.user-chip div { display: flex; flex-direction: column; }
.user-chip strong { font-size: 12px; }
.user-chip a { color: #b12e2e; font-size: 10px; }

.admin-menu { display: none; border: 0; background: none; font-size: 23px; cursor: pointer; }
.admin-content { padding: 28px; }

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 38px;
    border-radius: 20px;
    background: linear-gradient(115deg, var(--blue2), var(--blue), var(--teal));
    color: #fff;
}
.welcome-panel h2 { margin: 6px 0; font-size: 26px; line-height: var(--lh-heading); }
.welcome-panel p  { margin: 0; color: #d9e6fb; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0; }

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 14px;
    border-left: 4px solid var(--blue);
    background: #fff;
    box-shadow: 0 5px 18px rgba(10, 37, 84, .05);
}
.stat-card > span { font-size: 28px; font-weight: 700; color: var(--blue2); }
.stat-card strong { font-size: 13px; }
.stat-card small  { margin-top: 8px; color: var(--muted); }

.stat-card.teal   { border-color: var(--teal); }
.stat-card.gold   { border-color: var(--gold); }
.stat-card.purple { border-color: #7453b8; }
.stat-card.orange { border-color: #ef8839; }
.stat-card.green  { border-color: #41a868; }
.stat-card.red    { border-color: #d34d4d; }
.stat-card.navy   { border-color: #132f5d; }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; }

.admin-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(10, 37, 84, .04);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.panel-title h2 { margin: 0; font-size: 20px; line-height: var(--lh-heading); color: var(--blue2); }
.panel-title p  { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-grid a {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}
.quick-grid a:hover { border-color: var(--teal); color: var(--teal); }

.status-list { margin: 0; padding: 0; list-style: none; }
.status-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.status-list b  { color: #26834a; }
.status-list em { color: #b47a10; }

.table-tools { display: flex; gap: 8px; max-width: 450px; margin-bottom: 18px; }
.table-scroll { overflow: auto; }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
    padding: 11px;
    background: #f3f6fa;
    color: #526079;
    text-align: left;
    white-space: nowrap;
}
td { padding: 12px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:hover { background: #fbfcfe; }

.actions { display: flex; gap: 10px; }
.actions a,
.actions button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--teal);
    font: inherit;
    cursor: pointer;
}
.actions button { color: #b43636; }
.actions form { margin: 0; }

.no-data { padding: 40px; color: var(--muted); text-align: center !important; }

.pagination { display: flex; gap: 5px; margin-top: 18px; }
.pagination a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.pagination a.active { background: var(--blue); color: #fff; }

.form-panel { max-width: 1000px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .wide { grid-column: 1 / -1; }

.image-help {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.banner-preview {
    width: 150px;
    height: 66px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.current-image { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11px; }
.current-image label { flex-direction: row !important; align-items: center; }
.current-image input[type="checkbox"] { width: auto; }

/* =========================================================
   16. TABLET  (681–1000px)
   ========================================================= */

@media (max-width: 1000px) {
    :root { --header-h: 96px; }

    .nav-wrap {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .brand { align-self: center; gap: 12px; }
    .brand img { width: 72px; height: 72px; }
    .brand strong { font-size: 19px; }

    .menu-toggle { display: block; }

    /* The old file set .main-nav{display:none} at 0,1,0 while an
       appended .site-header .main-nav{display:flex} at 0,2,0 won,
       so the drawer was permanently open between 681 and 1000px. */
    .main-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        z-index: 1000;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open,
    .main-nav.open { display: flex; }

    .main-nav > a { width: 100%; padding: 14px 20px; }

    .hero-grid { grid-template-columns: 1fr; min-height: auto; padding: 80px 0; }
    .hero-emblem { display: none; }

    .feature-grid,
    .card-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }

    .admin-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .admin-sidebar.open { transform: none; }
    .admin-main { width: 100%; margin-left: 0; }
    .admin-menu { display: block; }
    .admin-top { padding: 0 18px; }
    .admin-content { padding: 18px; }
}

@media (max-width: 992px) {
    .home-three-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   17. MOBILE  (≤680px)
   ========================================================= */

@media (max-width: 680px) {
    :root { --header-h: 82px; }

    .container { width: min(100% - 28px, 1180px); }

    .brand img { width: 60px; height: 60px; }
    .brand span { display: none; }

    .hero-grid { padding: 60px 0; }
    .hero h1 { font-size: 33px; line-height: 1.42; }
    .hero-actions,
    .trust-row { flex-direction: column; align-items: stretch; }

    .section { padding: 65px 0; }

    .feature-grid,
    .card-grid,
    .news-grid,
    .two-column,
    .contact-grid,
    .footer-grid { grid-template-columns: 1fr; }

    .split-heading { flex-direction: column; align-items: flex-start; gap: 18px; }
    .section-heading h2,
    .two-column h2 { font-size: 28px; }

    .portal-links { grid-template-columns: 1fr; }

    .page-hero { padding: 55px 0; }
    .page-hero h1 { font-size: 31px; }
    .article-page h1 { font-size: 29px; }
    .share-row { flex-wrap: wrap; }

    /* Account menu becomes a full-width row inside the drawer. */
    .account-menu { width: 100%; margin: 0; }

    .account-button {
        justify-content: flex-start;
        width: 100%;
        padding: 14px 20px;
        border-radius: 0;
        box-shadow: none;
    }
    .account-arrow { margin-left: auto; }

    .account-dropdown {
        position: static;
        display: none;
        width: 100%;
        padding: 6px 12px 12px;
        border: 0;
        border-radius: 0;
        background: #f7fafc;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }
    .account-menu.is-open .account-dropdown { display: block; }

    .admin-top h1 { font-size: 18px; }
    .user-chip div { display: none; }
    .welcome-panel { display: block; padding: 25px; }
    .welcome-panel .btn { margin-top: 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 16px; }
    .quick-grid,
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .panel-title { align-items: flex-start; gap: 14px; }
    .admin-panel { padding: 17px; }
}

/* =========================================================
   18. MOTION & PRINT
   ========================================================= */

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

@media print {
    .topbar,
    .site-header,
    .site-footer,
    .share-row { display: none !important; }

    .article-page { max-width: none; margin: 0; }
    .article-content { color: #000; font-size: 12pt; }
    
    
    /* Learning Methods heading — smaller and centred */
.learning-section .section-heading h2 {
    width: 100%;
    max-width: 850px;
    margin: 10px auto 14px !important;

    font-size: 34px !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}

/* Tablet */
@media (max-width: 900px) {
    .learning-section .section-heading h2 {
        font-size: 30px !important;
    }
}

/* Mobile */
@media (max-width: 680px) {
    .learning-section .section-heading h2 {
        padding: 0 15px;
        font-size: 25px !important;
        line-height: 1.4 !important;
    }
}
}

/* =========================================================
   LEARNING SECTION HEADING — FINAL
========================================================= */

.learning-section .section-heading {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 42px;
    padding: 0 24px;
    box-sizing: border-box;
    text-align: center;
}

.learning-section .section-heading .eyebrow {
    display: block;
    margin: 0 0 12px;

    color: #008f9c;
    font-family: "Hind Madurai", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.learning-section .section-heading h2 {
    width: 100%;
    max-width: 820px;
    margin: 0 auto 16px !important;
    padding: 0;

    color: #073f91;
    font-family: "Hind Madurai", sans-serif;
    font-size: clamp(28px, 2.5vw, 38px) !important;
    font-weight: 700;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-align: center !important;

    word-break: normal;
    overflow-wrap: normal;
    text-wrap: balance;
}

.learning-section .section-heading h2::after {
    content: "";
    display: block;
    width: 58px;
    height: 3px;
    margin: 15px auto 0;

    border-radius: 10px;
    background: linear-gradient(90deg, #0097a7, #e4b342);
}

.learning-section .section-heading p {
    max-width: 720px;
    margin: 0 auto;

    color: #64758b;
    font-family: "Hind Madurai", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    text-align: center;
}

/* Tablet */

@media (max-width: 900px) {
    .learning-section .section-heading h2 {
        max-width: 700px;
        font-size: 32px !important;
    }
}

/* Mobile */

@media (max-width: 680px) {
    .learning-section .section-heading {
        margin-bottom: 32px;
        padding: 0 20px;
    }

    .learning-section .section-heading .eyebrow {
        font-size: 12px;
    }

    .learning-section .section-heading h2 {
        max-width: 360px;
        font-size: 25px !important;
        line-height: 1.5 !important;
    }

    .learning-section .section-heading p {
        max-width: 390px;
        font-size: 15px;
        line-height: 1.7;
    }
}

/* Small mobile */

@media (max-width: 420px) {
    .learning-section .section-heading h2 {
        max-width: 320px;
        font-size: 22px !important;
    }

    .learning-section .section-heading p {
        font-size: 14px;
    }
}