/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Navigation
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all 0.3s var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: transform 0.3s var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-gradient);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-30px) rotate(-1deg); }
}

.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-element {
    position: absolute;
    opacity: 0.15;
    font-size: 2rem;
    animation: floatAround 25s linear infinite;
}

@keyframes floatAround {
    0% { 
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { 
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    padding: 0 2rem;
    color: white;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { 
        text-shadow: 0 0 20px rgba(255,255,255,0.3), 0 0 40px rgba(255,255,255,0.2); 
    }
    to { 
        text-shadow: 0 0 30px rgba(255,255,255,0.5), 0 0 60px rgba(255,255,255,0.3); 
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: slideUp 1s var(--transition) 0.3s forwards;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    margin: 2rem 0;
    font-weight: 500;
    opacity: 0;
    animation: slideUp 1s var(--transition) 0.5s forwards;
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 3rem;
    opacity: 0;
    animation: slideUp 1s var(--transition) 0.7s forwards;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    font-weight: 400;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

.cta-button {
    display: inline-block;
    padding: 1.3rem 3.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.4s var(--transition);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: slideUp 1s var(--transition) 0.9s forwards;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    background: white;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    text-align: center;
}

.scroll-indicator:hover {
    color: white;
    transform: translateX(-50%) scale(1.1);
}

.scroll-arrow {
    display: block;
    font-size: 2rem;
}

.scroll-text {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateX(-50%) translateY(0); 
    }
    40% { 
        transform: translateX(-50%) translateY(-10px); 
    }
    60% { 
        transform: translateX(-50%) translateY(-5px); 
    }
}

/* ========================================
   Section Layouts
======================================== */
.section {
    padding: 7rem 0;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   Features Section
======================================== */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Stats Section
======================================== */
.stats {
    position: relative;
    color: white;
    text-align: center;
    overflow: hidden;
}

.stats-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-gradient);
    z-index: -1;
}

.stats-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

.stats .section-title {
    color: white;
}

.stats .section-title::after {
    background: rgba(255, 255, 255, 0.3);
}

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

.stat-item {
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s var(--transition);
}

.stat-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 4rem);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.stat-item p {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* ========================================
   Programs Section
======================================== */
.programs {
    background: white;
}

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

.program-card {
    color: white;
    padding: 2.5rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.program-card-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.program-card-2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.program-card-3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.program-card-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.program-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s var(--transition);
}

.program-card:hover::before {
    opacity: 1;
}

.program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.program-card h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.program-card p {
    line-height: 1.7;
    position: relative;
    z-index: 2;
    opacity: 0.95;
}

/* ========================================
   Facilities Section
======================================== */
.facilities {
    background: var(--bg-secondary);
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.facility-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.05);
    position: relative;
    overflow: hidden;
}

.facility-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.4s var(--transition);
}

.facility-card:hover::before {
    transform: scaleX(1);
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.15);
}

.facility-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.facility-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.facility-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Teachers Section
======================================== */
.teachers {
    background: white;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.teacher-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: zoom-in;
    transition: all 0.4s var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.05);
}

.teacher-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(99, 102, 241, 0.15);
}

.teacher-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.4s var(--transition);
}

.teacher-card:hover img {
    transform: scale(1.1);
}

/* ========================================
   Contact Section
======================================== */
.contact {
    position: relative;
    color: white;
    text-align: center;
    padding: 8rem 0;
}

.contact-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-gradient);
    z-index: -1;
}

.contact-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
}

.contact-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.contact-description {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 3rem;
    opacity: 0.95;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 1.5rem;
}

/* ========================================
   Footer
======================================== */
.footer {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 3rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    opacity: 0.8;
}

/* ========================================
   Modal
======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s var(--transition);
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition);
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: left 0.3s var(--transition);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-link {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    .section {
        padding: 4rem 0;
    }

    .features-grid,
    .program-grid,
    .facilities-grid,
    .teachers-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .program-card,
    .facility-card {
        padding: 1.5rem;
    }
}

/* ========================================
   Accessibility
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a:focus,
button:focus {
    outline: 3px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}