/* --- Modern Design System & Variables --- */
:root {
    --primary: #2563eb; /* Professional Royal Blue */
    --primary-dark: #1d4ed8;
    --secondary: #0ea5e9; /* Light Accent Blue */
    --text-main: #1e293b; /* Deep slate */
    --text-muted: #64748b; /* Muted slate */
    --bg-body: #f8fafc;
    --white: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Modern Header Setup (Logo Left, Menu Right) --- */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

/* Logo Left */
.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0f172a;
}

/* Institutional brand logos (Ambala main + Haryana apex mark) */
.logo-group .brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
    flex-shrink: 0;
}

.affiliate-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    padding-left: 1.5rem;
    margin-left: -0.75rem;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
}

@media (max-width: 480px) {
    .logo-group .brand-logo { width: 58px; height: 58px; }
    .affiliate-logo { height: 52px; padding-left: 0.85rem; margin-left: 0; }
}

/* Menu Right */
.menu-wrapper {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Animated underline effect for menu items */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.header-btn {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.header-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/* --- Seasonal links shown but not yet active --- */
.nav-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #b6c0cf;
    cursor: not-allowed;
    user-select: none;
}

.soon-tag {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    line-height: 1.5;
}

/* "Registration · Children's Day" in the main menu */
.nav-reg-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.nav-event-tag {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #c2410c;
    background: #ffedd5;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    line-height: 1.5;
}

/* Footer sits on a dark panel, so the muted tone has to go the other way */
.footer-col .nav-disabled { font-size: 0.9rem; color: #64748b; }
.footer-col .soon-tag { color: #cbd5e1; background: rgba(148, 163, 184, 0.16); }

.btn-disabled {
    display: inline-flex;
    align-items: center;
    cursor: not-allowed;
    opacity: 0.62;
    box-shadow: none;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* --- Mobile nav drawer --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #0f172a;
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle:hover span { background: var(--primary); }

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Signed-in headers carry an account link, a Logout button and (for admins) an
   Admin Panel item, so the row runs out of room ~300px earlier than a public one.
   Two thresholds, same drawer — keep the rule bodies below in sync. */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .menu-wrapper { gap: 1rem; }

    /* The signed-in account link lives in its own .nav-links list */
    .nav-links { display: none; }

    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
        background: var(--white);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 18px 30px -18px rgba(15, 23, 42, 0.25);
    }

    .primary-nav.is-open { display: flex; }
    .primary-nav li { width: 100%; }

    .primary-nav a,
    .primary-nav .nav-disabled {
        display: flex;
        width: 90%;
        margin: 0 auto;
        padding: 0.85rem 0.25rem;
        font-size: 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .primary-nav a::after { display: none; }
}

@media (max-width: 1400px) {
    body.is-authed .nav-toggle { display: flex; }
    body.is-authed .menu-wrapper { gap: 1rem; }
    body.is-authed .nav-links { display: none; }

    body.is-authed .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
        background: var(--white);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 18px 30px -18px rgba(15, 23, 42, 0.25);
    }

    body.is-authed .primary-nav.is-open { display: flex; }
    body.is-authed .primary-nav li { width: 100%; }

    body.is-authed .primary-nav a,
    body.is-authed .primary-nav .nav-disabled {
        display: flex;
        width: 90%;
        margin: 0 auto;
        padding: 0.85rem 0.25rem;
        font-size: 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    body.is-authed .primary-nav a::after { display: none; }
}

/* An account name is user data — it must not be able to stretch the header */
.menu-wrapper .nav-links:not(.primary-nav) a {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* --- Premium Hero Slider --- */
.slider-wrapper {
    position: relative;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
}

.slider {
    display: flex;
    width: 300%;
    height: 100%;
    animation: slideAnimation 16s infinite cubic-bezier(0.77, 0, 0.175, 1);
}

.slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

/* Premium overlays for modern cinematic look */
.slide1 { background-image: linear-gradient(to right, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.45)), url('/images/programmes/children-day-3.jpg'); }
.slide2 { background-image: linear-gradient(to right, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.45)), url('/images/programmes/nayaab-1.jpg'); }
.slide3 { background-image: linear-gradient(to right, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.45)), url('/images/programmes/children-day-1.jpg'); }

.slide-content {
    color: var(--white);
    max-width: 650px;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -1.5px;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.85);
}

@keyframes slideAnimation {
    0%, 28% { transform: translateX(0); }
    33%, 61% { transform: translateX(-33.33%); }
    66%, 95% { transform: translateX(-66.66%); }
    100% { transform: translateX(0); }
}

/* --- Global Sections Architecture --- */
section {
    padding: 7rem 0;
}

.section-header {
    max-width: 600px;
    margin-bottom: 4rem;
}

.section-tag {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0f172a;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- About Section (Modern Asymmetrical Layout) --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.about-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #0f172a;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-features {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: #334155;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* --- Services Section (Minimalist & Clean) --- */
.services-section {
    background-color: var(--white);
    border-top: 1px solid #f1f5f9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-body);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.service-card:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.01);
    border-color: rgba(37, 99, 235, 0.15);
}

.service-card-icon {
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.service-card:hover .service-card-icon {
    background: var(--primary);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.975rem;
}

/* --- Premium Minimal Footer --- */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3.5rem 0;
    border-top: 1px solid #1e293b;
    font-size: 0.95rem;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-weight: 700;
    color: var(--white);
}

/* --- Media Queries for Perfect Responsiveness --- */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4.5rem;
    }
    .slide-content h1 {
        font-size: 2.75rem;
    }
    .footer-flex {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        height: 60vh;
    }
    .slide-content h1 {
        font-size: 2.25rem;
    }
    section {
        padding: 4.5rem 0;
    }
}

