/* 
    Vibrant Cinematic Landing Page - Organic Tech Preset
*/

:root {
    /* Colors - Organic Tech */
    --primary-color: #282828;
    --accent-yellow: #FBCE3D;
    --accent-red: #CC5833;
    --bg-cream: #F2F0E9;
    --text-dark: #1A1A1A;
    --white: #FFFFFF;

    /* Breakpoints */
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
    --bp-2xl: 1536px;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Variables */
    --radius-lg: 2.5rem;
    --radius-md: 1.5rem;
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-enter: 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Typography Fluidity */
h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.3;
}

p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 1.5em;
    display: block;
    background: linear-gradient(to right,
            var(--text-dark) 0%,
            var(--text-dark) 35%,
            #e5a9a9 45%,
            /* faint organic pink */
            #e5dca9 50%,
            /* faint organic gold */
            #a9e5c9 55%,
            /* faint organic green */
            #a9bae5 60%,
            /* faint organic blue */
            var(--text-dark) 70%,
            var(--text-dark) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textRainbowShine 4s linear infinite -1.5s;
    /* Negative delay makes animation start halfway, appearing earlier */
}

@keyframes textRainbowShine {
    to {
        background-position: 200% center;
    }
}

.accent-text {
    font-weight: 800;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Container */
.container {
    max-width: var(--bp-xl);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
    /* All content sits above absolute decorative backgrounds */
}

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

/* Buttons & Links */
a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-smooth);
}

.btn-primary,
.btn-secondary,
.btn-cta,
.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: none;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.btn-primary {
    background-color: var(--accent-red);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-white {
    background-color: var(--white);
    color: var(--text-dark);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-white:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1000px;
    z-index: 100;
    border-radius: 3rem;
    background: rgba(242, 240, 233, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-smooth);
}

/* Removed hiding navbar on mobile to allow floating bar */

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem 0.75rem 2rem;
    transition: all var(--transition-smooth);
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .navbar:not(.scrolled) {
        background: transparent;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        border: 1px solid transparent;
        box-shadow: 0 0 0 transparent;
    }
    
    .navbar:not(.scrolled) .nav-container {
        padding: 1.5rem 1rem 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 1rem;
    }
    .navbar .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .navbar {
        width: 80%; /* 讓手機版稍微寬一點點，但仍在畫面內 */
    }
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-red);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    outline: none;
}
.mobile-menu-btn .material-icons {
    font-size: 2rem;
}

