@font-face {
    font-family: 'Winkle';
    src: url('Fonts/Winkle-Regular.otf') format('opentype');
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0;
    overflow-y: hidden; /* Explicitly hide vertical scroll on body */
    overflow-x: hidden; /* Keep horizontal hidden by default */
    position: relative; /* Needed for absolute positioning of logo */
    transition: background-color 1s ease; /* Smooth background color transition */
    background-color: #F4F1EA; /* Default background color */
}

body.gallery-open {
    overflow-x: auto;
    overflow-y: hidden;
}

#site-logo-container {
    position: fixed;
    top: 15px;
    left: 25px;
    width: 75px;
    height: 65px; /* Set a fixed height to match the image */
    z-index: 1000;
}

#site-logo-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

#site-logo-front {
    transition: opacity 0.5s ease-in-out; /* Smooth fade for the top logo */
}

#page-container,
#projects-page-content,
#r28-page-content,
#cc-page-content,
#ee-page-content {
    display: flex;
    /* For pages that need horizontal scrolling, this will be overridden */
    /* overflow-x: hidden; */
    /* white-space: nowrap; */
    transition: transform 1.5s ease-in-out; /* Apply transform transition here */
}

.door {
    margin: 10px;
    cursor: pointer;
    transition: opacity 0.5s ease-out; /* Smooth fade for other doors */
}

.door img {
    display: block;
    width: 420px; /* Adjusted to 420px as per user's instruction */
    height: auto;
}

/* Class for pages that should have horizontal scrolling */
.horizontal-scroll-enabled #page-container,
.horizontal-scroll-enabled #projects-page-content,
.horizontal-scroll-enabled #r28-page-content,
.horizontal-scroll-enabled #cc-page-content,
.horizontal-scroll-enabled #ee-page-content {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start; /* Align items to the start for scrolling */
}

.horizontal-scroll-enabled .door {
    flex-shrink: 0; /* Prevent doors from shrinking */
}

/* Zooming animation */
#page-container.animating-zoom,
#projects-page-content.animating-zoom,
#r28-page-content.animating-zoom,
#cc-page-content.animating-zoom,
#ee-page-content.animating-zoom {
    /* transform will be set by JS */
}

#page-container.animating-zoom .door:not(.active-door),
#projects-page-content.animating-zoom .door:not(.active-door),
#r28-page-content.animating-zoom .door:not(.active-door),
#cc-page-content.animating-zoom .door:not(.active-door),
#ee-page-content.animating-zoom .door:not(.active-door) {
    opacity: 0;
    pointer-events: none;
}

#page-container.animating-zoom .door.active-door,
#projects-page-content.animating-zoom .door.active-door,
#r28-page-content.animating-zoom .door.active-door,
#cc-page-content.animating-zoom .door.active-door,
#ee-page-content.animating-zoom .door.active-door {
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Door fades out simultaneously */
}

#room-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    /* display: flex; will be set by JS */
    justify-content: center;
    align-items: center;
    z-index: 500; /* Below logo, above page-container */
    opacity: 0; /* Start hidden */
    transition: opacity 0.5s ease-in-out; /* Smooth fade for room view */
}

#room-view.gallery-parent-fix {
    justify-content: flex-start;
}

#back-button {
    position: fixed;
    top: 15px;
    right: 25px;
    width: 65px;
    height: 65px;
    cursor: pointer;
    z-index: 1001;
    display: none;
}

#back-button img {
    position: absolute; /* Added for stacking */
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

#back-arrow-img-front {
    transition: opacity 0.5s ease-in-out; /* Smooth fade for the top arrow */
}

.content-page {
    display: none; /* Initially hidden */
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333;
    padding: 40px;
    max-width: 900px;
    margin: auto;
    background-color: transparent;
    border-radius: 15px;
}

.content-page {
    display: none; /* Initially hidden */
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333;
    padding: 40px;
    max-width: 900px;
    margin: auto;
    background-color: transparent;
    border-radius: 15px;
}

.gallery-content-page {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide overflow to contain the scrolling */
}

.scrolling-gallery-page {
    display: flex;
    align-items: center; /* Vertically center the gallery */
    justify-content: center; /* Center the gallery horizontally */
}

#ee-dev-scroll-container {
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

#ee-dev-scroll-container.scrolled {
    transform: translateY(-100%);
}

#click-to-scroll-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh; /* Covers bottom half */
    cursor: pointer;
    z-index: 10; /* On top of other content */
}

.gallery-section {
    width: 100%;
    height: 100vh; /* Each section is full height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
}

.gallery-content-page h3 {
    color: #333;
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
}

.image-gallery-horizontal {
    display: flex;
    align-items: center;
    width: 100vw; /* Set a fixed width */
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.image-gallery-horizontal::-webkit-scrollbar {
    display: none;
}

.image-gallery-horizontal img {
    flex-shrink: 0;
    /* height is now set on specific classes */
    width: auto;
    margin: 0 10px;
    border-radius: 10px;
    object-fit: contain;
}

.intro-image {
    height: 67.5vh; /* Smaller intro image */
    position: relative;
    top: 5px; /* Nudge down */
}

.gallery-item {
    height: 72.5vh; /* Standard gallery images */
}

.content-page h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

.content-page p {
    font-size: 1.3em;
    line-height: 1.7;
    margin-bottom: 20px;
}

.content-page img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.email-link {
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 15%;
    display: block;
    cursor: pointer;
}

.linkedin-link {
    position: absolute;
    top: 45%;
    left: 20%;
    width: 60%;
    height: 10%;
    display: block;
    cursor: pointer;
}

.resume-link {
    position: absolute;
    top: 70%;
    left: 20%;
    width: 60%;
    height: 10%;
    display: block;
    cursor: pointer;
}

.survey-link {
    position: absolute;
    top: 70%;
    left: 35%;
    width: 60%;
    height: 10%;
    display: block;
    cursor: pointer;
}

.final-product-page {
    display: none;
    width: 100%;
    height: 100%;
    padding: 0; /* Removed padding */
    box-sizing: border-box;
}

.final-product-page .image-gallery-horizontal {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100vw;
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: hidden; /* Explicitly hide vertical scroll on gallery */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding-right: 80px;
    padding-left: 80px;
}

.final-product-page .image-gallery-horizontal::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}