/* --- Auth Pages (Login / Register / Manage) --- */
.logout-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.logout-form .header-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.auth-main {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 45%),
        var(--bg-body);
}

.auth-card {
    background: var(--white);
    max-width: 460px;
    margin: 0 auto;
    padding: 3rem 2.75rem;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.auth-card h1,
.auth-card h2 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.auth-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.auth-card hr {
    display: none;
}

.auth-card label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.auth-card .form-control,
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-card .form-floating > label {
    color: var(--text-muted);
}

.auth-card .btn-primary,
.auth-card button[type="submit"]:not(.header-btn) {
    width: 100%;
    background-color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.auth-card .btn-primary:hover,
.auth-card button[type="submit"]:not(.header-btn):hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-card a {
    color: var(--primary);
    font-weight: 600;
}

.auth-card a:hover {
    text-decoration: underline;
}

/* The rule above outranks .btn-login's own colour, which painted these
   anchor-styled buttons blue-on-blue. */
.auth-card a.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    color: var(--white);
}

.auth-card a.btn-login:hover {
    color: var(--white);
    text-decoration: none;
}

.auth-card .text-danger,
.auth-card .validation-summary-errors {
    color: #dc2626;
    font-size: 0.85rem;
}

/* =====================================================
   Modern Split-Screen Login Page
   ===================================================== */
.auth-page-body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-body);
}

.login-split {
    display: flex;
    min-height: 100vh;
}

/* --- Left: Brand Panel --- */
.login-brand {
    flex: 1.05;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3.25rem;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.55), transparent 42%),
        linear-gradient(150deg, #1d4ed8 0%, #2563eb 45%, #0f172a 100%);
}

.login-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.login-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.login-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.login-brand-mid {
    position: relative;
    z-index: 2;
    max-width: 420px;
}

.login-brand-mid h2 {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin-bottom: 1.25rem;
}

