/* Modern Reset and Base Variables */
:root {
    --color-bg-light: #ffffff;
    --color-bg-dark: #000000;
    --color-text-light: #ffffff;
    --color-text-dark: #000000;
    --color-accent: #c92a2a; /* Red accent to match the logo */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Oswald', sans-serif;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 3.5rem;
}

.accent-text {
    color: var(--color-accent);
    font-style: italic;
}

p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.text-center { text-align: center; }
.text-wide { max-width: 800px; margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 2rem; }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
    padding: 1.5rem 2rem;
}

nav.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 1rem 2rem;
}

nav.scrolled .logo, nav.scrolled .nav-links a {
    color: var(--color-text-light);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
    border-radius: 8px; /* Slight rounding for the generated image */
}

.nav-links {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 300px;
    background-color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 3rem;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    border-left: 2px solid var(--color-accent);
    z-index: 1000;
}

.nav-links.nav-active {
    transform: translateX(0%);
}

.nav-links a {
    color: var(--color-text-light);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.burger {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 30px;
    height: 3px;
    background-color: var(--color-text-light);
    margin: 6px;
    transition: all 0.3s ease;
}

nav.scrolled .burger div {
    background-color: var(--color-text-light);
}

/* Ensure links are hidden initially for animation */
.nav-links li {
    opacity: 0;
}

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

.dark-section {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.hero-content p {
    color: var(--color-text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Subpage Specific Styles */
.subpage-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px; /* Accounts for navbar */
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.9)), url('hero-bg.gif') center/cover;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.subpage-hero h1 {
    color: #4a90e2; /* Light blue */
}

.subpage-content {
    padding: 5rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.subpage-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.subpage-content h2 {
    font-family: var(--font-primary);
    color: var(--color-accent);
    font-size: 2.5rem !important;
    margin: 3rem 0 1.5rem;
}

.subpage-content h3 {
    font-size: 1.8rem !important;
    margin: 2rem 0 1rem;
    color: #fff;
}

/* Override Google Sites inline styles */
.subpage-content h1 {
    font-size: 2.5rem !important;
    line-height: 1.3;
}
.subpage-content * {
    color: inherit !important;
    background-color: transparent !important;
    font-family: inherit !important;
}
.subpage-content a {
    color: #4a90e2 !important;
    text-decoration: underline !important;
}
.subpage-content .btn {
    text-decoration: none !important;
    color: #fff !important;
}


.subpage-content ul {
    margin-bottom: 2rem;
    padding-left: 20px;
}

.subpage-content li {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.subpage-content a.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--color-accent);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.subpage-content a.btn:hover {
    background: #a32222;
    transform: translateY(-2px);
}

/* Document Embeds */
.pdf-embed-wrapper {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: var(--color-text-light);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: -2;
    filter: brightness(0.3);
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--color-text-light);
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2rem;
    transition: all 0.3s ease;
    border: 2px solid var(--color-text-light);
}

.btn:hover {
    background-color: transparent;
    color: var(--color-text-light);
}

/* GIF / Highlight Section */
.gif-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    width: 100%;
}
.gif-container iframe {
    border: none;
    max-width: 100%;
    border-radius: 4px;
}

/* Split Section (About) */
.split-section {
    display: flex;
    padding: 0;
    min-height: 80vh;
}

.split-image {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.about-bg {
    background-image: url('about-bg.jpg');
    background-size: cover;
    background-position: top center;
    filter: contrast(1.1);
}

.split-content {
    flex: 1;
    padding: 8rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-bg-light);
}

/* Why Chess Grid */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.grid-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

/* Strategy Quote */
blockquote {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    margin: 4rem auto;
    max-width: 800px;
    border-left: 4px solid var(--color-bg-dark);
    padding-left: 2rem;
    text-align: left;
}
blockquote cite {
    display: block;
    font-size: 1rem;
    font-style: normal;
    font-weight: 800;
    margin-top: 1rem;
    text-transform: uppercase;
}

/* Carousels */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 650px; /* Restricts width so only 1 card + ~1/3 of sides are visible */
    margin: 3rem auto 0;
}

.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 170px;
    z-index: 5;
    pointer-events: none;
}
.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-dark) 0%, transparent 100%);
}
.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-dark) 0%, transparent 100%);
}

