:root {
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-dark: #4338ca;
    --accent: #8b5cf6;
    /* Violet 500 */
    --background: #f8fafc;
    --foreground: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--foreground);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--foreground);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Header / Hero */
.header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Remove static background as it will be handled by interactive-bg */
    background: #f8fafc;
}

.interactive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Dynamic gradient */
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(79, 70, 229, 0.15) 0%,
            rgba(139, 92, 246, 0.05) 30%,
            transparent 70%);
    transition: background 0.1s ease;
    /* Slight smoothing */
    pointer-events: none;
    /* Let clicks pass through */
}

.header-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.header-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out;
}

.header-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.header-buttons {
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: table;
    /* Allows the underline to match text width while centering the block */
    margin-left: auto;
    margin-right: auto;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Presentation Ecole */
.school-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.school-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.school-image img {
    transition: var(--transition);
}

.school-image:hover img {
    transform: scale(1.05);
}

/* Promotion Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Projects Preview */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 200px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 500;
}

/* Contact */
.contact-section {
    background: var(--white);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: #f8fafc;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

/* Footer */
.footer {
    background: #1e293b;
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer h4 {
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-text {
    color: #94a3b8;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 2.5rem;
    }

    .school-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu would typically be needed here */
    .section-title {
        font-size: 2rem;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1002;
    /* Above the mobile menu */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary);
    transition: var(--transition);
    border-radius: 3px;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Hidden by default (off-screen right) */
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    /* Smooth slide effect */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
    /* Slide in to view */
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Staggered animation for links when menu is open */
.mobile-menu.active .mobile-nav-links li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active .mobile-nav-links li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.active .mobile-nav-links li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.active .mobile-nav-links li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu.active .mobile-nav-links li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        /* Hide default nav links */
    }
}

/* Close Menu Button */
.close-menu-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    z-index: 1003;
}


/* --- New Section Styles --- */

/* School Stats Row */
.stats-row {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 150px;
    border-left: 4px solid var(--primary);
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Promo Cards */
.promo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.promo-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Promo Spirit */
.promo-spirit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.spirit-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* Featured Project */
.featured-project {
    margin-bottom: 2rem;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    height: 500px;
}

.featured-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.featured-overlay h2 {
    color: white !important;
}

/* Responsive Font Size for Featured Project */
@media (max-width: 768px) {
    .featured-overlay h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
}

.project-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.thumb-card {
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
}

.p-2 {
    padding: 1.5rem;
}

.thumb-card:hover {
    transform: translateY(-3px);
}

.thumb-card img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

/* Buttons */
.btn-white {
    background: white;
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-white:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Contact Split Layout */
.contact-split-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    /* Connected look or gap? Image suggests separate but close. Let's use gap. */
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card-blue {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 3rem;
    border-radius: 20px;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-item .icon {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-form-simple {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
}

.w-100 {
    width: 100%;
}

.text-xs {
    font-size: 0.75rem;
}

.opacity-90 {
    opacity: 0.9;
}

.opacity-70 {
    opacity: 0.7;
}

/* Responsive Updates for New Sections */
@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }

    .promo-spirit {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .featured-project {
        height: 350px;
    }

    .project-thumbnails {
        grid-template-columns: 1fr;
        /* Stack thumbnails on mobile */
    }

    .contact-split-layout {
        grid-template-columns: 1fr;
    }
}