:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #f0f0f0;
    --secondary-bg: #111111;
    --font-main: 'Roboto', 'Inter', sans-serif;
    --font-heading: 'Inter', 'Roboto', sans-serif;
    --spacing-xs: 1rem;
    --spacing-sm: 2rem;
    --spacing-md: 4rem;
    --spacing-lg: 8rem;
    --spacing-xl: 12rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 8rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-sm);
    width: 100%;
}

h3 {
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

p {
    font-size: 1.1rem;
    max-width: 60ch;
    opacity: 0.8;
}

a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* Structure */
.container {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-xs);
}

.section {
    padding: var(--spacing-lg) 0;
}

/* Header */
header {
    padding: var(--spacing-sm) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    mix-blend-mode: difference;
    /* Makes text visible on light/dark backgrounds */
    color: #fff;
    transition: transform 0.3s ease;
}

.hamburger {
    display: none;
    /* Hidden on desktop */
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.lang-switch {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: bold;
}

.lang-switch a.active {
    text-decoration: underline;
    opacity: 1;
}

/* Hero */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--bg-color);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    /* animation: scaleIn 20s infinite alternate ease-in-out; - Removed to avoid conflict with scroll zoom */
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
}

.hero h1 {
    margin-bottom: var(--spacing-sm);
}

.hero .btn {
    display: inline-block;
    border: 1px solid var(--text-color);
    padding: 1rem 3rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-top: var(--spacing-md);
    transition: all 0.3s ease;
}

.hero .btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Content Sections */
.intro {
    background-color: var(--bg-color);
    text-align: left;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.card {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--spacing-sm);
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 1);
}

/* Responsive Grid */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-md);
    align-items: start;
}

@media (max-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* Carousel */
.carousel-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome Safari */
}

.carousel-track {
    display: inline-flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-xs);
    /* Use xs spacing for left/right padding */
}

/* Ensure padding on the left aligns with container */
.carousel-track::before {
    content: '';
    display: block;
    width: calc((100vw - min(1600px, 90%)) / 2 - var(--spacing-xs));
    /* Calculate offset to align with .container */
    flex-shrink: 0;
}

/* Ensure padding on the right */
.carousel-track::after {
    content: '';
    display: block;
    width: calc((100vw - min(1600px, 90%)) / 2);
    padding-right: var(--spacing-xs);
    flex-shrink: 0;
}


.carousel-slide {
    width: 300px;
    /* Fixed width for uniformity */
    height: 200px;
    /* Fixed height */
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    /* Optional rounded corners */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.carousel-slide img:hover {
    filter: grayscale(0%);
}

/* Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-md);
}

.video-item {
    width: 100%;
}

/* Footer */
footer {
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Animations */
@keyframes scaleIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    /* Disable mix-blend-mode on header when menu is active */
    header.menu-active {
        mix-blend-mode: normal;
    }

    /* Hamburger Menu Styles */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1002;
        /* Above menu */
        position: relative;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #fff;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        display: flex;
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        background-color: rgba(5, 5, 5, 1);
        /* Fully opaque background for better readability */
        backdrop-filter: blur(10px);
        /* Add blur to content behind */
        -webkit-backdrop-filter: blur(10px);
        /* Safari support */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        /* Higher than header to be in forefront */
        padding: 0;
        gap: 2rem;
        mix-blend-mode: normal;
        /* Override header's mix-blend-mode for readability */
        color: #ffffff;
        /* Ensure text is white */
    }

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

    .nav-links li {
        opacity: 0;
        /* Animate items in */
        transition: opacity 0.5s ease 0.2s;
    }

    .nav-links.active li {
        opacity: 1;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Lang switch on mobile - optional, move into menu or keep top right? 
       For now, let's keep it visible or hide it if it overlaps. 
       Usually better to put it inside the menu for mobile. 
       Let's leave it outside for now but ensure z-index is correct. */
    .lang-switch {
        z-index: 1002;
        /* Ensure clickable */
    }

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

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

    .container {
        width: 95%;
    }
}

/* ============================================
   ENHANCED FEATURES STYLES
   ============================================ */

/* 1. SCROLL ANIMATIONS */
.fade-in-up,
.fade-in,
.slide-in-left,
.slide-in-right {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up {
    transform: translateY(30px);
}

.slide-in-left {
    transform: translateX(-30px);
}

.slide-in-right {
    transform: translateX(30px);
}

.fade-in-up.animate-in,
.fade-in.animate-in,
.slide-in-left.animate-in,
.slide-in-right.animate-in {
    opacity: 1;
    transform: translate(0, 0);
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {

    .fade-in-up,
    .fade-in,
    .slide-in-left,
    .slide-in-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* 2. AUTO-HIDE HEADER */
header {
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

/* 4. PARALLAX EFFECT */
.hero-bg {
    will-change: transform;
}

/* 9. LOADING ANIMATION */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.page-loader.fade-out {
    opacity: 0;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--text-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

/* 8. TESTIMONIALS CAROUSEL */
.testimonials-section {
    background-color: var(--secondary-bg);
    padding: var(--spacing-lg) 0;
    position: relative;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

.testimonial-slide {
    display: none;
    text-align: center;
    padding: 0 var(--spacing-md);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.testimonial-slide.active {
    display: block;
    opacity: 1;
}

.testimonial-quote {
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
}

.testimonial-author {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.testimonial-role {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: 0.5rem;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: var(--spacing-md);
}

.carousel-arrow {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    border-color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.carousel-dots {
    display: flex;
    gap: 0.75rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background-color: var(--text-color);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* 7. INTERACTIVE SCHEDULE CALENDAR */
.schedule-calendar {
    display: grid;
    grid-template-columns: auto repeat(2, 1fr);
    gap: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-md);
}

.calendar-header {
    background-color: var(--secondary-bg);
    padding: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.calendar-time {
    background-color: var(--secondary-bg);
    padding: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.calendar-cell {
    background-color: var(--bg-color);
    padding: 1.5rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.3s ease;
}

.calendar-cell.has-class {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.03);
}

.calendar-cell.has-class:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.class-name {
    font-weight: 500;
    text-align: center;
}

.class-details {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    z-index: 100;
    min-width: 250px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.class-details.active {
    opacity: 1;
    pointer-events: auto;
}

.class-details h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
}

.class-details p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .schedule-calendar {
        grid-template-columns: 1fr;
        gap: 0;
        background-color: transparent;
        border: none;
    }

    .calendar-header {
        display: none;
    }

    .calendar-time {
        min-width: auto;
        padding: 2rem 1.5rem 0.5rem;
        background-color: transparent;
        border: none;
        justify-content: flex-start;
        font-size: 1rem;
        color: var(--accent-color);
        font-weight: 900;
        letter-spacing: 0.05em;
    }

    .calendar-cell {
        padding: 0;
        min-height: 0;
        border: none;
        display: none;
        /* Hide by default */
    }

    .calendar-cell.has-class {
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        background-color: rgba(255, 255, 255, 0.05);
        margin: 1rem 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        align-items: flex-start;
    }

    .calendar-cell.has-class .class-name {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        text-align: left;
    }

    .calendar-cell::before {
        content: attr(data-day);
        display: block;
        font-size: 0.75rem;
        opacity: 0.6;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: bold;
        color: var(--accent-color);
    }

    .class-details {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
    }

    .testimonial-quote {
        font-size: 1.2rem;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}