/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;500;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #d4af37;
    --accent-hover: #b5952f;
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --text-dark: #334155;
    --text-light: #f1f5f9;
    --text-muted: #64748b;
    
    /* Layout & Utilities */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    
    /* Fluid Typography Variables */
    --font-h1: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    --font-h2: clamp(2rem, 4vw + 1rem, 3.5rem);
    --font-h3: clamp(1.5rem, 2vw + 1rem, 2rem);
    --font-p: clamp(1rem, 1vw + 0.8rem, 1.15rem);
    
    /* Mobile-first Spacing */
    --section-pad: 60px 0;
    --container-width: 92%;
}

@media (min-width: 768px) {
    :root {
        --section-pad: 100px 0;
        --container-width: 90%;
        --radius: 16px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-main);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden; /* Prevent background scroll when mobile menu is open */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

.container {
    width: var(--container-width);
    max-width: 1280px;
    margin: auto;
}

/* Base Sections */
.section {
    padding: var(--section-pad);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: var(--font-h2);
    margin-bottom: 15px;
}

.section-header p {
    font-size: var(--font-p);
    color: var(--text-muted);
    max-width: 600px;
    margin: auto;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 60px;
    }
}

/* Pre-Header */
.pre-header {
    display: none; /* Hidden on mobile by default */
    background: var(--primary);
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 8px 0;
}

@media (min-width: 768px) {
    .pre-header {
        display: block;
    }
    .pre-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .pre-header a {
        color: var(--text-light);
        font-weight: 500;
        opacity: 0.9;
        transition: var(--transition);
    }
    .pre-header a:hover {
        color: var(--accent);
        opacity: 1;
    }
    .pre-header-links a {
        margin-left: 20px;
    }
}

/* Header & Navigation (Mobile First) */
header.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

header.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 98%; /* Maximized width for header to fit all elements */
    max-width: 1400px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px; /* Slightly tighter on mobile */
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo img {
    height: 40px; /* Smaller on mobile */
    width: auto;
}

.logo h1 {
    font-size: 1.4rem;
    line-height: 1;
    margin: 0;
    letter-spacing: 0.5px;
}

.logo span {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .logo a {
        gap: 15px;
    }
    .logo img {
        height: 50px; /* slightly smaller to save space */
    }
    .logo h1 {
        font-size: 1.6rem; /* slightly smaller to save space */
        letter-spacing: 1px;
    }
    .logo span {
        font-size: 0.65rem; /* slightly smaller to save space */
        margin-top: 3px;
        white-space: nowrap;
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    width: 44px; /* Touch target size */
    height: 44px;
    z-index: 1001;
}

/* Nav Links - Sliding Drawer on Mobile */
.nav-links {
    list-style: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%; /* Drawer width */
    max-width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    padding: 80px 30px 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: var(--transition);
    z-index: 999;
    overflow-y: auto; /* allow scrolling if height is too small */
}

.nav-links.active {
    right: 0;
}

/* Drawer overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-links li {
    margin-bottom: 20px;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(15, 23, 42, 0.05);
    color: var(--accent-hover);
}

.nav-links li a.btn-nav {
    display: inline-block;
    background: var(--primary);
    color: var(--text-light);
    padding: 12px 24px;
    border-radius: 30px;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

@media (min-width: 1200px) {
    .mobile-toggle {
        display: none;
    }
    .nav-overlay {
        display: none;
    }
    .nav-links {
        position: static;
        flex-direction: row;
        width: auto;
        max-width: none; /* FIX: remove mobile 320px max-width */
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        align-items: center;
        gap: 15px; /* Restored nice gap since we have space now */
        overflow-y: visible;
    }
    .nav-links li {
        margin-bottom: 0;
    }
    .nav-links li a {
        font-size: 0.95rem;
        font-weight: 600;
        padding: 8px 14px; /* slightly tighter padding */
        color: var(--primary);
        border-radius: 50px;
        transition: var(--transition);
        white-space: nowrap; /* prevent text wrapping */
    }
    .nav-links li a:hover,
    .nav-links li a.active {
        background: rgba(15, 23, 42, 0.05); /* Soft gray background pill */
        color: var(--accent-hover);
    }
    .nav-links li a.btn-nav {
        margin-top: 0;
        width: auto;
        padding: 10px 20px; /* tighter padding */
        background: var(--accent);
        color: var(--bg-surface);
        box-shadow: var(--shadow-sm);
        margin-left: 5px;
        white-space: nowrap;
    }
    .nav-links li a.btn-nav:hover {
        background: var(--primary);
        color: var(--text-light);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

/* Asymmetrical Hero (Mobile First) */
.hero-full-slider {
    position: relative;
    height: 85vh;
    width: 100%;
    overflow: hidden;
    background-color: #0f172a;
}

.hero-slider-wrap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Displays FULL width/height without letterboxing */
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
    color: #fff;
    text-align: center;
    padding: 60px 20px 20px 20px;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 10;
}

