/* ========== Landing Page Redesign ========== */

/* --- Hero Section: The Door --- */

/* --- Hero Section: The Door --- */

/* --- Hero Section: The Door --- */

/* --- Hero Section: The Door --- */

.hero-section {
    position: relative;
    /* Height is viewport minus navbar */
    height: calc(100vh - var(--nav-h));
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #A0ECE8;
    background: radial-gradient(circle at 90% 50%, #D1FAFA 0%, #A0ECE8 100%);
    overflow: hidden;
    color: var(--text);
    perspective: 1000px;
    /* Removed padding-top/bottom to allow pure centering in the available space */
    padding: 0;
}

[data-theme="dark"] .hero-section {
    background-color: #0f0f0f;
    background: radial-gradient(circle at 30% 50%, #1a1a1a 0%, #000000 100%);
    color: white;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 100px;
    align-items: center;
    gap: 60px;
    height: 100%;
    z-index: 10;
}

/* Left Content */
.hero-text-content {
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease forwards 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Pure centering, no transform hacks needed */
    transform: none;
}

.hero-main-title {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: white;
    -webkit-text-fill-color: white;
    -webkit-text-stroke: 2px black;
    text-shadow: none;
}

.hero-main-title .gradient-text {
    background: none;
    -webkit-text-fill-color: white;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    color: white;
    -webkit-text-stroke: 2px #A628FA;
    text-shadow: 0 0 20px rgba(166, 40, 250, 0.4);
}

[data-theme="dark"] .hero-main-title {
    color: white;
    -webkit-text-stroke: 0;
    text-shadow: none;
}

[data-theme="dark"] .hero-main-title .gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    text-shadow: none;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 1.8vw, 1.35rem);
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 600px;
}

[data-theme="dark"] .hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Right Visual (Door) */
.hero-visual-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align door to right edge for symmetry */
    justify-content: center;
    perspective: 1200px;
    opacity: 0;
    animation: fadeInScale 1s ease forwards 0.4s;
    position: relative;
    height: 100%;
}

.door-ambient-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    /* Stronger, more vibrant glow */
    background: radial-gradient(circle at center, rgba(166, 40, 250, 0.6) 0%, rgba(126, 34, 206, 0.4) 55%, transparent 80%);
    z-index: 0;
    right: -240px;
    top: 50%;
    transform: translateY(-50%);
    animation: doorBreathe 6s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: multiply;
    filter: blur(100px);
    opacity: 0.9;
}

[data-theme="dark"] .door-ambient-glow {
    /* Much brighter for dark mode */
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.6) 0%, rgba(37, 99, 235, 0.4) 55%, transparent 80%);
    mix-blend-mode: screen;
    filter: blur(100px);
    opacity: 0.9;
}

@keyframes doorBreathe {

    0%,
    100% {
        transform: translateY(-50%) scale(0.85);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-50%) scale(1.25);
        opacity: 1;
    }
}

.door-container {
    position: relative;
    width: 320px;
    height: 560px;
    transform-style: preserve-3d;
    cursor: pointer;
    transform: rotateY(0deg);
    transition: transform 0.5s ease;
    z-index: 5;
    /* Above glow */
}

.door-container:hover {
    transform: rotateY(0deg);
}

/* Ground Lines */
.door-container::before,
.door-container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    /* Match flush frame bottom */
    width: 150px;
    /* Longer lines for better visual */
    height: 2px;
    background: var(--muted);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.door-container::before {
    right: calc(100% + 20px);
    /* Match 20px frame border */
    background: linear-gradient(to left, var(--muted), transparent);
}

.door-container::after {
    left: calc(100% + 20px);
    /* Match 20px frame border */
    background: linear-gradient(to right, var(--muted), transparent);
}

/* Door Frame (More Realistic) */
.door-frame {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -2px;
    /* Sits flush on ground */
    border: 20px solid #333;
    /* Darker modern frame */
    border-bottom: none;
    background: transparent;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Highlight top */
    /* Inner depth */
    z-index: 10;
    pointer-events: none;
    border-radius: 4px 4px 0 0;
}

[data-theme="dark"] .door-frame {
    border-color: #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* The Door Itself */
.door {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    /* Realistic Texture - Dark */
    background-image: url('/assets/door-texture-dark.png');
    background-size: cover;
    background-position: center;
    transform-origin: left;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 20;
    border: 1px solid #333;
}

[data-theme="dark"] .door {
    background: #1a1a1a;
    /* Realistic Texture - Dark */
    background-image: url('/assets/door-texture-dark.png');
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 5px 0 15px rgba(0, 0, 0, 0.5);
    border-color: #333;
}

.door-crest {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%) translateZ(1px);
    width: auto;
    padding: 12px 30px;

    /* Beautiful Glass/Crystal Look */
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Typography */
    color: #60a5fa;
    /* Sky Blue */
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Garamond', 'Georgia', serif;
    text-align: center;
    letter-spacing: 4px;

    /* Text Effect */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    z-index: 22;
    pointer-events: none;
    transition: all 0.4s ease;
}