.login-brand-mid > p {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 2.25rem;
    line-height: 1.6;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.lb-check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.login-brand-bottom {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
}

.login-glow-1 {
    width: 320px;
    height: 320px;
    background: rgba(14, 165, 233, 0.35);
    top: -80px;
    right: -60px;
}

.login-glow-2 {
    width: 260px;
    height: 260px;
    background: rgba(37, 99, 235, 0.4);
    bottom: -90px;
    left: -70px;
}

/* --- Right: Form Panel --- */
.login-form-panel {
    flex: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: var(--white);
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
}

.login-back {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.login-back:hover {
    color: var(--primary);
}

.login-mobile-logo {
    display: none;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 1.75rem;
}

.login-mobile-logo .login-brand-mark {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--white);
    width: 38px;
    height: 38px;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.login-alert:not(:empty) {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.login-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.form-field {
    margin-bottom: 1.35rem;
}

.form-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-ic {
    position: absolute;
    left: 1rem;
    font-size: 1rem;
    opacity: 0.55;
    pointer-events: none;
}

.field-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-size: 0.97rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-body);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: var(--transition);
    outline: none;
}

.field-input::placeholder {
    color: #94a3b8;
}

.field-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.pw-toggle {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
}

.pw-toggle:hover {
    color: var(--primary);
}

.field-msg {
    display: block;
    color: #dc2626;
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.form-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.check-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    margin: 0;
}

.check-modern input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.link-soft {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.link-soft:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.login-foot-cta {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.login-foot-cta a {
    color: var(--primary);
    font-weight: 700;
}

.login-foot-cta a:hover {
    text-decoration: underline;
}

/* --- Login responsive --- */
@media (max-width: 900px) {
    .login-brand {
        display: none;
    }
    .login-form-panel {
        flex: 1;
    }
    .login-mobile-logo {
        display: flex;
    }
    .login-back {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 1.75rem 1.35rem;
    }
    .login-title {
        font-size: 1.7rem;
    }
}

/* =====================================================
   Admin Dashboard
   ===================================================== */
.nav-admin-link {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.dash-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.dash-head h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0f172a;
    margin: 0.25rem 0 0.5rem;
}

.dash-head p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    white-space: nowrap;
}

/* Stat cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--white);
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px -12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.dash-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -15px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.15);
}

.dash-stat-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.dash-stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.dash-stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.35rem;
}

/* Users table */
.dash-table-wrap {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px -12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.dash-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.dash-table-head h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-table-scroll {
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    text-align: left;
    padding: 0.9rem 1.75rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-body);
    font-weight: 700;
}

.dash-table td {
    padding: 1rem 1.75rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: var(--text-main);
    vertical-align: middle;
}

.dash-table tbody tr:hover {
    background: #f8fafc;
}

.dash-idx {
    color: var(--text-muted);
    font-weight: 600;
}

.dash-email {
    font-weight: 600;
    color: #0f172a;
}

.pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 0.35rem;
}

.pill-green { background: #dcfce7; color: #16a34a; }
.pill-amber { background: #fef3c7; color: #d97706; }
.pill-blue  { background: rgba(37, 99, 235, 0.12); color: var(--primary); }
.pill-gray  { background: #f1f5f9; color: #64748b; }

@media (max-width: 600px) {
    .dash-head h2 { font-size: 1.85rem; }
    .dash-table th, .dash-table td { padding: 0.85rem 1.1rem; }
}

/* =====================================================
   Public Certificate Lookup
   ===================================================== */
.lookup-message {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cert-results {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.cert-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: var(--bg-body);
    transition: var(--transition);
}

.cert-result-row:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }

.cert-result-info { display: flex; flex-direction: column; }

.cert-result-title { font-weight: 700; color: #0f172a; }

.cert-result-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

.cert-result-btn {
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
    transition: var(--transition);
}

.cert-result-btn:hover { transform: translateY(-1px); text-decoration: none !important; }

/* ============================================
   TEACHER REGISTRATION FORM
   ============================================ */

.reg-head {
    max-width: 900px;
    margin: 2.5rem auto 1.75rem;
    text-align: center;
}

.reg-head h1 {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.reg-head p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.reg-note {
    margin-top: 0.9rem;
    padding: 0.85rem 1.1rem;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 10px;
    color: #334155 !important;
}

.reg-form {
    max-width: 900px;
    margin: 0 auto 4rem;
}

/* No icon shell in this form, so drop the space the icon would have taken. */
.reg-form .field-input {
    padding-left: 1rem;
}

.reg-form textarea.field-input {
    resize: vertical;
}

.reg-summary:not(:empty) {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 0.9rem;
}

.reg-summary ul {
    margin: 0;
    padding-left: 1.1rem;
    list-style: none;
}

.reg-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.reg-card-head {
    padding: 1.1rem 1.5rem;
    background: var(--bg-body);
    border-bottom: 1px solid #e2e8f0;
}

.reg-card-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.reg-sub {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.reg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.25rem;
    padding: 1.5rem;
}

.reg-field-wide {
    grid-column: 1 / -1;
}

.field-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.student-card {
    border-top: 1px solid #e2e8f0;
}

.student-card:first-of-type {
    border-top: none;
}

.student-summary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.student-summary::-webkit-details-marker {
    display: none;
}

.student-summary::before {
    content: "▸";
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.student-card[open] > .student-summary::before {
    transform: rotate(90deg);
}

.student-summary:hover {
    background: var(--bg-body);
}

.student-num {
    font-weight: 700;
    color: var(--text-main);
}

.student-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text-muted);
}

.student-card:first-of-type .student-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark);
}

.student-card .reg-grid {
    padding-top: 0.25rem;
}

.reg-submit {
    max-width: 320px;
    margin: 0 auto;
    display: block;
}

.reg-success-ic {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.reg-success-body {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 1.25rem 0 1.75rem;
}

.reg-venues {
    display: inline-block;
    text-align: left;
    margin-top: 0.6rem;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.6;
}

.reg-venues ol {
    margin: 0.2rem 0 0.5rem 1.2rem;
}

.reg-venues-small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Details of the chosen schedule slot, shown under the Event dropdown. */
.reg-slot {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    background: rgba(14, 165, 233, 0.07);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 10px;
    font-size: 0.88rem;
    color: #334155;
}

.reg-slot[hidden],
.form-field[hidden],
.reg-slots[hidden],
.reg-slots-empty[hidden] {
    display: none;
}

.reg-success-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.reg-success-list li {
    padding: 0.55rem 0.8rem;
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
}

/* ============================================
   REGISTRATION PAGE (Children's Day form)
   ============================================ */

.reg-count[hidden],
.reg-slots[hidden],
.reg-slots-empty[hidden] {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Banner --- */
.reg-hero { padding: 4rem 0 4.75rem; }
.reg-hero h1 { font-size: 2.6rem; }
.page-hero.reg-hero p { text-align: left; hyphens: none; }

.reg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.reg-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
}

.reg-hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.6rem;
}

.reg-hero-facts span {
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Layout: form + sticky sidebar, pulled up over the banner --- */
.reg-page { padding: 0 0 5rem; }

.reg-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.75rem;
    align-items: start;
    margin-top: -2.25rem;
    position: relative;
    z-index: 3;
}

.reg-page .reg-form { max-width: none; margin: 0; }

/* --- Step cards --- */
.reg-page .reg-card {
    border-radius: 16px;
    border-color: #e8edf3;
    box-shadow: 0 12px 32px -18px rgba(15, 23, 42, 0.18);
    margin-bottom: 1.25rem;
}

.reg-page .reg-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.2rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid #f1f5f9;
}

.reg-page .reg-card-head h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }

.reg-page .reg-card-head p {
    margin: 0.1rem 0 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.reg-step {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 6px 14px -4px rgba(37, 99, 235, 0.45);
}

.reg-count {
    margin-left: auto;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.reg-body { padding: 1.5rem; }
.reg-page .reg-grid { gap: 0 1.25rem; padding: 1.5rem 1.5rem 0.25rem; }

.reg-page .form-field label .req { color: #dc2626; margin-left: 0.15rem; }

.reg-page .form-field label .opt {
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.reg-page .field-input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* --- Group tiles --- */
.reg-group-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.reg-group-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1rem 0.95rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: var(--bg-body);
    cursor: pointer;
    transition: var(--transition);
}

.reg-group-tile:hover { border-color: rgba(37, 99, 235, 0.45); background: var(--white); }

.reg-group-tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-group-num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 800;
    font-size: 0.85rem;
    transition: var(--transition);
}

.reg-group-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); }
.reg-group-classes { font-size: 0.8rem; color: var(--text-muted); }

.reg-group-tile:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.reg-group-tile:has(input:checked) .reg-group-num { background: var(--primary); color: var(--white); }
.reg-group-tile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Locked by the chosen class */
.reg-group-tile:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }

/* Group not chosen: client (input-validation-error) or server (.is-invalid) */
.reg-group-tiles.is-invalid .reg-group-tile,
.reg-group-tiles:has(input.input-validation-error) .reg-group-tile {
    border-color: #fca5a5;
    background: #fef2f2;
}

.reg-page .reg-card-head h3 .req { color: #dc2626; }

/* --- Competitions, grouped by day --- */
.reg-slots { border: 0; margin: 0; padding: 0; min-width: 0; }

.reg-day + .reg-day { margin-top: 1.4rem; }

.reg-day-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.reg-day-head small { display: block; color: var(--text-muted); font-size: 0.8rem; }
.reg-day-head strong { font-size: 0.92rem; }

.reg-day-date {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #0f172a;
    color: var(--white);
    font-weight: 800;
}

.reg-day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.reg-slots .reg-slot-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding: 0.85rem 0.95rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.reg-slots .reg-slot-option:hover { border-color: rgba(37, 99, 235, 0.45); }

.reg-slots .reg-slot-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.reg-slot-option input {
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.reg-slot-text { display: grid; gap: 0.2rem; min-width: 0; }
.reg-slot-name { font-weight: 700; font-size: 0.93rem; color: var(--text-main); }
.reg-slot-meta { font-size: 0.8rem; color: #475569; font-weight: 500; }

.reg-slot-topic {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.45;
}

.reg-slot-team {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.reg-slots-empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.4rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
}

/* --- Submit --- */
.reg-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--white);
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 12px 32px -18px rgba(15, 23, 42, 0.18);
}

.reg-submit-bar p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 440px;
}

.reg-submit-btn {
    flex-shrink: 0;
    padding: 0.9rem 1.8rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 11px;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px rgba(37, 99, 235, 0.55);
    transition: var(--transition);
}

.reg-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -8px rgba(37, 99, 235, 0.6); }

.reg-schedule-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    list-style: none;
}

.reg-schedule-summary::-webkit-details-marker { display: none; }

.reg-schedule-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- Sidebar --- */
.reg-aside {
    display: grid;
    gap: 1rem;
}

/* Only stick when the whole sidebar fits on screen, or its lower cards get cut off. */
@media (min-width: 1025px) and (min-height: 1000px) {
    .reg-aside { position: sticky; top: 96px; }
}

.reg-info-card {
    padding: 1.3rem 1.35rem;
    background: var(--white);
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 12px 32px -18px rgba(15, 23, 42, 0.18);
}

.reg-info-card h4 {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--primary);
}

.reg-info-list,
.reg-group-list,
.reg-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reg-info-list li {
    display: flex;
    gap: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #475569;
}

.reg-info-list li + li { margin-top: 0.85rem; }
.reg-info-list strong { display: block; color: var(--text-main); font-size: 0.88rem; }

.reg-info-ic {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.95rem;
}

.reg-group-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px dashed #e2e8f0;
}

.reg-group-list li:last-child { border-bottom: none; padding-bottom: 0; }
.reg-group-list li span:first-child { font-weight: 700; color: var(--text-main); }
.reg-group-list li span:last-child { color: var(--text-muted); text-align: right; }

.reg-info-note {
    background: #fffbeb;
    border-color: #fde68a;
}

.reg-info-note h4 { color: #b45309; }

.reg-info-note p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #78350f;
}

.reg-contact li + li { margin-top: 0.45rem; }

.reg-contact a {
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.reg-contact a:hover { color: var(--primary); }

@media (max-width: 1024px) {
    .reg-layout { grid-template-columns: 1fr; }
    .reg-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reg-group-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .reg-hero { padding: 2.75rem 0 3.75rem; }
    .reg-hero h1 { font-size: 1.85rem; }
    .reg-page .reg-grid { grid-template-columns: 1fr; padding: 1.25rem 1.25rem 0.1rem; }
    .reg-body { padding: 1.25rem; }
    .reg-page .reg-card-head { padding: 1rem 1.25rem; }
    .reg-day-grid { grid-template-columns: 1fr; }
    .reg-aside { grid-template-columns: 1fr; }
    .reg-submit-bar { flex-direction: column; align-items: stretch; }
    .reg-submit-btn { width: 100%; }
}

.reg-schedule {
    border-top: 1px solid #e2e8f0;
}

.reg-schedule-scroll {
    overflow-x: auto;
    border-top: 1px solid #e2e8f0;
}

.reg-schedule-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.reg-schedule-table th,
.reg-schedule-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: top;
}