/* Stats Bar */
.stats-bar {
    background: var(--primary);
    color: var(--text-light);
    padding: 30px 20px;
    position: relative;
    z-index: 5;
    border-radius: 0; /* Full width on mobile */
    margin-top: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
}

.stat-item h2 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .stats-bar {
        margin-top: -50px;
        border-radius: var(--radius);
        padding: 40px 0;
        box-shadow: var(--shadow-lg);
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .stat-item h2 {
        font-size: 3rem;
    }
}

/* Grids & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 40px;
    }
}

.card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .card {
        padding: 40px;
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .card i { font-size: 3rem; margin-bottom: 25px; }
    .card h3 { font-size: 1.5rem; margin-bottom: 15px; }
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

@media (min-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-top: 40px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item .overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    color: var(--text-light);
    transition: bottom 0.4s ease;
}

.gallery-item:hover .overlay {
    bottom: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px; /* Slightly smaller on mobile */
    background: var(--primary);
    color: var(--text-light);
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: center;
    min-height: 48px; /* Mobile touch target */
}

@media (min-width: 768px) {
    .btn {
        padding: 14px 32px;
    }
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    color: var(--text-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
}

/* Inner Page Headers */
.page-header {
    padding: 80px 0 60px;
    background: var(--primary);
    color: var(--text-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .page-header {
        padding: 120px 0 80px;
    }
}

.page-header h1 {
    font-size: var(--font-h1);
    color: var(--text-light);
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: var(--font-p);
    opacity: 0.8;
    max-width: 600px;
    margin: 15px auto 0;
    position: relative;
    z-index: 2;
}

/* Forms */
.form-wrap {
    background: var(--bg-surface);
    padding: 30px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .form-wrap {
        padding: 50px;
        box-shadow: var(--shadow-lg);
    }
}

.form-group {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 25px;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px; /* Better for mobile touch */
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: var(--bg-main);
    transition: var(--transition);
    appearance: none; /* Remove native styling on iOS */
    -webkit-appearance: none;
}

@media (min-width: 768px) {
    .form-control {
        padding: 15px;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0; /* Gap handled by form-group margin */
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .form-grid .form-group {
        margin-bottom: 0;
    }
}

/* Page Layout Grids (Contact, Admissions) */
.page-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: flex-start;
}

@media (min-width: 992px) {
    .page-layout-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 60px;
    }
}

/* Footer */
footer {
    background: var(--primary-light);
    color: var(--text-light);
    padding: 60px 0 30px;
    border-top: 4px solid var(--accent);
}

@media (min-width: 768px) {
    footer {
        padding: 80px 0 30px;
        border-top: 5px solid var(--accent);
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 576px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px;
        margin-bottom: 50px;
    }
}

.footer-col h3 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .footer-col h3 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-col i {
    color: var(--accent);
    margin-right: 10px;
    min-width: 20px;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .reveal {
        transform: translateY(40px);
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Slider Animations */
.hero-slider-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