[data-theme="dark"] .door-crest {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.6));
    border-color: rgba(255, 255, 255, 0.1);
    color: #60a5fa;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.door-notice {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%) translateZ(1px);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .door-notice {
    color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hide notice when door is open/hovered */
.door-container:hover .door-notice {
    opacity: 0;
}

/* Door Handle */
.door-handle {
    position: absolute;
    right: 24px;
    top: 50%;
    width: 10px;
    height: 64px;
    background: #e0e0e0;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .door-handle {
    background: #e0e0e0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.door-glow {
    position: absolute;
    top: 50%;
    right: 25px;
    width: 20px;
    height: 20px;
    background: rgba(100, 200, 255, 0.6);
    filter: blur(15px);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s;
}

.door:hover .door-glow {
    opacity: 1;
}

/* Door Interaction */
.door-container:hover .door {
    transform: rotateY(-115deg);
}

/* Door Interior (Behind the door) */
/* Door Interior (Behind the door) */
/* Door Interior (Behind the door) */
.door-interior {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Rich Cosmic/Nebula Gradient */
    background: linear-gradient(90deg, #450a0a 0%, #020617 50%, #083344 100%);
    /* Soft Red -> White -> Soft Cyan */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    z-index: 10;
    transform: rotateY(0deg);
    backface-visibility: hidden;
    /* Colored shadow to match */
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .door-interior {
    /* Rich Cosmic/Nebula Gradient for Dark Mode - Kept exactly as user likes */
    background: linear-gradient(90deg, #450a0a 0%, #020617 50%, #083344 100%);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9);
}

/* Inner Glow Effects behind content */
/* Inner Glow Effects behind content */
.interior-glow-effects {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    /* Behind interior-content (z:2) and overlay (z:1) */
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: normal;
}

[data-theme="dark"] .interior-glow-effects {
    mix-blend-mode: screen;
}

/* Burst Core */
.interior-burst {
    position: absolute;
    inset: 0;
    /* Dark Mode burst */
    background: radial-gradient(circle, rgba(147, 197, 253, 0.3) 0%, rgba(29, 78, 216, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    /* Dark Mode: Keep Inverse Logic */
    animation: innerBreathe 6s ease-in-out infinite;
}

/* Rotating Rays */
.interior-rays {
    position: absolute;
    inset: -50%;
    /* Subtle White Rays for Light Mode */
    background: repeating-conic-gradient(from 0deg,
            rgba(100, 180, 255, 0) 0deg,
            rgba(56, 189, 248, 0.08) 15deg,
            /* Sky Blue */
            rgba(100, 180, 255, 0) 30deg);
    border-radius: 50%;
    /* Dark Mode: Keep Inverse Logic */
    animation: innerRotate 40s linear infinite, innerBreathe 6s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 60%);
    mask-image: radial-gradient(circle, black 0%, transparent 60%);
    filter: blur(8px);
}

.interior-rays-2 {
    position: absolute;
    inset: -50%;
    /* Subtle Cyan Rays for Light Mode */
    background: repeating-conic-gradient(from 15deg,
            rgba(255, 255, 255, 0) 0deg,
            rgba(168, 85, 247, 0.06) 8deg,
            /* Purple instead of Gold for Dark Mode */
            rgba(255, 255, 255, 0) 20deg);
    border-radius: 50%;
    /* Dark Mode: Keep Inverse Logic */
    animation: innerRotateReverse 50s linear infinite, innerBreathe 6s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(circle, black 10%, transparent 50%);
    mask-image: radial-gradient(circle, black 10%, transparent 50%);
    mix-blend-mode: screen;
}

/* Dark mode adjustments - keep colors vibrant but subtle and use screen blending */
[data-theme="dark"] .interior-burst {
    background: radial-gradient(circle, rgba(147, 197, 253, 0.3) 0%, rgba(29, 78, 216, 0.2) 50%, transparent 70%);
    /* Dark Mode: Keep Inverse Logic */
    animation: innerBreathe 6s ease-in-out infinite;
}

[data-theme="dark"] .interior-rays {
    background: repeating-conic-gradient(from 0deg,
            rgba(100, 180, 255, 0) 0deg,
            rgba(56, 189, 248, 0.08) 15deg,
            /* Sky Blue */
            rgba(100, 180, 255, 0) 30deg);
    /* Dark Mode: Keep Inverse Logic */
    animation: innerRotate 40s linear infinite, innerBreathe 6s ease-in-out infinite;
}

[data-theme="dark"] .interior-rays-2 {
    background: repeating-conic-gradient(from 15deg,
            rgba(255, 255, 255, 0) 0deg,
            rgba(168, 85, 247, 0.06) 8deg,
            /* Purple instead of Gold for Dark Mode */
            rgba(255, 255, 255, 0) 20deg);
    mix-blend-mode: screen;
    /* Dark Mode: Keep Inverse Logic */
    animation: innerRotateReverse 50s linear infinite, innerBreathe 6s ease-in-out infinite;
}

@keyframes innerRotateReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes innerBreatheSync {

    /* Synchronized with Outer Glow:
       Low (0,100) -> High (50)
    */
    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes innerBreathe {

    /* Inverse synchronization:
       Outer: Low (0,100) -> High (50)
       Inner: High (0,100) -> Low (50)
    */
    0%,
    100% {
        opacity: 1;
        transform: scale(1.2);
    }

    50% {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

@keyframes innerRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Overlay for text readability inside door */
.door-interior::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    /* Keeping this, but effects might need to sit relative to this. 
                   Actually, let's bump content z-index to 3 just to be safe. */
}

[data-theme="dark"] .door-interior::before {
    background: rgba(0, 0, 0, 0.5);
}

.interior-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    transform: translateZ(50px);
    transition: all 0.5s ease 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.interior-logo {
    width: 200px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    content: url('/assets/logos/Word Forward Academy Dark Theme.svg');
}

.interior-msg {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Dark Mode Logo Swap */
[data-theme="dark"] .interior-logo {
    content: url('/assets/logos/Word Forward Academy Dark Theme.svg');
}

.btn-premium-door {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-premium-door::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-premium-door:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(6, 182, 212, 0.4);
}

.btn-premium-door:hover::before {
    opacity: 1;
}

/* Force Door Open State */
.door.force-open {
    transform: rotateY(-115deg) !important;
    /* Instantly lock to target. Since target == hover start, this is 0-change freeze. */
    transition: none !important;
}

/* Door Entry Animation - CONTAINER (Movement Only) */
.zooming-in {
    /* Ultra-smooth start (quint-like) */
    animation: entryZoom 2s cubic-bezier(0.83, 0, 0.17, 1) forwards !important;
    pointer-events: none;
    z-index: 99999 !important;
    transform-origin: center center;
    transform-style: preserve-3d !important;
    /* NO perspective here, inherited from parent */
}

/* Door Dissolve Animation - CHILD (Fade/Blur Only) */
/* Applying fade to the child prevents flattening the parent's 3D context */
.zooming-in .door {
    animation: entryDissolve 2s cubic-bezier(0.83, 0, 0.17, 1) forwards !important;
}

/* Allow the hero section to show the massive door zooming out */
.hero-section.allow-overflow {
    overflow: visible !important;
    z-index: 99999;
}

/* Hide everything ELSE when zooming */
body.zoom-active header,
body.zoom-active .hero-text-content,
body.zoom-active .rotating-text-section,
body.zoom-active .door-instruction,
body.zoom-active .scroll-indicator,
body.zoom-active .mobile-menu,
body.zoom-active .door-ambient-glow {
    opacity: 0 !important;
    transition: opacity 1s ease;
    /* Slower fade for smoothness */
    pointer-events: none;
}

/* Hide Interior Content Immediately on Zoom */
.zooming-in .interior-content {
    opacity: 0 !important;
    transition: opacity 0.2s ease;
}

/* Hide External Door Elements Immediately on Zoom */
.zooming-in .door-crest,
.zooming-in .door-notice {
    opacity: 0 !important;
    transition: none !important;
    /* Instant hide */
    visibility: hidden;
}

@keyframes entryZoom {
    0% {
        transform: scale(1) translateZ(0);
    }

    100% {
        transform: scale(20) translateZ(0);
    }
}

@keyframes entryDissolve {
    0% {
        opacity: 1;
        filter: blur(0px);
    }

    10% {
        opacity: 0.8;
        filter: blur(2px);
    }

    100% {
        opacity: 0;
        filter: blur(20px);
    }
}

.page-fading-out {
    animation: fadeOutUI 0.6s ease forwards;
    pointer-events: none;
}

@keyframes fadeOutUI {
    to {
        opacity: 0;
        filter: blur(10px);
    }
}

.door-container:hover .interior-content {
    opacity: 1;
    transform: translateZ(0);
}

.interior-content h3 {
    font-size: 1.8rem;
    margin: 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.interior-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin: 8px 0 20px;
    font-weight: 500;
}

.door-instruction {
    position: absolute;
    bottom: -100px;
    /* Increased gap/padding from door */
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

.door-instruction p {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.7;
}

[data-theme="dark"] .door-instruction p {
    color: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-layout {
        grid-template-columns: 1fr;
        padding-top: 40px;
        padding-bottom: 60px;
        text-align: center;
        gap: 40px;
    }

    .hero-text-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-main-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual-right {
        order: -1;
        /* Show door first on mobile? Or content first? Usually content. keeping visual after.*/
        order: 1;
        margin-top: 20px;
    }

    .door-container {
        width: 240px;
        height: 400px;
    }
}

/* --- Rotating Text Section --- */
.rotating-text-section {
    padding: 120px 20px;
    background: var(--card);
    /* Light grey/white depending on theme */
    overflow: hidden;
}

[data-theme="dark"] .rotating-text-section {
    background: #111;
}

.rotating-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1600px;
    /* Wider layout */
    margin: 0 auto;
    align-items: center;
    gap: 120px;
    /* More breathing room */
}

/* Visual Column */
.rotating-visual-col {
    display: flex;
    justify-content: flex-end;
}

.rotating-image-container {
    width: 100%;
    max-width: 800px;
    /* Bigger image width */
    aspect-ratio: 4/3;
    /* Reverted to taller ratio */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
    position: relative;
    background: #000;
}

.rotating-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease;
    /* Smoother fade */
    opacity: 0;
    /* Start hidden until JS loads */
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Class added by JS to trigger pan */
.pan-active {
    animation: panOutEffect 10s ease-out forwards;
}

@keyframes panOutEffect {
    from {
        transform: scale(1.15);
    }

    to {
        transform: scale(1);
    }
}

/* Fade animation class */
.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

/* Text Column */
.rotating-text-col {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.rotating-pre {
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* Massive text */
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--text);
    line-height: 1.1;
}

[data-theme="dark"] .rotating-pre {
    color: white;
}

.rotating-window {
    height: auto;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.rotating-word {
    font-size: clamp(3.5rem, 7vw, 6rem);
    /* Massive gradient word */
    font-weight: 800;
    line-height: 1.1;
    display: inline-block;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: none;
    padding-bottom: 20px;
    /* Prevent clipped descenders */
    padding-right: 20px;
    /* Prevent clipped italic */
}

/* Mobile */
@media (max-width: 968px) {
    .rotating-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .rotating-visual-col {
        justify-content: center;
        order: -1;
        /* Image Top */
    }

    .rotating-text-col {
        align-items: center;
        text-align: center;
    }

    .rotating-window {
        justify-content: center;
    }
}

/* ... Animations ... */
.slide-up-in {
    animation: slideUpIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-up-out {
    animation: slideUpOut 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

/* --- Content Sections --- */
.landing-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-eyebrow {
    color: var(--blue-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Skeletons (Loading State) --- */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.skeleton-card {
    background: var(--card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: 300px;
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
    transform: skewX(-20deg);
}

[data-theme="dark"] .skeleton-shimmer {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
}

.skeleton-block {
    background: #eee;
    border-radius: 8px;
    margin-bottom: 16px;
}

[data-theme="dark"] .skeleton-block {
    background: #333;
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%) skewX(-20deg);
    }

    100% {
        transform: translateX(150%) skewX(-20deg);
    }
}

/* --- Course Card (Replaces Skeletons) --- */
.course-card,
.carousel-card {
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.course-card:hover,
.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cc-image {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    /* Gradient handled inline */
}

.cc-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.course-card:hover .cc-icon {
    transform: scale(1.1);
}

.cc-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cc-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

[data-theme="dark"] .cc-badge {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.cc-price {
    font-weight: 700;
    color: var(--text);
}

.cc-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
    color: var(--text);
}

.cc-footer {
    margin-top: auto;
    font-size: 0.95rem;
    color: #2563eb;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .course-card {
    background: #1e1e1e;
    border-color: #333;
}

/* Ensure carousel cards have fixed width if needed, or let grid handle it */
.carousel-card {
    min-width: 300px;
    scroll-snap-align: start;
}

/* --- Infinity Carousel --- */
.carousel-section {
    padding: 100px 0;
    background: var(--cream);
    overflow: hidden;
    position: relative;
}

.carousel-track-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 32px;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding: 20px 0;
}

.carousel-track:hover {
    animation-play-state: paused;
}

/* Carousel card styles consolidated with course-card above */

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 16px));
    }

    /* Shift by half track + half gap */
}

/* Premium Gradients */
.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    /* Fix rendering artifacts on inline elements */
    padding-bottom: 0.1em;
    /* Prevent descender clipping */
}