/* ================= GENERAL STYLES ================= */
body {
    background-color: black;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ================= NAVIGATION ================= */
.top-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: white;
    padding: 15px 30px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Enhanced logo styling with hover effects */
.logo {
    transition: color 0.3s, transform 0.3s;
    position: relative;
    display: inline-block;
}

.logo:hover {
    color: #00bfff;
    transform: scale(1.05);
}

/* Underline animation for logo */
.logo::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #00bfff;
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

/* Navigation links container */
.nav-links {
    display: flex;
    gap: 30px;
}

/* Enhanced nav links with hover effects */
.nav-link {
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    display: inline-block;
}

.nav-link:hover {
    color: #00bfff;
}

/* Underline animation for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #00bfff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ================= HERO IMAGE & VIDEO CONTAINERS ================= */
/* ========== YOUTUBE EMBED STYLES ========== */
/* YouTube embed container */
/* ========== YOUTUBE EMBED STYLES ========== */
/* YouTube embed container */
.youtube-embed {
    position: relative;
    width: 100%;
    height: 75vh;
    background-color: black;
    overflow: hidden;
}

/* YouTube iframe styling - FIXED */
.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    /* Remove object-fit: cover - this was causing blur */
}

/* Update video container for YouTube - FIXED */
.video-container {
    width: 100%;
    height: 75vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background-color: black;
}

/* Separate styles for regular videos vs YouTube */
.video-container video:not(.youtube-embed iframe),
.featured-video:not(.youtube-embed iframe) {
    width: 100%;
    max-height: 75vh;
    display: block;
    object-fit: cover;
    /* Keep object-fit only for actual video elements */
}

.video-container video,
.featured-video {
    width: 100%;
    max-height: 75vh;
    display: block;
    object-fit: cover;
}

.featured-image {
    width: 100%;
    height: 75vh;
    object-fit: cover;
}

