@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. VARIABLES & BASE SETUP
   ========================================================================== */
:root {
    --primary-dark: #0f172a;
    --primary-main: #1e293b;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #f59e0b;
    --bg-light: #f8fafc;
    --surface-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-soft: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-lg: 16px;
    --radius-md: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden; /* Crucial for sticky header and mobile slide-outs */
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
h1, h2, h3, h4 {
    color: var(--primary-dark);
    line-height: 1.2;
    font-weight: 700;
}

/* ==========================================================================
   2. REUSABLE COMPONENTS (Buttons, Cards, Alerts)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-main);
    color: var(--surface-white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-accent {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-accent:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
}

.card {
    background-color: var(--surface-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    transition: var(--transition);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ==========================================================================
   3. FORMS, INPUTS & VALIDATION
   ========================================================================== */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
    width: 90%;
    padding: 0.85rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    outline: none;
    transition: 0.2s;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--surface-white);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Input Icons & Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.input-group svg.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}
.input-group input { padding-left: 2.5rem; }

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}
.toggle-password:hover { color: var(--primary-main); }

/* Custom Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid var(--border-soft);
    border-radius: 4px;
    background-color: var(--surface-white);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--primary-main);
    border-color: var(--primary-main);
}
.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Tooltips */
.label-wrapper { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; background-color: var(--border-soft); color: var(--text-secondary); border-radius: 50%; font-size: 10px; font-weight: bold; cursor: help; position: relative; transition: var(--transition); }
.info-icon:hover { background-color: var(--primary-main); color: var(--surface-white); }
.tooltip-popup { position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%) translateY(10px); background-color: var(--primary-dark); color: var(--surface-white); padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.75rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100; box-shadow: var(--shadow-soft); pointer-events: none; }
.tooltip-popup::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 5px; border-style: solid; border-color: var(--primary-dark) transparent transparent transparent; }
.info-icon:hover .tooltip-popup, .info-icon.active .tooltip-popup { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Real-time Validation States */
.input-error { border-color: #ef4444 !important; background-color: #fef2f2 !important; }
.input-success { border-color: #10b981 !important; }
.error-msg { color: #ef4444; font-size: 0.8rem; margin-top: 0.25rem; display: none; }
.error-msg.active { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Password Strength Meter */
.pwd-strength-container { display: flex; gap: 4px; margin-top: 8px; height: 4px; }
.pwd-bar { flex: 1; background-color: var(--border-soft); border-radius: 2px; transition: background-color 0.3s ease; }
.pwd-text { font-size: 0.75rem; margin-top: 4px; color: var(--text-secondary); font-weight: 500; text-align: right; }
.pwd-requirements { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.5rem; display: none; }
.pwd-requirements.show { display: block; }
.pwd-req-item { margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.pwd-req-item.met { color: #10b981; }
.pwd-req-item.met::before { content: '✓'; font-weight: bold; }
.pwd-req-item:not(.met)::before { content: '○'; }

/* ==========================================================================
   4. NAVIGATION & HEADER (Sticky & Mobile)
   ========================================================================== */
.top-bar {
    background-color: #0f172a; 
    color: #cbd5e1;
    font-size: 0.8rem;
    padding: 0.5rem 0;
    position: relative;
    z-index: 10001;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a { color: #cbd5e1; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: var(--transition); }
.top-bar a:hover, .social-icons a:hover { color: var(--accent-gold); }
.social-icons { display: flex; gap: 1.25rem; align-items: center; }
.social-icons a { color: #cbd5e1; transition: 0.3s ease; }

.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    z-index: 10000;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.navbar.scrolled .nav-container { padding: 0.75rem 2rem; }

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.brand-wrapper { display: flex; align-items: center; gap: 1rem; text-decoration: none; position: relative; z-index: 10002; }
.brand-logo-img { height: 48px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.4rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.brand-name span { color: var(--accent-gold-hover); }
.brand-subtitle { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; letter-spacing: 0.5px; }

.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: var(--transition); position: relative; padding: 0.5rem 0; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--accent-gold); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary-dark); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-toggle { display: none; }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }
/* ==========================================================================
   6. LAYOUTS & SECTIONS
   ========================================================================== */
.main-wrapper { flex: 1; }
.section-padding { padding: 6rem 2rem; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; }
.section-title span { position: relative; display: inline-block; }
.section-title span::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background-color: var(--accent-gold); border-radius: 2px; }

.hero { position: relative; padding: 8rem 2rem; background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%), url('../images/school-bg.jpg') center/cover; color: var(--surface-white); text-align: center; }
.hero-content { max-width: 900px; margin: 0 auto; position: relative; z-index: 10; }
.hero-badge { display: inline-block; padding: 0.5rem 1.25rem; background: rgba(251, 191, 36, 0.15); border-radius: 50px; font-size: 0.875rem; font-weight: 600; color: var(--accent-gold); margin-bottom: 1.5rem; border: 1px solid rgba(251, 191, 36, 0.3); backdrop-filter: blur(4px); }
.hero h1 { font-size: 4.5rem; color: var(--surface-white); margin-bottom: 1.5rem; letter-spacing: -1px; }
.hero p { font-size: 1.25rem; color: #cbd5e1; margin-bottom: 2.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 1.25rem; justify-content: center; }

.features-section { background-color: var(--bg-light); margin-top: -3rem; position: relative; z-index: 20; padding: 0 2rem 6rem; }
.grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.feature-card { padding: 2.5rem; }
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.feature-icon { width: 60px; height: 60px; border-radius: 14px; background: rgba(245, 158, 11, 0.1); color: var(--accent-gold-hover); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.feature-icon svg { width: 30px; height: 30px; }

.about-split { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-hover); }
.about-image img { width: 100%; height: auto; display: block; }
.about-content h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.about-content p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.1rem; }
.check-list { list-style: none; margin-bottom: 2rem; }
.check-list li { position: relative; padding-left: 2rem; margin-bottom: 1rem; color: var(--text-primary); font-weight: 500; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--success, #10b981); font-weight: bold; font-size: 1.2rem; }

.cta-section { background-color: var(--primary-main); color: var(--surface-white); text-align: center; padding: 5rem 2rem; border-radius: var(--radius-lg); max-width: 1280px; margin: 0 auto 6rem; }
.cta-section h2 { color: var(--surface-white); margin-bottom: 1rem; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer { background-color: var(--primary-dark); color: #cbd5e1; padding: 5rem 2rem 2rem; margin-top: auto; }
.footer-container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand { font-size: 1.75rem; font-weight: 700; color: var(--surface-white); text-decoration: none; margin-bottom: 1rem; display: inline-block; }
.footer-brand span { color: var(--accent-gold); }
.footer-desc { max-width: 350px; margin-bottom: 2rem; }
.footer-heading { color: var(--surface-white); font-size: 1.125rem; margin-bottom: 1.5rem; font-weight: 600; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.85rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-gold); padding-left: 5px; }
.footer-bottom { max-width: 1280px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; font-size: 0.9rem; }
.school-highlight {
    color: var(--accent-gold-hover) !important;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.school-highlight:hover {
    color: var(--primary-main) !important;
    text-decoration: underline;
}

.school-highlight-footer {
    color: var(--accent-gold);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.school-highlight-footer:hover {
    color: var(--surface-white);
}

.school-highlight-contact {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.school-highlight-contact:hover {
    color: var(--accent-gold);
}
/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .hero h1 { font-size: 3.5rem; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 992px) {
    .about-split { grid-template-columns: 1fr; gap: 3rem; }
    .about-image { order: -1; }
}

@media (max-width: 1200px) {
    .hero h1 { font-size: 3.5rem; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 992px) {
    .about-split { grid-template-columns: 1fr; gap: 3rem; }
    .about-image { order: -1; }
}

@media (max-width: 768px) {
    /* --- 1. Mobile Top Bar (Sleek & Compact) --- */
    .top-bar { 
        display: block; 
        padding: 6px 0; 
        font-size: 0.75rem; /* Smaller text for mobile */
    }
    .top-bar-container { 
        display: flex;
        justify-content: space-between;
        padding: 6px;
        font-size: 0.70rem;
    }

    .top-bar-left a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncates long email with "..." */
        display: inline-flex;
        max-width: 100%;
    }
    /* Hide the "Stay Connected" text, keep only icons */
    .top-bar-right span { display: none; } 
    .social-icons { gap: 4px; }
    .social-icons a { padding: 2px; }
    .navbar.scrolled .nav-container { padding: 0.75rem 1.25rem; }
    .nav-container { padding: 1rem 1.25rem; }
    .brand-subtitle { font-size: 0.70rem; }
    .brand-logo-img { height: 40px; } 
    .brand-name { font-size: 1.25rem; }

    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px; height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10003; 
    }
    .mobile-toggle span {
        display: block;
        width: 24px; height: 2px;
        background-color: var(--primary-dark);
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
        margin: 3px 0;
    }
    .mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: 0; right: 0;
        width: 100%; 
        height: 100dvh;
        background-color: var(--surface-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        z-index: 10001; 
        padding: 5rem 1.5rem 2rem; 
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 15px rgba(0,0,0,0.05);
    }
    .nav-menu.active { transform: translateX(0); }

    .nav-link { 
        font-size: 1.1rem; 
        width: 100%; 
        text-align: left;
        padding: 0.85rem 0; 
        display: block; 
        border-bottom: 1px solid var(--border-soft);
    }
    .nav-link::after { display: none; } 
    .nav-menu .btn { width: 100%; margin-top: 1.5rem; justify-content: center; }

    .hero { padding: 6rem 1rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; }
    
    .features-section { margin-top: 2rem; padding: 0 1.5rem 4rem; }
    .section-padding { padding: 4rem 1.5rem; }
    .cta-section { padding: 4rem 1.5rem; margin: 0 1.5rem 4rem; }
    .footer-container { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ==========================================================================
   9. PRELOADER & ANIMATIONS
   ========================================================================== */
.loader-wrapper { 
    position: fixed; 
    inset: 0;
    background-color: var(--surface-white); 
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center; 
    z-index: 99999; 
    transition: opacity 0.4s ease, visibility 0.4s ease; 
}
.loader-wrapper.fade-out { opacity: 0; visibility: hidden; }

.loader-logo { 
    width: 80px; 
    height: auto; 
    animation: pulse 1.5s infinite ease-in-out; 
    margin-bottom: 1rem; 
}
.loader-wrapper h2 {
    font-size: 1.75rem; 
    margin: 0;
    color: var(--primary-dark);
}
.loader-wrapper h2 span { color: var(--accent-gold); }

@media (max-width: 768px) {
    .loader-logo { width: 65px; }
    .loader-wrapper h2 { font-size: 1.4rem; }
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}