/* -------------------------------------------------------------------------- */
/* HILBERTS HOTEL - SPECIFIK STYLING KUN FOR HOTELGANG, DØRE & BUNDOMRÅDE   */
/* -------------------------------------------------------------------------- */

html,
body {
    background-color: var(--bg-white);
}

/* Sektion 2: Hotelgangen */
.hotel-corridor-main {
    width: 100%;
    position: relative;
    box-sizing: border-box;
    margin-top: -1rem;
    /* Afstand op mod overskriften */
}

/* Viewporten er tilpasset dørhøjde (390px) + tæppehøjde (90px) = 480px */
.corridor-viewport {
    position: relative;
    width: 100%;
    height: 480px;
    background-color: var(--bg-white);
    overflow: hidden;
}

/* FASTLÅST VÆGBAGGRUND OG FODLISTE */
.corridor-wall-bg {
    position: absolute;
    inset: 0;
    bottom: 90px;
    /* Slutter præcist over tæppet */
    background-color: var(--bg-white);
    border-bottom: 10px solid #e2dad0;
    pointer-events: none;
    z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* BEVÆGELIG DØRRÆKKE (RULLER SIDESVÆRS VED SCROLL)                          */
/* -------------------------------------------------------------------------- */

.doors-viewport-container {
    position: absolute;
    inset: 0;
    overflow-x: scroll;
    overflow-y: hidden;
    z-index: 5;

    /* Skjul scrollbar helt */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.doors-viewport-container::-webkit-scrollbar {
    display: none;
}

/* Dørrække placeret direkte over gulvtæppet */
.doors-track {
    display: flex;
    gap: 4.5rem;
    padding-left: 10%;
    padding-right: 10%;
    padding-bottom: 90px;
    /* Giver 90px plads til tæppet i bunden */
    position: relative;
    min-width: max-content;
    height: 100%;
    box-sizing: border-box;
    align-items: flex-end;
}

/* GULVTÆPPE DER GENERERES ELLER LIGGER INDE I DOORS-CONTAINER */
.corridor-floor-runner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background:
        repeating-linear-gradient(90deg,
            #b56d80 0px,
            #b56d80 75px,
            #a1576a 75px,
            #a1576a 150px),
        linear-gradient(180deg, #b56d80 0%, #864052 100%);
    box-shadow:
        inset 0 5px 10px rgba(0, 0, 0, 0.2),
        inset 0 -3px 8px rgba(0, 0, 0, 0.15);
    border-top: 3px solid #864052;
    pointer-events: none;
    z-index: 2;
}

/* Dørkort med fast original størrelse */
.hotel-door-card {
    position: relative;
    width: 200px;
    height: 390px;
    perspective: 1100px;
    flex-shrink: 0;
    z-index: 10;

    /* Indgangsanimation fra højre */
    opacity: 0;
    transform: translateX(120vw) rotateY(20deg);
    will-change: transform, opacity;
}

/* Slide-in animation ved sideåbning */
.hotel-door-card.slide-in {
    animation: doorEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes doorEntrance {
    0% {
        opacity: 0;
        transform: translateX(100vw) rotateY(30deg) scale(0.85);
    }

    75% {
        opacity: 1;
        transform: translateX(-14px) rotateY(-8deg) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
    }
}

/* Dørramme (Trækarme) */
.door-frame {
    position: absolute;
    inset: 0;
    border: 11px solid #1c0e07;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background-color: #0b0503;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 0 14px rgba(0, 0, 0, 0.9);
}

/* Det indre af værelset (varmt gyldent lys) */
.door-interior {
    position: absolute;
    inset: 0;
    background: white;
    border-radius: 2px 2px 0 0;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-mathematician-img {
    /* FINJUSTER STØRRELSEN HER (f.eks. 70%, 80%, 140px osv.) */
    width: 75%;
    height: auto;
    max-height: 75%;

    object-fit: contain;
    object-position: center;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* MØRKEBRUN FYLDNINGSDØR (DESIGN)                                            */
/* -------------------------------------------------------------------------- */

.door-body {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #4d2716 0%, #2f160a 45%, #3d1e10 75%, #210d04 100%);
    border: 2px solid #1a0a03;
    border-radius: 2px 2px 0 0;
    transform-origin: left center;
    transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 0.8rem;
    box-shadow: 5px 0 18px rgba(0, 0, 0, 0.4);
}

.door-body:hover {
    filter: brightness(1.08);
}

/* Udskårne paneler / fyldninger i døren */
.door-panel-top,
.door-panel-bottom {
    width: 100%;
    background: linear-gradient(145deg, #2a1308 0%, #462212 100%);
    border-radius: 4px;
    border: 2px solid #190903;
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.75),
        inset -3px -3px 5px rgba(255, 255, 255, 0.08),
        0 1px 2px rgba(255, 255, 255, 0.05);
}

.door-panel-top {
    height: 140px;
    margin-top: 2.8rem;
}

.door-panel-bottom {
    height: 140px;
    margin-top: 1.1rem;
}

/* Messing skilt med ulige værelsesnummer */
.room-plaque {
    position: absolute;
    top: 1rem;
    background: linear-gradient(135deg, #e5c158 0%, #fff3b3 45%, #b38b19 100%);
    color: #2b1a03;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.25rem 0.95rem;
    border-radius: 3px;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border: 1px solid #7a5a0c;
    letter-spacing: 0.05em;
}

/* Messing dørhåndtag & nøglehul */
.door-handle {
    position: absolute;
    right: 14px;
    top: 54%;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #edd177 0%, #b89125 100%);
    border-radius: 50%;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    border: 1px solid #6b510f;
}

.door-handle::after {
    content: "";
    position: absolute;
    right: 3px;
    top: 5px;
    width: 16px;
    height: 6px;
    background: linear-gradient(135deg, #f9e396 0%, #a37c17 100%);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Åbnings-tilstand ved klik på dør */
.hotel-door-card.door-open .door-body {
    transform: rotateY(-112deg);
    box-shadow: 16px 0 35px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------------------- */
/* DET HVIDE TEKSTOMRÅDE UNDER TÆPPET                                      */
/* -------------------------------------------------------------------------- */

.corridor-info-banner {
    width: 100%;
    background-color: var(--bg-white);
    padding: 3.5rem 10%;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
}

.banner-content {
    max-width: 800px;
}

.corridor-info-banner h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.corridor-info-banner p {
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* -------------------------------------------------------------------------- */
/* RESPONSIFT DESIGN TIL TABLETS OG MOBIL                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .hotel-corridor-main {
        margin-top: -2rem;
    }

    .corridor-viewport {
        height: 370px;
    }

    .corridor-wall-bg {
        bottom: 70px;
    }

    .doors-track {
        padding-left: 6%;
        gap: 3rem;
        padding-bottom: 70px;
    }

    .corridor-floor-runner {
        height: 70px;
    }

    .hotel-door-card {
        width: 150px;
        height: 300px;
    }

    .door-panel-top,
    .door-panel-bottom {
        height: 100px;
    }

    .corridor-info-banner {
        padding: 2.5rem 6%;
    }
}