.final-product-page .image-gallery-horizontal img {
    flex-shrink: 0;
    height: 75vh; /* Much smaller height, fixed to viewport */
    width: auto;
    margin: 0 10px;
    border-radius: 10px;
}

#cc-development-page-content .image-gallery-horizontal {
    padding-left: 80px;
    padding-right: 80px;
}

#cc-development-page-content .intro-image {
    height: 55vh; /* Slightly smaller intro image */
}

#cc-final-page-content .intro-image {
    height: 70vh; /* Slightly smaller intro image */
}

/* === Ethical Eater Development Page === */
#ee-development-page-content .image-gallery-horizontal {
    display: flex;
    align-items: center;
    width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 5px; /* Closer together */
    padding-left: 80px;
    padding-right: 80px;
}

#ee-development-page-content .image-gallery-horizontal::-webkit-scrollbar {
    display: none;
}

#ee-development-page-content .gallery-item {
    flex-shrink: 0;
    height: 85vh;
    width: auto;
    object-fit: contain;
}

#ee-development-page-content .ee-intro-image {
    height: 55vh; /* Smaller intro image */
}

#ee-development-page-content .wireframe {
    height: 75vh;
    border-radius: 25px; /* Remove rounded corners */
}

#ee-final-page-content .image-gallery-horizontal {
    padding-left: 60px;
}

#ee-final-page-content .ee-intro-image {
    height: 70vh; /* Slightly smaller intro image */
}

.explore-options {
    margin-right: 50px;
}
/* === Route28 Development Page === */
#r28-development-page-content .image-gallery-horizontal {
    display: flex;
    align-items: center;
    width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-right: 80px;
    padding-left: 80px;
}

#r28-development-page-content .image-gallery-horizontal::-webkit-scrollbar {
    display: none;
}

#r28-development-page-content .diagram {
    flex-shrink: 0;
    height: 90vh;
    width: auto;
    border-radius: 10px;
    object-fit: contain;
}

#r28-development-page-content .writing {
    height: 65vh;
}

#r28-development-page-content .first-stages {
    height: 35vh;
}

#r28-development-page-content .friends-diagram {
    height: 70vh;
}

#r28-development-page-content .settings-diagram {
    height: 70vh;
}

#r28-development-page-content .survey-image-container {
    position: relative;
    width: 56vw;
    height: 80vh;
    flex-shrink: 0;
    margin: 0 10px;
}

#r28-development-page-content .writing {
    /* This class is now just for semantics, sizing is on the container */
}

#r28-development-page-content .survey-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

#r28-development-page-content .survey-img-hover {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#r28-development-page-content .survey-link:hover ~ .survey-img-hover {
    opacity: 1;
}

#r28-development-page-content .survey-link {
    position: absolute;
    top: 72%;
    left: 38%;
    width: 25%;
    height: 5%;
    z-index: 10; /* Ensure link is on top of images */
}

#r28-final-page-content .writing {
    height: 70vh;
}

/* Media query for 21-24 inch screens (e.g., 1920x1080) */
@media (max-width: 1920px) {
    .door img {
        width: 315px; /* Proportional size for 1920px width */
    }
}

/* Media query for 13-15.6 inch screens (e.g., 1366x768) */
@media (max-width: 1366px) {
    .door img {
        width: 224px; /* Proportional size for 1366px width */
    }
}

/* Media query for 11-13 inch screens (e.g., 1280x800) */
@media (max-width: 1280px) {
    .door img {
        width: 210px; /* Proportional size for 1280px width */
    }
}

/* Media query for smaller tablets (e.g., 1024x768) */
@media (max-width: 1024px) {
    .door img {
        width: 168px; /* Proportional size for 1024px width */
    }
}

/* Media query for 29-34 inch screens (e.g., 3440x1440) */
@media (min-width: 2561px) {
    .door img {
        width: 565px; /* Proportional size for 3440px width */
    }
}

#mobile-display .mobile-message {
    font-family: 'Winkle', sans-serif;
    color: black;
    font-size: 2.05em;
    text-align: center;
    padding: 20px 20px 0 20px;
    max-width: 70%;
}

.mobile-logo {
    width: 85px;
    height: auto;
    margin-top: -10px;
}

/* Mobile Display Styles */
#mobile-display {
    display: none; /* Hidden by default */
    flex-direction: column;
    width: 100vw;
    height: -webkit-fill-available;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: #F4F1EA; /* Match body background */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000; /* Ensure it's on top of everything */
}

@media (max-width: 768px) {
    /* Hide everything else */
    #page-container, #room-view, #site-logo-container, #back-button {
        display: none !important;
    }

    /* Show the mobile display */
    #mobile-display {
        display: flex;
    }
}