/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #003380;
    --primary-light: #3366b3;
    --secondary-color: #BFCCDF;
    --bg-light: #f3f6f9;
    --bg-dark: #1a1a1a;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --font-family: 'Raleway', sans-serif;
    --transition: all 0.3s ease-in-out;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-mid: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin-top: 10px;
}

.text-center .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

.text-light { color: var(--white) !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; }
.lead { font-size: 1.25rem; font-weight: 600; color: var(--primary-color); margin-bottom: 1.5rem; }
.align-center { text-align: center; }

/* Paragraph spacing for better readability */
.content-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}
.content-text p:last-child {
    margin-bottom: 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 5rem 0;
}

.shadow { box-shadow: var(--shadow-mid); border-radius: 8px; }
.shadow-light { box-shadow: var(--shadow-light); border-radius: 8px; }
.shadow-mid { box-shadow: var(--shadow-mid); border-radius: 8px; }
.shadow-heavy { box-shadow: var(--shadow-heavy); border-radius: 8px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    margin: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.nav-logo-img {
    height: 30px; /* Small enough not to stretch the navbar */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    overflow: hidden;
    background-color: var(--primary-color);
}

.hero-slideshow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* 1.5s smooth fade, 2s slow breathing zoom */
    transition: opacity 1.5s ease-in-out, transform 2s ease-out;
    transform: scale(1.1); /* Starts slightly zoomed in */
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1); /* Zooms out smoothly to normal size */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 51, 128, 0.7), rgba(0, 51, 128, 0.7));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3; /* Keeps content above the animated backgrounds */
}

.hero-logo-img {
    /* Dynamically sizes between 80px and 120px depending on screen width */
    width: clamp(80px, 15vw, 120px);
    margin: 0 auto 1.5rem;
    display: block;
    background-color: var(--white);
    border-radius: 50%;
    padding: 10px;
    object-fit: contain;
}

.hero-content h1 {
    font-size: 4rem;
    text-transform: lowercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero-divider {
    width: 100px;
    height: 4px;
    background-color: var(--secondary-color);
    border: none;
    margin: 1.5rem auto;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   Grid Layouts & Sections
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list i {
    color: var(--primary-color);
}

/* Side-by-side Images */
.image-row {
    display: flex;
    gap: 1.5rem;
    align-items: stretch; /* Forces equal height */
    justify-content: center;
}

.image-row img {
    flex: 1 1 50%;
    width: 100%;
    aspect-ratio: 4 / 5; /* Creates consistent frames */
    object-fit: contain;
    background-color: var(--white);
    border: 4px solid var(--white);
    border-radius: 8px;
}

.portrait-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 320px; /* Constrains width so total stacked height roughly matches the text */
    margin: 0 auto; /* Centers the stack in its grid column */
}

.portrait-wrapper .img-portrait {
    width: 100%; /* Keeps both images the exact same width */
    height: auto; /* Scales proportionally, showing the full image uncropped */
    display: block;
    border: none;
    border-radius: 8px;
    box-shadow: none;
}

/* Credentials Box in About Section */
.credentials-box {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid var(--primary-color);
}

.credentials-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.credentials-list {
    list-style: none;
}

.credentials-list li {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.credentials-list i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.studio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 1rem;
}

.studio-link {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--secondary-color);
    transition: var(--transition);
}

.studio-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Wider container for classes section when 4 cards in a row */
#classes .container {
    max-width: 1600px;
}

.class-card {
    background-color: var(--white);
    padding: 2.5rem 2rem 2rem 2rem;
    border-radius: 12px;
    text-align: left;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-mid);
}

.card-details {
    margin: 1.5rem 0 0.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.95rem;
}