/* For hero images with padding */
.hero-image-container {
    width: 100%;
    height: auto;
    margin: 40px 0;
    padding: 0 5%;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-image-container img {
    width: 100%;
    max-height: 75vh;
    display: block;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* For full-width hero images without padding */
.hero-image-full {
    width: 100vw;
    height: auto;
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-image-full img {
    width: 100%;
    height: 75vh;
    object-fit: cover;
    display: block;
}

/* ================= TEXT SECTIONS ================= */
.hero {
    padding: 60px 10% 30px 5%;
}

.hero h1 {
    margin-bottom: 20px;
}

.hero h2 {
    margin-bottom: 30px;
}

/* ================= CONTENT SECTIONS ================= */
.section {
    padding: 30px 15% 30px 5%;
}

.section p {
    margin-bottom: 20px;
}

.full-width {
    width: 90%;
}

/* ================= LAYOUT WITH IMAGES ================= */
.text-with-image {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.standard-layout .text-content {
    flex: 0 0 60%;
}

.standard-layout .side-image {
    flex: 0 0 35%;
}

.reversed-layout {
    flex-direction: row-reverse;
}

.reversed-layout .text-content {
    flex: 0 0 60%;
}

.reversed-layout .side-image {
    flex: 0 0 35%;
}

/* ================= IMAGES & CAPTIONS ================= */
.side-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 170px;
}

.side-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.image-caption {
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* ================= IMAGE GALLERY ================= */
.image-gallery {
    padding: 30px 5%;
}

.image-gallery h3 {
    margin-bottom: 25px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================= IMAGE SHOWCASE ================= */
.image-showcase {
    padding: 30px 5%;
}

.full-width-image {
    width: 100%;
    position: relative;
}

.full-width-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ========== SOCIAL LINKS ========== */
.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 60px auto 20px;
    padding: 15px 0 0;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-intro {
    color: white;
    font-family: var(--body-font), var(--fallback-fonts);
    font-size: var(--font-size-body);
    text-align: center;
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-weight: 300;
}

.social-links-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.social-link {
    color: white;
    text-decoration: none;
    font-family: var(--body-font), var(--fallback-fonts);
    font-size: var(--font-size-social-link);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link:hover {
    color: #00bfff;
}

.social-link i {
    width: 20px;
    text-align: center;
}

.social-link:hover {
    color: #00bfff;
}

.social-link i {
    width: 20px;
    text-align: center;
}

/* ================= PAGE TRANSITIONS ================= */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 9999;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Animations */
.fade-in-animation {
    animation: fadeIn 0.8s ease-in-out forwards;
}

.no-animation {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== RESPONSIVE STYLES ========== */

/* 1. MacBook Pro screens (1280px - 1728px) */
@media (min-width: 1025px) and (max-width: 1728px) {

    p,
    .section p,
    .hero p {
        font-size: calc(var(--font-size-body) * 0.85);
        /* 15% smaller */
        line-height: 1.5;
        /* Slightly tighter line height */
    }

    h1 {
        font-size: calc(var(--font-size-h1) * 0.9);
        margin-bottom: 20px;
    }

    h2 {
        font-size: calc(var(--font-size-h2) * 0.9);
        margin-bottom: 18px;
    }

    h3 {
        font-size: calc(var(--font-size-h3) * 0.9);
        margin-bottom: 15px;
    }

    /* Image captions */
    .image-caption {
        font-size: calc(var(--font-size-caption) * 0.9);
        margin-top: 8px;
        margin-bottom: 15px;
    }

    /* Reduce minor project text */
    .minor-project-text p {
        font-size: calc(var(--font-size-body-small) * 0.9);
        /* 10% smaller */
    }

    /* Make intro text a bit smaller too */
    .header-text h3 {
        font-size: calc(var(--font-size-h3) * 0.9);
    }

    /* Base variables adjustment */
    :root {
        --section-spacing: 45px;
        --element-spacing: 22px;
        --text-max-width: 800px;
    }

    .text-with-image {
        align-items: flex-start;
        /* Changed from center to top alignment */
    }

    .side-image {
        margin-left: 120px;
        align-self: flex-start;
        /* Ensure image container aligns to top */
        margin-top: 5px;
        /* Optional: small offset to align with first line of text */
    }

    /* Text width controls */
    .section p {
        max-width: var(--text-max-width);
    }

    /* Side image position adjustment */
    .side-image {
        margin-left: 120px;
    }

    /* Video container adjustments */
    .video-container {
        margin: 20px 0 35px 0;
    }

    /* Social links - FIXED */
    .social-links {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 40px auto 0;
        padding: 15px 0 0;
        background-color: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links-container {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }

    .social-link {
        margin: 0 10px;
    }

    /* Add space at the bottom of the page */
    body {
        padding-bottom: 30px;
    }

    /* Add space after the last section */
    .section:last-of-type {
        margin-bottom: 20px;
    }

    /* Layout adjustments */
    .hero {
        padding: 50px 10% 25px 5%;
    }
}

/* 2. Tablet (up to 1024px) */
@media (min-width: 993px) and (max-width: 1024px) {

    /* Top menu - FIXED */
    body .top-menu {
        width: 100vw !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 15px 20px !important;
        box-sizing: border-box !important;
        background-color: white !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }

    /* Typography adjustments */
    p,
    .section p,
    .hero p {
        font-size: calc(var(--font-size-body) * 0.7);
        line-height: 1.4;
    }

    h1 {
        font-size: calc(var(--font-size-h1) * 0.75);
        margin-bottom: 18px;
    }

    h2 {
        font-size: calc(var(--font-size-h2) * 0.75);
        margin-bottom: 16px;
    }

    h3 {
        font-size: calc(var(--font-size-h3) * 0.75);
        margin-bottom: 14px;
    }

    /* Image captions */
    .image-caption,
    .caption {
        font-size: calc(var(--font-size-caption) * 0.75);
        margin-top: 8px;
        margin-bottom: 12px;
    }

    /* Video height adjustment */
    .video-container video,
    .featured-video,
    .featured-image,
    .hero-image-container img,
    .hero-image-full img {
        max-height: 75vh;
    }

    /* Layout adjustments */
    .hero {
        padding: 40px 5%;
    }

    .section {
        margin-bottom: 12px;
        padding: 0 5%;
    }

    /* Text adjustments */
    .section p {
        max-width: 90%;
    }

    /* Image adjustments */
    .side-image {
        max-width: 45% !important;
        margin-left: 80px !important;
    }

    /* Keep film-specific layouts */
    .text-with-image {
        display: flex;
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }

    .standard-layout .text-content {
        flex: 0 0 50%;
    }

    .standard-layout .side-image {
        flex: 0 0 40%;
    }

    .reversed-layout {
        flex-direction: row-reverse;
    }

    .reversed-layout .text-content {
        flex: 0 0 50%;
    }

    .reversed-layout .side-image {
        flex: 0 0 40%;
    }

    /* Social links - FIXED */
    .social-links {
        position: static !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 60px auto 20px !important;
        padding: 15px 0 0;
        background-color: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links-container {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }

    body {
        padding-bottom: 30px;
    }
}

/* 3. Medium screens (769px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {

    /* Fix horizontal overflow */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100%;
        position: relative;
        padding-bottom: 30px;
    }

    /* Top menu adjustments */
    body .top-menu {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
        background-color: white !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }

    .nav-links {
        gap: 20px;
    }

    /* Typography adjustments */
    p,
    .section p,
    .hero p {
        font-size: calc(var(--font-size-body) * 0.65);
        line-height: 1.3;
    }

    h1 {
        font-size: calc(var(--font-size-h1) * 0.7);
        margin-bottom: 16px;
    }

    h2 {
        font-size: calc(var(--font-size-h2) * 0.7);
        margin-bottom: 14px;
    }

    h3 {
        font-size: calc(var(--font-size-h3) * 0.7);
        margin-bottom: 12px;
    }

    /* Layout adjustments */
    .hero {
        padding: 35px 5%;
    }

    .section {
        padding: 25px 5%;
        margin-bottom: 15px;
    }

    /* Video and image adjustments */
    .video-container video,
    .featured-video,
    .featured-image,
    .hero-image-container img,
    .hero-image-full img {
        max-height: 70vh;
    }

    /* Gallery adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Layout with images - stack on this size */
    .text-with-image {
        flex-direction: column;
    }

    .side-image {
        align-items: flex-start !important;
        /* Left-align content */
    }

    .image-caption,
    .caption {
        text-align: left !important;
        /* Left-align text */
        margin-left: 0 !important;
        /* Remove any left margin */
    }

    /* For gallery images */
    .gallery-item .image-caption {
        text-align: left !important;
    }

    .text-content,
    .side-image {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
    }

    .reversed-layout {
        flex-direction: column;
    }

    /* Social links - FIXED */
    .social-links {
        position: static !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 40px auto 20px !important;
        padding: 15px 0 0;
        background-color: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links-container {
        display: flex;
        flex-direction: row;
        gap: 15px;
    }
}

/* 4. Mobile (up to 767px) */
@media (max-width: 767px) {

    /* Fix horizontal overflow */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
        padding-bottom: 30px;
    }

    /* Navigation adjustments */
    body .top-menu {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
        background-color: white !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Hero and section spacing */
    .hero {
        padding: 30px 5%;
        width: 100%;
        box-sizing: border-box;
    }

    .section {
        padding: 20px 5%;
        margin-bottom: 30px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Typography adjustments - use variables for consistency */
    h1 {
        font-size: calc(var(--font-size-h1) * 0.65);
        margin-bottom: 16px;
    }

    h2 {
        font-size: calc(var(--font-size-h2) * 0.65);
        margin-bottom: 14px;
    }

    h3 {
        font-size: calc(var(--font-size-h3) * 0.65);
        margin-bottom: 12px;
    }

    p,
    .section p,
    .hero p {
        font-size: calc(var(--font-size-body) * 0.6);
        line-height: 1.4;
        width: 100%;
        max-width: 100%;
    }

    /* Layout fixes - ensure stacked elements */
    .text-with-image {
        flex-direction: column;
        gap: 20px;
    }

    .text-content,
    .side-image {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
    }

    /* Image caption alignment */
    .side-image {
        align-items: flex-start !important;
    }

    .image-caption,
    .caption {
        text-align: left !important;
        margin-left: 0 !important;
        font-size: calc(var(--font-size-caption) * 0.65);
    }

    /* Gallery adjustments */
    .image-gallery {
        padding: 20px 5%;
        width: 100%;
        box-sizing: border-box;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Fix image sizes */
    img,
    video {
        max-width: 100%;
        height: auto;
    }

    /* Social links - FIXED */
    .social-links {
        position: static !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 30px auto 15px !important;
        padding: 10px 0 15px;
        background-color: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links-container {
        display: flex;
        flex-direction: row;
        gap: 15px;
    }

    .social-link {
        font-size: 0.85rem;
        margin: 0 8px;
    }
}

/* 5. Small phones (up to 480px) */
@media (max-width: 480px) {

    /* Video adjustments */
    .video-container video,
    .featured-video,
    .featured-image,
    .hero-image-container img,
    .hero-image-full img {
        max-height: 50vh;
    }

    /* Image showcase adjustments */
    .image-showcase {
        padding: 20px 5%;
    }

    /* Hero section */
    .hero {
        padding: 25px 5% 20px;
    }

    /* Tighter spacing */
    .section {
        margin-bottom: 30px;
        padding: 15px 5%;
    }

    /* Social links adjustments */
    .social-links {
        padding: 8px 0 15px;
    }

    /* Even less padding on body */
    body {
        padding-bottom: 20px;
    }
}