@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;700&family=Lato:wght@300;400;700&display=swap');

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    overflow-x: hidden;
    background-color: black;
    color: white;
    width: 100vw;
    margin: 0;
    padding: 0;
}

/* Hero Image Container */
.hero-image-container {
    position: fixed;
    top: -150px;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: visible;
    will-change: transform;
}

.hero-image {
    width: 100%;
    height: calc(100% + 150px);
    object-fit: cover;
    object-position: 30% 25%;
}

/* Black overlay that slides up */
.black-overlay {
    position: fixed;
    top: 100.1vh;
    left: -20px;
    width: calc(100vw + 40px);
    height: 150vh;
    background-color: black;
    z-index: -1;
    will-change: transform;
    pointer-events: none;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.video-container.dimmed {
    filter: brightness(0.3);
}

#player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}

/* Pixelated overlay effect */
.pixelated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.15) 3px,
            rgba(0, 0, 0, 0.15) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.15) 3px,
            rgba(0, 0, 0, 0.15) 4px
        );
    pointer-events: none;
    z-index: 2;
}

/* Logo fixed at top */
.logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

.logo {
    max-width: 80%;
    max-height: 80%;
    opacity: 1;
}

.content {
    position: relative;
    z-index: 1;
}

.hero {
    height: 100vh;
    width: calc(100% + 400px);
    margin-right: -400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero h1 {
    font-size: 4rem;
    font-weight: bold;
}

.content-section {
    min-height: 50vh;
    padding: 50px 20px;
    padding-top: 250px;
    padding-right: 420px;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: calc(100% + 400px);
    margin-right: -400px;
}

.content-section h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #FF5500 0%, #cc4400 100%);
    border-radius: 16px;
    padding: 1.5rem 3rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    display: inline-block;
    width: fit-content;
    align-self: center;
}

.content-section p {
    font-size: 1.2rem;
    max-width: 800px;
    text-align: left;
    line-height: 1.8;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    margin-bottom: 1.5rem;
}

.content-section a {
    color: #FF5500;
    text-decoration: none;
    font-family: 'Josefin Sans', sans-serif;
    position: relative;
    transition: color 0.3s ease;
    padding: 4px 8px;
    display: inline-block;
}

.content-section a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    z-index: -1;
    border-radius: 4px;
}

.content-section a:hover {
    color: #FF5500;
}

.content-section a:hover::before {
    transform: scaleX(1);
}

.content-section.dictionary-section p {
    text-align: left;
}

/* YouTube videos grid */
.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem 0;
}

.youtube-category {
    width: 100%;
    position: relative;
}

.youtube-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: left;
    transition: opacity 0.3s ease;
    color: #FF5500;
}

.youtube-category:hover h3 {
    opacity: 0;
}

.youtube-category .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: visible;
    transition: transform 0.4s ease, z-index 0s, box-shadow 0.4s ease;
    transform-origin: center center;
    border-radius: 8px;
}

.youtube-category:hover .video-wrapper {
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.8);
}

.youtube-category .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }
}

.youtube-button {
    display: inline-block !important;
    margin-top: 2rem;
    padding: 3rem 6rem !important;
    background-color: #FF5500;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: background-color 0.3s;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
}

.youtube-button:hover {
    background-color: #cc4400 !important;
    color: white !important;
}

.youtube-button::before {
    display: none !important;
}

.tango-button {
    display: inline-block !important;
    margin-top: 1.5rem;
    padding: 1.5rem 3rem !important;
    background-color: #FF5500;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: background-color 0.3s;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
}

.tango-button:hover {
    background-color: #cc4400 !important;
    color: white !important;
}

.tango-button::before {
    display: none !important;
}

.youtube-categories {
    list-style: none;
    margin: 2rem 0;
}

.youtube-categories li {
    margin: 1rem 0;
}

.youtube-categories a {
    color: #FF0000;
    text-decoration: none;
    font-size: 1.2rem;
}

.youtube-categories a:hover {
    text-decoration: underline;
}

/* Dictionary section */
.dictionary-section {
    align-items: center;
    text-align: center;
    margin-top: 50vh;
    padding-top: 300px;
}

.dictionary-section .word {
    align-self: center;
}

.dictionary-entry {
    max-width: 800px;
    text-align: left;
    width: 100%;
    margin: 0 auto;
}

.word {
    font-size: 4rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #FF5500 0%, #cc4400 100%);
    border-radius: 16px;
    padding: 1.5rem 3rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    display: inline-block;
}