.carousel-btn {
    background: transparent;
    border: 1px solid rgba(201, 42, 42, 0.4);
    color: var(--color-accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
    margin: 0 10px;
}
.carousel-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active {
    background-color: var(--color-accent);
    width: 24px;
    border-radius: 12px;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 20px calc(50% - 160px); /* 160px is half of 320px card. This perfectly centers the cards! */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel {
    display: flex;
    gap: 20px;
    padding: 20px 0;
}

.carousel-card {
    flex: 0 0 320px;
    height: 480px;
    scroll-snap-align: center;
    color: var(--color-text-light);
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    perspective: 1000px;
}

.carousel-card:hover {
    transform: translateY(-5px);
}

/* Landscape Carousel Modifiers */
.carousel-wrapper.landscape {
    max-width: 900px;
}
.carousel-container.landscape {
    padding: 20px calc(50% - 320px); /* 320px is half of 640px card */
}
.carousel-card.landscape {
    flex: 0 0 640px;
    height: 450px;
}
.carousel-card.landscape .card-media {
    background: #000;
}
.carousel-card.landscape .card-media img {
    object-fit: contain; /* Resize photos so they are not cut off */
}

/* Note Cards & Embed Cards for Lessons Subpage */
a.note-card {
    text-decoration: none !important;
    color: inherit !important;
}
.note-media {
    position: relative;
    overflow: hidden;
    background: #0d1117 !important;
    border: 1px solid rgba(91, 163, 245, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.2rem;
    box-sizing: border-box;
}
.note-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 1;
}
.carousel-card:hover .note-bg-img {
    transform: scale(1.08);
    opacity: 0.38;
}
.note-card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}
.note-badge {
    background: rgba(91, 163, 245, 0.2);
    color: #5ba3f5;
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(91, 163, 245, 0.35);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}
.note-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.note-card-content h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: #ffffff !important;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}
.note-card-content p {
    font-size: 0.85rem;
    color: #cbd5e0 !important;
    line-height: 1.45;
    margin-bottom: 1.2rem;
    max-width: 280px;
}
.note-btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 0.82rem;
    letter-spacing: 1px;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.carousel-card:hover .note-btn {
    background: #e03131;
    transform: translateY(-2px);
}

/* Play Button Overlay for Video Cards */
.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    background: rgba(201, 42, 42, 0.85);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    padding-left: 4px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 4;
}
.carousel-card:hover .play-btn-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(224, 49, 49, 1);
}