.card-details p {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-details p:last-child {
    margin-bottom: 0;
}

.card-footer {
    padding-top: 0.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.card-link i {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.card-link:hover {
    color: var(--primary-light);
}

.card-link:hover i {
    transform: translateX(5px);
}

.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.clean-list li:last-child {
    margin-bottom: 0;
}

.clean-list i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* Card Utility Classes */
.flex-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 10px; }
.mt-auto { margin-top: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-5 { margin-top: 4rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.font-weight-bold { font-weight: 700; }
.small { font-size: 0.85rem; }

/* ==========================================================================
   Timetable Styles
   ========================================================================== */
.schedule-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.timetable-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    background-color: var(--white);
    border-radius: 8px;
    align-items: start;
    overflow: auto;
    max-height: 600px;
    margin-bottom: 2rem;
}

.timetable-grid::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.timetable-grid::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 8px;
}

.timetable-grid::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 12px;
    border: 3px solid var(--bg-light);
}

.timetable-grid::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.timetable-grid.collapsed {
    max-height: none;
    overflow-y: hidden;
}

.timetable-grid.collapsed .timetable-session {
    display: none !important;
}

.timetable-grid.collapsed .timetable-day {
    min-height: 0 !important;
}

.timetable-day {
    border-right: 1px solid var(--secondary-color);
    position: relative;
    background-color: var(--white);
}

.timetable-day:last-child {
    border-right: none;
}

.timetable-day:not(.flex-day) {
    min-height: 1210px;
    display: block;
}

.timetable-day.flex-day {
    display: flex;
    flex-direction: column;
}

.day-header {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    padding: 0 10px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
}

.timetable-day:not(.flex-day) .timetable-session {
    position: absolute;
    top: calc(60px + ((var(--start) - 9.5) * 100px));
    height: calc(var(--duration) * 100px);
    width: 100%;
    left: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    z-index: 1;
    transition: height 0.2s ease, box-shadow 0.2s ease, z-index 0.2s ease;
    padding: 10px 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.timetable-day:not(.flex-day) .timetable-session:hover {
    z-index: 10;
    height: auto;
    min-height: calc(var(--duration) * 100px);
    box-shadow: var(--shadow-mid);
}

.timetable-day.flex-day .timetable-session {
    position: relative;
    height: auto;
    min-height: 100px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.timetable-session .time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.timetable-session .name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.3;
}

.timetable-session .location {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Solid color-coded backgrounds themed to the website's blue palette */
.timetable-session.online { background-color: #E8EBED; } /* Soft gray-blue */
.timetable-session.reach  { background-color: #D1DCE8; } /* Deeper blue-gray */
.timetable-session.purely { background-color: #D4E1F0; } /* Soft blue */
.timetable-session.purely-hybrid { background-color: #EBF1FA; } /* Lightest airy blue */
.timetable-session.purely-private { background-color: #F0F4FB; } /* Almost White */
.timetable-session.private { background-color: var(--white); }

.timetable-session.periodic .name::after {
    content: '*';
    color: var(--primary-color);
}

.session-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 5px;
}

.small-link {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.timetable-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Mobile Stacked Layout Timetable */
@media (max-width: 900px) {
    .timetable-grid {
        overflow: auto;
        max-height: 600px;
        margin-bottom: 2rem;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-light) var(--bg-light);
    }

    .timetable-day {
        display: flex;
        flex-direction: column;
    }

    .timetable-session {
        padding: 15px 10px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        position: relative;
    }

    .timetable-session:last-child {
        border-bottom: none;
    }
}

/* ==========================================================================
   Testimonials - Slider
   ========================================================================== */
.testimonial-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* Break out of the container to span full viewport width */
    width: 95vw;
    max-width: 95vw;
    margin: 3rem 0 1.5rem 50%;
    transform: translateX(-50%);
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    padding: 1rem 5vw; /* Side padding so first/last cards don't stick to screen edge */
    width: 100%;
}

.testimonial-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.testimonial-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* Peek next card on mobile to encourage swiping */
    flex: 0 0 85%;
    scroll-snap-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 2 cards on tablets */
@media (min-width: 768px) {
    .testimonial-card {
        flex: 0 0 calc(50% - 1rem);
    }
}

/* 3 cards on desktop */
@media (min-width: 1024px) {
    .testimonial-card {
        flex: 0 0 calc(33.333% - 1.33rem);
    }
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-mid);
}

.slider-arrow {
    position: absolute;
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 10;
    box-shadow: var(--shadow-mid);
}

.prev-arrow { left: 2vw; }
.next-arrow { right: 2vw; }

.slider-arrow:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.slider-arrow:active {
    transform: scale(0.95);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

/* Mobile arrows positioning adjustments */
@media (max-width: 767px) {
    .testimonial-slider-wrapper {
        gap: 5px; /* Closer on mobile */
    }
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
}

.quote-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.testimonial-card p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.client-name {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0;
}

/* ==========================================================================
   Acronym Animation (Restored & Modernized)
   ========================================================================== */
.acronym-animation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 320px; /* Constrained like the original 34% width */
    margin: 0 auto;
    background-color: var(--white);
    overflow: hidden; /* Acts as the picture frame boundary */
    border: 8px solid rgba(0, 51, 128, 0.9); /* Picture frame-like border */
    border-radius: 2px;
    box-shadow: 10px 15px 25px 1px rgba(0, 0, 0, 0.5);
}

.anim-letter {
    width: 100%; /* Take up full width of the vertical container */
    height: auto;
    object-fit: contain;
    transform: translateX(100%); /* Start off-screen to the right */
    padding: 2% 0; /* Matches original img padding */
}

/* 12 second loop allows a perfect balance of entrance, reading time, and exit */
.p-letter { animation: slideP 12s infinite; padding-top: 5%; }
.i-letter { animation: slideI 12s infinite; }
.l-letter { animation: slideL 12s infinite; }
.a-letter { animation: slideA 12s infinite; }
.t-letter { animation: slideT 12s infinite; }
.e-letter { animation: slideE 12s infinite; }
.s-letter { animation: slideS 12s infinite; padding-bottom: 4%; }

/*
  Hardware-accelerated sliding with custom cubic-bezier easing applied per phase.
  - Entrance: ease-out (snappy start, settles smoothly)
  - Exit: ease-in (starts slow, whips away)
*/
@keyframes slideP {
    0% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    6%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideI {
    0%, 2% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    8%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideL {
    0%, 4% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    10%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideA {
    0%, 6% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    12%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideT {
    0%, 8% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    14%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideE {
    0%, 10% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    16%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}
@keyframes slideS {
    0%, 12% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); }
    18%, 90% { transform: translateX(0); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0); }
    96%, 100% { transform: translateX(-100%); }
}



/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
}

.contact-details li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-details a {
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    text-decoration: underline;
    color: var(--secondary-color) !important;
}

.contact-action {
    background-color: var(--white);
    padding: 3rem 2rem;
    border-radius: 8px;
    color: var(--text-main);
}

.contact-action h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.footer-logo-img {
    height: 28px;
    width: auto;
}

.footer-brand-header h3 {
    color: var(--secondary-color);
    text-transform: lowercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.footer-brand p {
    color: var(--secondary-color);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    margin-left: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .reverse-mobile .image-wrapper { order: 2; }
    .reverse-mobile .content-text { order: 1; }

    .hero-content h1 { font-size: 3.5rem; }
    .section-title { font-size: 2.2rem; }
    .modal-quote { font-size: 1.15rem; }

    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #classes .container {
        max-width: 1200px;
    }
}

@media (max-width: 950px) {
    /* Navigation - Burger menu at 950px */
    .hamburger { display: block; }
    .nav-links {
        position: fixed;
        left: 0;
        top: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: auto;
        text-align: center;
        transition: top 0.3s ease-in-out;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 2rem 0;
        gap: 1.5rem;
    }
    .nav-links.active { top: 70px; }
    .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); }
}

@media (max-width: 768px) {
    /* Section Spacing - Reduce dead space on mobile */
    .section { padding: 3.5rem 0; }

    /* Typography adjustments */
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content h2 { font-size: 1.1rem; padding: 0 10px; }
    .section-title { font-size: 2rem; }
    .lead { font-size: 1.15rem; }
    .content-text p { font-size: 1.05rem; margin-bottom: 1.2rem; }

    /* Classes Grid - stacked on mobile */
    .classes-grid {
        grid-template-columns: 1fr;
    }

    /* Layout & Images */
    .image-row {
        flex-direction: column;
        gap: 2rem;
    }
    .image-row img {
        width: 85%;
        max-width: 350px;
        max-height: 350px;
        margin: 0 auto;
        aspect-ratio: auto; /* Frees up height constraint so text on images remains legible */
    }
    .img-portrait { width: 100%; height: auto; margin: 0 auto; }

    .acronym-animation {
        max-width: 100%;
        width: 280px;
        padding: 15px;
    }

    /* Buttons */
    .btn-large {
        width: 100%;
        max-width: 350px;
    }

    /* Footer */
    .footer { padding: 3rem 0 1.5rem; }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-action {
        padding: 2rem 1.5rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-bottom: 1.5rem;
    }
    .footer-brand-header { justify-content: center; }
    .social-links { margin-top: 10px; }
    .social-links a { margin: 0 8px; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.2rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    .hero-content h2 { font-size: 1rem; }

    .image-row img {
        width: 90%;
        max-width: 280px; /* Even smaller for very small devices */
    }
}