.pronunciation {
    font-size: 1.4rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-family: 'Lato', sans-serif;
}

.word-type {
    font-style: italic;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 0;
    font-family: 'Lato', sans-serif;
}

.definition {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    margin-left: 2.5rem;
    font-family: 'Lato', sans-serif;
    font-style: normal;
}

.example {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    display: block;
    margin-top: 0.25rem;
    margin-left: 3.5rem;
    font-family: 'Lato', sans-serif;
}

/* Events Carousel Banner - Vertical on Desktop */
.events-carousel-banner {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 400px;
    z-index: 100;
    background: transparent;
}

.carousel-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
}

.carousel-track-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 0 0.5rem;
    border-radius: 12px;
    background: transparent;
}

.carousel-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 0;
    background: transparent;
}

.carousel-slide {
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
}

.carousel-slide::before,
.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: transform 0.6s ease-in-out;
    pointer-events: none;
}

.carousel-slide::before {
    left: 0;
    transform-origin: left center;
}

.carousel-slide::after {
    right: 0;
    transform-origin: right center;
}

.carousel-track-container:hover .carousel-slide::before {
    transform: translateX(-100%);
}

.carousel-track-container:hover .carousel-slide::after {
    transform: translateX(100%);
}

.carousel-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border-radius: 12px;
}

.carousel-overlay {
    display: none;
}

/* Fixed event content that stays in place */
.event-content-fixed {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    height: 280px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    background: linear-gradient(135deg, #FF5500 0%, #cc4400 100%);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Flip Date Display */
.flip-date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    font-family: 'Josefin Sans', sans-serif;
}

.flip-digit {
    background: white;
    color: #333;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.flip-digit:first-child {
    min-width: 3rem;
}

.flip-digit.month-name {
    padding: 0.5rem 1rem;
    min-width: 10rem;
}

/* Flip animation */
.flip-digit.flipping {
    animation: flipAnimation 0.6s ease-in-out;
}

@keyframes flipAnimation {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

#event-title,
.carousel-slide .event-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease-in-out;
    line-height: 1.3;
    max-height: 7rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

#event-location,
.carousel-slide .event-location {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    transition: opacity 0.3s ease-in-out;
    margin: 0;
}

.event-title.fading,
.event-location.fading {
    animation: fadeContent 0.6s ease-in-out;
}

@keyframes fadeContent {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

.carousel-nav {
    display: none;
}

/* Adjust main content to not be hidden by carousel */
.content {
    margin-right: 400px;
}

/* Events table */
.events-table {
    width: 100%;
    max-width: 1000px;
    border-collapse: collapse;
    margin: 2rem auto;
}

.events-table thead {
    border-bottom: 2px solid white;
}

.events-table th {
    padding: 1rem;
    text-align: left;
    font-size: 1.4rem;
    font-weight: 700;
}

.events-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.3rem;
    font-weight: 300;
}

.events-table tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .content-section h2 {
        font-size: 2.5rem;
        padding: 1rem 2rem;
        left: 0;
    }

    .word {
        left: 0;
    }

    .events-table {
        margin-left: 0;
    }

    .content-section p {
        font-size: 1.2rem;
    }

    /* Mobile: Horizontal carousel at top */
    .events-carousel-banner {
        position: sticky;
        top: 0;
        right: auto;
        left: 0;
        height: auto;
        width: 100%;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .event-content-fixed {
        top: 1rem;
        max-width: 90%;
        height: 240px;
        padding: 1rem 0.75rem;
    }

    #event-title,
    .carousel-slide .event-title {
        font-size: 1.4rem;
        max-height: 5.5rem;
    }

    .carousel-container {
        height: auto;
        flex-direction: row;
        padding: 1rem;
    }

    .carousel-track {
        flex-direction: row;
        height: auto;
    }

    .carousel-slide {
        min-height: auto;
        min-width: 100%;
        width: 100%;
        height: auto;
        padding: 1rem;
    }

    /* Disable shade split on mobile */
    .carousel-slide::before,
    .carousel-slide::after {
        display: none;
    }

    .flip-digit {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }

    .flip-digit:first-child {
        min-width: 2.5rem;
    }

    .flip-digit.month-name {
        padding: 0.4rem 0.75rem;
        min-width: 8rem;
    }

    #event-title,
    .carousel-slide .event-title {
        font-size: 1.4rem;
    }

    #event-location,
    .carousel-slide .event-location {
        font-size: 1.1rem;
    }

    .carousel-nav {
        display: none;
    }

    .content {
        margin-right: 0;
    }
}