@media (max-width: 1023px) {
    .desktop-btn {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(242, 240, 233, 0.95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 1.5rem;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 1.5rem;
        text-align: center;
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 99;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(10px);
    }
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

/* Hero Section */
/* Hero Section Layout */
.hero {
    min-height: 100dvh;
    position: relative;
    background-color: var(--bg-cream);
    overflow: hidden;
}

.hero-split-layout {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    position: relative;
    z-index: 2;
}

@media (min-width: 1024px) {
    .hero-split-layout {
        flex-direction: row;
        align-items: center;
    }
}

.hero-left-panel {
    padding: 8rem 5vw 4rem;
    position: relative;
    z-index: 10;
    flex: none; /* Removed flex: 1 so it doesn't push the right panel down */
}

@media (max-width: 768px) {
    .hero, .hero-split-layout {
        min-height: auto;
    }
    .hero-left-panel {
        padding-top: 8rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-left-panel {
        width: 45%;
        flex: none;
        padding-left: 10vw;
    }
}

.hero-content {
    color: var(--text-dark);
}

@media (min-width: 1024px) {
    .hero-content {
        width: 140%;
        /* 40% overlaps onto right panel */
        max-width: 800px;
    }
}

.hero-title {
    text-shadow: 0px 4px 30px rgba(242, 240, 233, 0.9);
}

.hero-subtitle {
    margin: 1.5rem 0 2.5rem;
    font-size: 1.25rem;
    color: var(--text-dark);
    max-width: 80%;
    text-shadow: 0px 2px 20px rgba(242, 240, 233, 0.9);
}

/* Sections */
.section {
    padding: 6rem 0;
}

/* Carousel / Banner Styles / Right Panel */
.hero-right-panel {
    width: 100%;
    aspect-ratio: 1140 / 610;
    height: auto;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-right-panel {
        position: absolute;
        top: 0;
        bottom: 0;
        margin: auto;
        right: 0;
        width: 65%;
        height: max-content; /* Let the aspect ratio dictate height */
    }
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .carousel {
        border-radius: 4rem 0 0 4rem;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
    }
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    display: block;
    transform: scale(1.03);
}

.carousel-item.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background var(--transition-smooth);
}

.carousel-item:hover .ad-banner-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.banner-text {
    color: var(--white);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    bottom: 2rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-smooth);
}

.carousel-control:hover {
    background: var(--white);
    transform: scale(1.1);
    color: var(--accent-red);
}

.carousel-control.prev {
    right: 4.5rem;
}

.carousel-control.next {
    right: 1.5rem;
}

.carousel-control .material-icons {
    font-size: 24px;
}

/* Admission Channels Grid */
.admission-section {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    margin: 3rem 1rem 3rem;
    position: relative;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

/* Scroll Interactive Title */
.scroll-color-text {
    color: #0b5fb8;
    transition: color 0.1s ease-out;
}

.channel-card {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    border: 1px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.channel-image {
    width: 100%;
    height: 180px;
    overflow: visible;
    position: relative;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.channel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.channel-card .icon-wrapper {
    position: absolute;
    bottom: -25px;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: transform var(--transition-smooth);
}

.channel-content {
    padding: 3.5rem 2rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.channel-card h3 {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    transition: color var(--transition-smooth);
}

.channel-content p {
    color: var(--text-dark);
    opacity: 0.8;
}

.explore-btn {
    margin-top: auto;
    padding-top: 1.5rem;
    color: var(--accent-red);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateX(-15px);
    transition: all var(--transition-smooth);
}

/* Detailed Hover Interactions */
.channel-card:hover {
    background: var(--white);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
}

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

.channel-card:hover .icon-wrapper {
    transform: translateY(-5px) scale(1.05);
}

.channel-card:hover h3 {
    color: var(--accent-red);
}

.channel-card:hover .explore-btn {
    opacity: 1;
    transform: translateX(0);
}

.explore-btn .material-icons {
    font-size: 1.2rem;
    transition: transform var(--transition-bounce);
}

.channel-card:hover .explore-btn .material-icons {
    transform: translateX(5px);
}

/* Section Boundary English Titles */
.section-boundary-title {
    position: absolute;
    top: -16px;
    left: 0;
    padding-left: 4vw;
    width: 100%;
    font-size: clamp(3rem, 12vw, 15rem);
    /* scaled down for phones */
    font-weight: 800;
    font-family: var(--font-sans);
    line-height: 0.8;
    color: inherit;
    opacity: 0.5;
    /* Requested opacity */
    z-index: 0;
    /* lowest above background */
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    transform: translateY(-50%);
    letter-spacing: -0.02em;
    overflow: hidden;
    /* clip text if it exceeds viewport width */
}

@media (max-width: 768px) {
    .section-boundary-title {
        font-size: 15vw;
        left: 0;
        padding-left: 1rem;
        top: 0;
    }
}

/* Departments Section */
.departments-section {
    background-color: var(--accent-yellow);
    border-radius: var(--radius-lg);
    margin: 3rem 1rem;
    padding: 6rem 0 4rem;
    /* reduced extra giant padding at top */
    position: relative;
    overflow: hidden;
    /* restored to prevent watermark from bleeding off the yellow card */
}

.departments-section .container {
    position: relative;
    z-index: 2;
}

.departments-section .subtitle-en {
    display: block;
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

/* Mobile: single-column, every card fills the full row */
@media (max-width: 768px) {
    .departments-grid {
        grid-template-columns: 1fr;
    }

    /* Reset all span overrides so no card overflows horizontally */
    .dept-card[style*="grid-column"] {
        grid-column: span 1 !important;
    }

    /* Stack the inner multi-column lists vertically */
    .dept-card > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* 6-column grid layout for Desktop */
@media (min-width: 1200px) {
    .departments-section .container {
        max-width: var(--bp-2xl);
        /* expand layout slightly to securely fit 6 columns */
    }

    .departments-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .dept-card {
        padding: 1.2rem;
        /* tighten padding on extreme wide screens */
    }

    .dept-card h4 {
        font-size: 1.1rem;
    }
}

.dept-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-smooth);
}

.dept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.dept-card h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

.dept-card h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-yellow);
    transition: height var(--transition-bounce), background-color var(--transition-smooth);
    border-radius: 2px;
}

.dept-card:hover h4::after {
    height: 8px;
    background-color: var(--accent-yellow);
}

.dept-list {
    list-style: none;
}

.dept-list li {
    margin-bottom: 0.8rem;
}

.dept-list a {
    color: #555;
    font-size: 18px;
}

.dept-list a:hover {
    color: var(--accent-red);
    padding-left: 5px;
}

/* Info Section */
.info-section {
    padding-top: 4rem;
}

.avatar-icon {
    width: 80px;
    height: 80px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.avatar-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-icon span {
    font-size: 36px;
}

.info-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.info-image {
    height: 300px;
    background-size: cover;
    background-position: center;
}

.info-content {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.accent-title {
    color: var(--accent-red);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-content h4 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.btn-text {
    margin-top: 2rem;
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    display: inline-block;
    width: fit-content;
}

.btn-text::after {
    content: '→';
    margin-left: 5px;
    transition: transform var(--transition-bounce);
    display: inline-block;
}

.btn-text:hover::after {
    transform: translateX(5px);
}

.split-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
}

@media (max-width: 768px) {
    .split-content {
        flex-direction: column;
    }
}

/* Action Section (Bottom 3 columns) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    max-width: var(--bp-2xl);
    margin: 4rem auto 0;
}

.action-block {
    background-color: var(--accent-yellow);
    padding: 6rem 2rem 4rem;
    margin-top: 5rem;
    /* space for popping avatar */
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.action-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.action-block h3 {
    margin: 0 0 1rem;
}

.action-block p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.action-block .btn-white {
    width: 80%;
    font-size: 20px;
}

/* Premium 3D Character Pop-out styling */
.action-block .avatar-icon.small {
    width: 220px;
    height: 220px;
    position: absolute;
    top: -130px;
    /* half out, half in */
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.action-block .avatar-icon.small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-block:hover .avatar-icon.small img {
    transform: scale(1.08) translateY(-8px);
}

.avatar-icon.small {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary-color);
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 6rem 2rem 3rem;
    border-radius: 4rem 4rem 0 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-logo {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--white);
}

/* Animations - Initial State */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-enter), transform var(--transition-enter);
    will-change: opacity, transform;
}

/* Animation Delays */
.delay-1 {
    transition-delay: 80ms;
}

.delay-2 {
    transition-delay: 160ms;
}

.delay-3 {
    transition-delay: 240ms;
}

/* Animate In Class */
.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------
   Iframe Modal 
------------------------------ */
.iframe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.iframe-modal.active {
    opacity: 1;
    visibility: visible;
}

.iframe-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.iframe-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.iframe-modal.active .iframe-modal-content {
    transform: scale(1) translateY(0);
}

.iframe-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-smooth), background var(--transition-smooth);
}

.iframe-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--accent-yellow);
}

.iframe-container {
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}