/* Upcoming Events Page Custom Styles */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.event-card {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%);
    border: 1px solid rgba(91, 163, 245, 0.2);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 320px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) rgba(255, 255, 255, 0.05);
}
.event-card.no-scroll {
    overflow: hidden !important;
    scrollbar-width: none !important;
}
.event-card.no-scroll::-webkit-scrollbar {
    display: none !important;
}
.event-card a.btn {
    margin-top: 0.8rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.82rem;
    align-self: flex-start;
    border-radius: 6px;
}
.event-card::-webkit-scrollbar {
    width: 6px;
}
.event-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.event-card::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}
.event-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 163, 245, 0.5);
}
.event-card h3 {
    font-family: var(--font-primary);
    font-size: 1.35rem;
    color: #ffffff;
    margin-bottom: 0.6rem;
}
.event-badge {
    display: inline-block;
    background: rgba(201, 42, 42, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(201, 42, 42, 0.3);
    font-family: var(--font-secondary);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.event-badge.blue {
    background: rgba(91, 163, 245, 0.15);
    color: #5ba3f5;
    border-color: rgba(91, 163, 245, 0.3);
}

.day-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 2rem 0 1.5rem;
}
.day-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e0;
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.day-tab-btn.active, .day-tab-btn:hover {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.venue-card {
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #5ba3f5;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, background 0.2s ease;
}
.venue-card:hover {
    background: rgba(22, 27, 34, 0.95);
    transform: translateX(4px);
}
.venue-day-tag {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: var(--color-accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}
.venue-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0.2rem 0 0.4rem;
}
.venue-details {
    font-size: 0.9rem;
    color: #a0aec0;
    line-height: 1.5;
}

/* Interesting Chess Games Page Custom Styles */
.master-quote-box {
    background: linear-gradient(135deg, rgba(30, 38, 50, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%);
    border: 1px solid rgba(255, 217, 102, 0.35);
    border-left: 5px solid #ffd966;
    border-radius: 12px;
    padding: 2.2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 3rem;
}
.master-quote-icon {
    font-size: 3rem;
    line-height: 1;
    color: rgba(255, 217, 102, 0.3);
    position: absolute;
    top: 15px;
    right: 25px;
}
.master-quote-text {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-style: italic;
    color: #f0f6fc;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}
.master-quote-meta {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: #a0aec0;
    line-height: 1.5;
}

.master-games-container {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(91, 163, 245, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.game-search-bar {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: rgba(13, 17, 23, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}
.game-search-bar:focus {
    outline: none;
    border-color: var(--color-accent);
}
.games-scroll-box {
    max-height: 540px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) rgba(255, 255, 255, 0.05);
}
.games-scroll-box::-webkit-scrollbar {
    width: 6px;
}
.games-scroll-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.games-scroll-box::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

.game-item-card {
    background: rgba(30, 38, 50, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.game-item-card:hover {
    background: rgba(30, 38, 50, 0.95);
    border-color: rgba(91, 163, 245, 0.4);
    transform: translateX(4px);
}
.game-info-main h4 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
}
.game-info-sub {
    font-size: 0.88rem;
    color: #cbd5e0;
}
.game-tags-result {
    display: flex;
    align-items: center;
    gap: 10px;
}
.result-badge {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}
.result-win-white { background: rgba(91, 163, 245, 0.2); color: #5ba3f5; border: 1px solid rgba(91, 163, 245, 0.4); }
.result-win-black { background: rgba(201, 42, 42, 0.2); color: #ff6b6b; border: 1px solid rgba(201, 42, 42, 0.4); }

@media screen and (max-width: 768px) {
    .carousel-wrapper.landscape { max-width: 100%; }
    .carousel-card.landscape { flex: 0 0 85vw; height: 60vw; }
    .carousel-container.landscape { padding: 20px calc(50% - 42.5vw); }
    .note-card-content h3 { font-size: 1.2rem; }
    .note-card-content p { font-size: 0.85rem; margin-bottom: 1rem; }
    .note-icon { font-size: 2.2rem; }
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-card.flipped .flip-card-inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
}

.flip-card-front {
    background-color: #000;
    z-index: 2;
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
}

.flip-card-back {
    background-color: #111;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    z-index: 1;
}

.flip-card-back h3 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

.flip-card-back p {
    font-size: 1rem;
    line-height: 1.5;
    color: #ccc;
    margin: 0;
}

.card-media {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
    border-radius: 12px;
}

.card-media img,
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-media.dual-video {
    display: flex;
    flex-direction: column;
}

.card-media.dual-video video {
    width: 100%;
    height: 50%;
    object-fit: cover;
}

.carousel-card:hover .card-media img,
.carousel-card:hover .card-media video {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    text-align: center;
    pointer-events: none;
}

.card-overlay h3 {
    margin: 0;
    font-size: 1.5rem;
    font-family: var(--font-secondary);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Placeholder animations */
.placeholder-anim img {
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}
.carousel-card:hover .placeholder-anim img {
    filter: grayscale(0%);
}

/* Footer */
footer {
    background-color: #111;
    color: #666;
    padding: 3rem 2rem;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media screen and (max-width: 900px) {
    .split-section {
        flex-direction: column;
    }
    .split-image {
        min-height: 50vh;
    }
    .split-content {
        padding: 4rem 2rem;
    }
}

@media screen and (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 2rem; }
}

/* Animations with CSS Fallback to ensure page is never blank */
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeInFallback 0.6s ease-out 0.1s forwards; }
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInFallback 0.6s ease-out 0.1s forwards; }
.fade-in-left { opacity: 0; transform: translateX(-30px); animation: fadeInFallback 0.6s ease-out 0.1s forwards; }
.fade-in-right { opacity: 0; transform: translateX(30px); animation: fadeInFallback 0.6s ease-out 0.1s forwards; }
.visible { opacity: 1 !important; transform: translate(0, 0) !important; }

@keyframes fadeInFallback {
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}