.reg-schedule-table th {
    background: var(--bg-body);
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
}

.reg-schedule-table .nowrap {
    white-space: nowrap;
}

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

/* ============================================
   ACCOUNT SETTINGS (Identity /Manage)
   ============================================ */

.account-head {
    max-width: 980px;
    margin: 2.5rem auto 1.5rem;
}

.account-head h1 {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
}

.account-head p {
    color: var(--text-muted);
    font-size: 0.97rem;
}

.account-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 980px;
    margin: 0 auto 4rem;
    align-items: start;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.6rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.account-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.93rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: var(--transition);
}

.account-nav-item:hover {
    background: var(--bg-body);
    color: var(--primary-dark);
}

.account-nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.account-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.account-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: var(--bg-body);
    border-bottom: 1px solid #e2e8f0;
}

.account-card-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.account-card-body {
    padding: 1.5rem;
}

/* No icon shell in these forms, so drop the space the icon would have taken. */
.account-card-body .field-input {
    padding-left: 1rem;
}

.account-card-body .field-input:disabled {
    background: #f1f5f9;
    color: var(--text-muted);
    cursor: not-allowed;
}

.account-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.account-submit {
    max-width: 220px;
    margin-top: 0.4rem;
}

.account-status:not(:empty) {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.account-status.is-ok:not(:empty) {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.account-status.is-error:not(:empty) {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.account-status ul {
    margin: 0;
    padding-left: 1.1rem;
    list-style: none;
}

@media (max-width: 760px) {
    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* =====================================================
   Content Pages — About / Branches / Programmes /
   Activities / Gallery  (Bal Bhawan public site)
   ===================================================== */

/* --- Inner page banner --- */
.page-hero {
    position: relative;
    padding: 5rem 0 4.5rem;
    color: var(--white);
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.45), transparent 45%),
        linear-gradient(150deg, #1d4ed8 0%, #2563eb 42%, #0f172a 100%);
}

.page-hero .container { position: relative; z-index: 2; }

.page-hero .breadcrumb-trail {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.page-hero .breadcrumb-trail a { color: rgba(255, 255, 255, 0.7); transition: var(--transition); }
.page-hero .breadcrumb-trail a:hover { color: #fff; }
.page-hero .breadcrumb-trail span { opacity: 0.5; }

.page-hero h1 {
    font-size: 2.85rem;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.12;
    margin-bottom: 1rem;
    max-width: 760px;
}

.page-hero p {
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    line-height: 1.65;
}

.page-hero .hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 1;
}
.page-hero .hero-glow-1 { width: 340px; height: 340px; background: rgba(14, 165, 233, 0.3); top: -90px; right: -70px; }
.page-hero .hero-glow-2 { width: 280px; height: 280px; background: rgba(37, 99, 235, 0.35); bottom: -110px; left: -80px; }

/* --- Reusable narrow intro block --- */
.section-header.centered { margin-left: auto; margin-right: auto; text-align: center; }

.lead-narrow {
    max-width: 820px;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.75;
}

.lead-narrow + .lead-narrow { margin-top: 1.25rem; }

/* --- Objectives grid (About page) --- */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.objective-card {
    background: var(--white);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 2rem 1.85rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px -18px rgba(0, 0, 0, 0.15);
}

.objective-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 20px 35px -18px rgba(37, 99, 235, 0.22);
}

.objective-card .obj-ic {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.objective-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.6rem;
}

.objective-card p { color: var(--text-muted); font-size: 0.97rem; }

/* --- Mission / values split (About) --- */
.value-callout {
    position: relative;
    background: var(--white);
    border: 1px solid #e8eef7;
    border-radius: 16px;
    margin-top: 2.5rem;
    display: grid;
    gap: 0;
    overflow: hidden;
    box-shadow: 0 18px 34px -26px rgba(15, 23, 42, 0.45);
}

/* Brand accent down the leading edge */
.value-callout::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* Hairline rules between cells; the first row and column are reset per
   breakpoint below, so every column count stays cleanly framed. */
.value-callout .val-item {
    padding: 1.65rem 1.6rem;
    border-top: 1px solid #eef2f8;
    border-left: 1px solid #eef2f8;
}

.value-callout .val-item strong {
    display: flex;
    align-items: flex-end;
    min-height: 2.1rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1.2px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.value-callout .val-item span {
    display: block;
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.55;
}

/* Items whose value is a name rather than a figure */
.value-callout .val-item-text strong {
    font-size: 1.1rem;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* Explicit column counts — auto-fit stranded the fifth item on its own row */
@media (min-width: 1080px) {
    .value-callout { grid-template-columns: repeat(5, 1fr); }
    .value-callout .val-item { border-top: 0; }
    .value-callout .val-item:nth-child(5n+1) { border-left: 0; }
}

@media (min-width: 760px) and (max-width: 1079px) {
    .value-callout { grid-template-columns: repeat(3, 1fr); }
    .value-callout .val-item:nth-child(-n+3) { border-top: 0; }
    .value-callout .val-item:nth-child(3n+1) { border-left: 0; }
}

@media (min-width: 520px) and (max-width: 759px) {
    .value-callout { grid-template-columns: repeat(2, 1fr); }
    .value-callout .val-item:nth-child(-n+2) { border-top: 0; }
    .value-callout .val-item:nth-child(2n+1) { border-left: 0; }
}

@media (max-width: 519px) {
    .value-callout { grid-template-columns: 1fr; }
    .value-callout .val-item { border-left: 0; }
    .value-callout .val-item:first-child { border-top: 0; }
}

/* --- Branch cards --- */
.branch-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.branch-card {
    background: var(--white);
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    padding: 2.25rem 2rem;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.18);
}

.branch-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 22px 40px -22px rgba(37, 99, 235, 0.28);
}

.branch-card .branch-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}
.branch-badge.active { background: #dcfce7; color: #16a34a; }
.branch-badge.soon { background: #fef3c7; color: #d97706; }

.branch-card .branch-ic {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.4rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.branch-card h3 { font-size: 1.3rem; font-weight: 700; color: #0f172a; margin-bottom: 0.35rem; }
.branch-card .branch-loc { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; margin-bottom: 1.1rem; }
.branch-card .branch-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.25rem; }

.branch-card .branch-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.branch-card .branch-tags span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    background: var(--bg-body);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.3rem 0.65rem;
}

/* --- Programmes by branch --- */
.prog-branch {
    background: var(--white);
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    padding: 2.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.18);
}

.prog-branch-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.prog-branch-head .pb-ic {
    width: 52px; height: 52px; flex: 0 0 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.12));
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}

.prog-branch-head h3 { font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.prog-branch-head p { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

.prog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.prog-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    background: var(--bg-body);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    transition: var(--transition);
}

.prog-item:hover { border-color: rgba(37, 99, 235, 0.2); background: #fff; }

.prog-item .pi-ic {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 4px 10px -4px rgba(0,0,0,0.12);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

.prog-item strong { display: block; font-size: 0.98rem; color: #0f172a; font-weight: 700; }
.prog-item span { font-size: 0.85rem; color: var(--text-muted); }

/* --- Activity feature rows (alternating) --- */
.activity-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}
.activity-feature:last-child { margin-bottom: 0; }

.activity-feature.reverse .af-media { order: 2; }

.af-media {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.25);
}

.af-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16 / 11; }

.af-body .section-tag { margin-bottom: 0.75rem; }
.af-body h3 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.6px; color: #0f172a; margin-bottom: 1rem; }
.af-body p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 1rem; }

.af-points { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.af-points li { display: flex; align-items: center; gap: 0.85rem; font-weight: 600; color: #334155; }
.af-points li .afp-ic {
    width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
    background: rgba(37, 99, 235, 0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
}

/* --- Annual feature programme grid --- */
.annual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.annual-card {
    background: var(--white);
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 1.85rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px -20px rgba(0, 0, 0, 0.15);
}
.annual-card:hover { transform: translateY(-4px); border-color: rgba(37, 99, 235, 0.18); box-shadow: 0 20px 35px -20px rgba(37, 99, 235, 0.22); }

.annual-card .an-ic {
    width: 50px; height: 50px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1.1rem; box-shadow: 0 8px 16px rgba(37,99,235,0.2);
}
.annual-card h4 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.4rem; }
.annual-card p { font-size: 0.92rem; color: var(--text-muted); }

/* Children's Day card carries the competition registration link */
.annual-card-featured {
    display: flex;
    flex-direction: column;
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), var(--white) 60%);
}

.annual-card .an-badge {
    align-self: flex-start;
    margin-top: 0.85rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
}

.annual-card .an-link {
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.annual-card .an-link:hover { background: var(--primary-dark); }

.annual-card .an-link-disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

/* --- Photo gallery --- */
.gallery-filter-note { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px -20px rgba(0, 0, 0, 0.3);
    background: #0f172a;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img { transform: scale(1.07); }

.gallery-item .gi-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.4rem 1.1rem 0.9rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: var(--transition);
}

.gallery-item:hover .gi-caption { opacity: 1; transform: translateY(0); }

.gallery-group-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 3.5rem 0 1.5rem;
}
.gallery-group-title:first-of-type { margin-top: 0; }

.gallery-empty {
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* --- CTA band --- */
.cta-band {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.35), transparent 40%),
        linear-gradient(135deg, #1d4ed8, #0f172a);
    color: #fff;
    border-radius: 24px;
    padding: 3.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-band h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.8px; margin-bottom: 0.6rem; }
.cta-band p { color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; max-width: 520px; }

.cta-band .cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-white {
    background: #fff;
    color: var(--primary-dark);
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.97rem;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.btn-white:hover { transform: translateY(-2px); }

.btn-ghost {
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.97rem;
    transition: var(--transition);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* --- Home band helpers --- */
.home-band { background: var(--white); border-top: 1px solid #f1f5f9; }

/* --- Richer footer --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}
.footer-col h4 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1.1rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { color: #94a3b8; font-size: 0.9rem; transition: var(--transition); }
.footer-col ul a:hover { color: #fff; }
.footer-brand-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }

/* --- Social links --- */
.footer-social-head { margin-top: 1.75rem; }

.footer-col ul.footer-social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-social .soc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid #1e293b;
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-social .soc svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.footer-social .soc:hover {
    color: #fff;
    transform: translateY(-2px);
}

.footer-social .soc:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.footer-social .soc-facebook:hover { background: #1877f2; border-color: #1877f2; }
.footer-social .soc-youtube:hover { background: #ff0000; border-color: #ff0000; }
.footer-social .soc-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #dc2743;
}
.footer-brand-row .logo-icon { width: 36px; height: 36px; font-size: 1rem; }
.footer-brand-row .brand-logo--footer { width: 44px; height: 44px; border-radius: 50%; object-fit: contain; background: #fff; flex-shrink: 0; }
.footer-divider { border: none; border-top: 1px solid #1e293b; margin: 0 0 1.5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.88rem; }
.footer-affiliate { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-affiliate-logo { height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* --- Content page responsive --- */
@media (max-width: 968px) {
    .activity-feature { grid-template-columns: 1fr; gap: 2rem; }
    .activity-feature.reverse .af-media { order: 0; }
    .page-hero h1 { font-size: 2.25rem; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .cta-band { padding: 2.5rem 1.75rem; }
    .cta-band h2 { font-size: 1.6rem; }
    .prog-branch { padding: 1.5rem; }
}

/* --- Justified body copy --- */
.slide-content p,
.page-hero p,
.section-header p,
.lead-narrow,
.about-content p,
.af-body p,
.service-card p,
.objective-card p,
.branch-card .branch-desc,
.cta-band p,
.footer-col p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* Centred intro blocks keep their centring */
.section-header.centered p { text-align: center; hyphens: none; }

/* Justification opens rivers in phone-width columns */
@media (max-width: 480px) {
    .page-hero p,
    .section-header p,
    .lead-narrow,
    .about-content p,
    .af-body p,
    .service-card p,
    .objective-card p,
    .branch-card .branch-desc,
    .cta-band p,
    .footer-col p {
        text-align: left;
        hyphens: none;
    }
}

/* ===================== Competition popup (Children's Day) ===================== */
.cp-lock { overflow: hidden; }

.cp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.cp-overlay[hidden] { display: none; }

.cp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cp-dialog {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cp-open .cp-backdrop { opacity: 1; }
.cp-open .cp-dialog { opacity: 1; transform: none; }

.cp-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}
.cp-close:hover { background: rgba(15, 23, 42, 0.12); transform: rotate(90deg); }
.cp-close:focus-visible, .cp-btn-later:focus-visible, .cp-btn-primary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

/* --- image side --- */
.cp-media { position: relative; min-height: 100%; background: var(--primary-dark); color: #fff; }
.cp-media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp-media-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0) 28%, rgba(15, 23, 42, 0) 55%, rgba(15, 23, 42, 0.85) 100%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(236, 72, 153, 0.08));
}
.cp-media-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.cp-logo { height: 46px; width: auto; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.cp-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.95);
    color: #be123c;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.cp-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e11d48;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6);
    animation: cp-pulse 1.6s infinite;
}
.cp-media-caption { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.2rem; }
.cp-media-kicker { font-size: 0.8rem; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 1px; }
.cp-media-big { font-size: 1.15rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }

/* --- content side --- */
.cp-body { padding: 2.2rem 2.2rem 1.8rem; overflow-y: auto; }
.cp-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--primary);
}
.cp-title {
    margin: 0.35rem 0 0.6rem;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--text-main);
}
.cp-title span {
    display: block;
    background: linear-gradient(90deg, var(--primary) 0%, #db2777 55%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cp-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.cp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.cp-chip {
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    background: #eff6ff;
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.cp-stat {
    padding: 0.7rem 0.5rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    text-align: center;
    background: linear-gradient(180deg, #fff, #f8fafc);
}
.cp-stat b { display: block; font-size: 1.55rem; line-height: 1.1; font-weight: 800; color: var(--primary); }
.cp-stat span { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.cp-countdown {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a, var(--primary) 60%, #7c3aed);
    color: #fff;
}
.cp-countdown-label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; opacity: 0.85; margin-bottom: 0.45rem; }
.cp-countdown-live .cp-countdown-label { margin: 0; font-size: 1rem; opacity: 1; text-align: center; }
.cp-countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.cp-countdown-grid div { text-align: center; padding: 0.35rem 0; border-radius: 10px; background: rgba(255, 255, 255, 0.12); }
.cp-countdown-grid b { display: block; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cp-countdown-grid span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.8; }

.cp-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; margin-bottom: 1.3rem; }
.cp-group {
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.78rem;
}
.cp-group b { color: #c2410c; }

/* Pinned to the bottom of the scrolling panel so "Register Now" is always in view. */
.cp-actions {
    position: sticky;
    bottom: -1.8rem;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 -2.2rem -1.8rem;
    padding: 1rem 2.2rem 1.8rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), #fff 35%);
}
.cp-btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.8rem;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--primary), #db2777);
    color: #fff;
    font-weight: 800;
    font-size: 1.02rem;
    text-decoration: none;
    box-shadow: 0 12px 24px -10px rgba(219, 39, 119, 0.65);
    transition: var(--transition);
}
.cp-btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: cp-shine 3.2s ease-in-out infinite;
}
.cp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(219, 39, 119, 0.75); color: #fff; }
.cp-btn-primary span { transition: transform 0.25s ease; }
.cp-btn-primary:hover span { transform: translateX(4px); }
.cp-btn-later {
    border: none;
    background: none;
    padding: 0.6rem 0.4rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
}
.cp-btn-later:hover { color: var(--text-main); text-decoration: underline; }

@keyframes cp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}
@keyframes cp-shine {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

/* --- tablet / phone: image becomes a banner on top, sheet rises from the bottom --- */
@media (max-width: 760px) {
    .cp-overlay { padding: 0.75rem; align-items: flex-end; }
    .cp-dialog {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 22px;
    }
    .cp-media { min-height: 0; height: 170px; }
    .cp-media-top { right: 3.6rem; justify-content: flex-start; gap: 0.6rem; }
    .cp-logo { height: 38px; }
    .cp-live { font-size: 0.68rem; padding: 0.35rem 0.65rem; }
    .cp-media-caption { bottom: 0.9rem; }
    .cp-media-big { font-size: 1rem; }
    .cp-close { background: rgba(255, 255, 255, 0.9); }
    .cp-body { padding: 1.4rem 1.25rem 1.3rem; }
    .cp-actions { bottom: -1.3rem; margin: 0 -1.25rem -1.3rem; padding: 0.9rem 1.25rem 1.3rem; }
    .cp-title { font-size: 1.6rem; }
    .cp-actions { flex-direction: column; align-items: stretch; }
    .cp-btn-primary { width: 100%; }
}
/* short laptop screens: tighten the spacing so the whole card usually fits */
@media (min-width: 761px) and (max-height: 720px) {
    .cp-body { padding: 1.5rem 1.8rem 1.3rem; }
    .cp-actions { bottom: -1.3rem; margin: 0 -1.8rem -1.3rem; padding: 0.8rem 1.8rem 1.3rem; }
    .cp-title { font-size: 1.7rem; margin: 0.2rem 0 0.4rem; }
    .cp-desc { margin-bottom: 0.7rem; }
    .cp-chips, .cp-stats, .cp-countdown { margin-bottom: 0.7rem; }
    .cp-stat { padding: 0.45rem; }
    .cp-groups { margin-bottom: 0.9rem; }
}
@media (max-width: 380px) {
    .cp-title { font-size: 1.4rem; }
    .cp-stat b { font-size: 1.3rem; }
    .cp-countdown-grid b { font-size: 1.2rem; }
    .cp-groups { grid-template-columns: 1fr; }
    .cp-chip { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-dialog, .cp-backdrop { transition: none; }
    .cp-live-dot { animation: none; }
    .cp-btn-primary::after { display: none; }
}

/* ===================== Footer staff login ===================== */
.footer-login { display: inline-flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; font-size: 0.85rem; }
.footer-login a,
.footer-login button {
    color: #94a3b8;
    font: inherit;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
}
.footer-login a:hover,
.footer-login button:hover { color: #fff; }
.footer-login form { display: inline; margin: 0; }
.footer-login-user { color: #cbd5e1; }

/* ===================== Contact page ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.75rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.25);
    transition: var(--transition);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(37, 99, 235, 0.35); border-color: #bfdbfe; }
.contact-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
.contact-card h3 { font-size: 1.25rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.2rem; }
.contact-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.1rem; }

.contact-phones { list-style: none; margin: 0; padding: 0; width: 100%; }
.contact-phones li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px dashed #e2e8f0;
}
.contact-phones li:first-child { border-top: none; padding-top: 0; }
.contact-phone {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
    transition: var(--transition);
}
.contact-phone:hover { color: var(--primary); }
.contact-wa {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    transition: var(--transition);
}
.contact-wa svg { width: 18px; height: 18px; fill: currentColor; }
.contact-wa:hover { background: #25d366; color: #fff; transform: scale(1.08); }

.contact-email {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
    word-break: break-word;
    margin-bottom: 1rem;
}
.contact-email:hover { color: var(--primary); }
.contact-address { font-style: normal; font-weight: 700; font-size: 1.05rem; color: var(--text-main); margin-bottom: 1rem; }
.contact-action { margin-top: auto; color: var(--primary); font-weight: 700; font-size: 0.92rem; }
.contact-action:hover { text-decoration: underline; }

.contact-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 2rem 2.25rem;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 20%, rgba(236, 72, 153, 0.35), transparent 40%),
        linear-gradient(135deg, #1d4ed8, #0f172a);
}
.contact-strip-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.5rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.contact-strip h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; }
.contact-strip p { color: rgba(255, 255, 255, 0.8); }
.contact-strip-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; flex-shrink: 0; }

.contact-social { margin-top: 2.5rem; text-align: center; }
.contact-social h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 1rem; }
.contact-social .footer-social { list-style: none; display: flex; justify-content: center; gap: 0.85rem; margin: 0; padding: 0; }
.contact-social .footer-social .soc { background: var(--white); border-color: #e2e8f0; color: var(--text-muted); width: 48px; height: 48px; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-strip { flex-direction: column; align-items: flex-start; padding: 1.75rem 1.5rem; }
}
@media (max-width: 600px) {
    .footer-bottom { justify-content: center; text-align: center; }
    .contact-strip-actions { width: 100%; }
    .contact-strip-actions a { flex: 1; text-align: center; }
}
