:root {
    --bg-overlay: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.0) 100%);
    --gradient-brand: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    --plate-bg: rgba(255, 255, 255, 0.96);
    --plate-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
    --text-main: #1e293bc0;
    /* Slate 800 */
    --text-strong: #0f172a;
    /* Slate 900 */
    --text-light: #ffffff;
    --text-muted: #64748b;
    /* Slate 500 */
    --border-light: rgba(255, 255, 255, 0.4);
    --transition: all 0.6s cubic-bezier(0.25, 1, 0.2, 1);
    --radius: 20px;
    --panel-width: 420px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* No scrolling on main page */
    font-family: 'Outfit', sans-serif;
    color: var(--text-strong);
    background-color: #000;
}

/* Background Gallery */
.gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 5s ease-out;
    transform: scale(1.05);
}

.gallery-img.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.top-gradient-soft {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(28, 18, 12, 0.6) 0%, rgba(28, 18, 12, 0) 100%);
    z-index: 3;
    pointer-events: none;
}

.bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: radial-gradient(ellipse 90% 90% at 0% 100%, rgba(28, 18, 12, 0.65) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

/* Navigation Zones */
.nav-zone {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 5;
    /* border: 1px solid red; /* for debug */
}

.nav-left {
    left: 0;
    width: 30%;
    cursor: url('assets/ui/arrow-left-white.svg') 21 26, pointer;
}

.nav-right {
    right: 0;
    width: 30%;
    cursor: url('assets/ui/arrow-right-white.svg') 62 26, pointer;
}

.nav-center {
    left: 30%;
    width: 40%;
    cursor: default;
}

.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through except on elements */
}

.logo-plate {
    position: relative;
    padding: 24px 40px;
    margin-top: 0;
    font-size: 4.2rem;
    font-family: 'The Nautigal', cursive;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: transparent;
    text-shadow: none;
    border: none;
    z-index: 10;
    line-height: 1;
}

/* Shared Bottom Control Panel */
.panel-trigger-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
}

.panel-trigger {
    position: relative;
    width: 162px;
    height: 44px;
    pointer-events: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.panel-btn-about {
    position: absolute;
    left: 0;
    top: 0;
    width: 124px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-strong);
    padding-top: 2px;
    /* Lower edge bias */
    padding-right: 0;
    /* Removed previous shift */
    transition: opacity 0.3s;
}

.panel-btn-lang {
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    padding-top: 2px;
    /* Align with about button */
    padding-right: 16px;
    /* Move flag slightly left */
}

.panel-btn-about:hover,
.panel-btn-lang:hover {
    opacity: 0.6;
}

.panel-icon-flag {
    width: 18px;
    height: 14px;
    border-radius: 4px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.panel-btn-lang:hover .panel-icon-flag {
    filter: grayscale(0%);
}

.hidden {
    display: none !important;
}

/* Caption Block */
.caption-block {
    position: absolute;
    bottom: 120px;
    left: 120px;
    z-index: 10;
    color: var(--text-light);
    pointer-events: none;
    max-width: 600px;
    font-family: 'Inter', sans-serif;
}

.caption-title,
.caption-desc,
#title-num {
    transition: opacity 0.4s ease;
}

.fade-out {
    opacity: 0 !important;
}

.caption-counter {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.caption-title {
    font-size: 48px;
    font-weight: 200;
    margin-bottom: 12px;
    letter-spacing: 0;
    margin-left: -3px;
}

.caption-desc {
    font-size: 16px;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.5;
    letter-spacing: 0.01em;
    min-height: 3.5em;
    margin-bottom: 24px;
}

/* Section Navigation Timeline */
.nav-timeline-wrapper {
    display: flex;
    align-items: center;
    /* Centering button and timeline */
    gap: 16px;
    pointer-events: auto;
    margin-top: 20px;
    width: fit-content;
}

.play-pause-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.play-pause-btn:hover {
    opacity: 1;
}

.play-pause-btn svg {
    width: 100%;
    height: 100%;
}

.nav-timeline {
    position: relative;
    display: flex;
    gap: 6px;
    height: 48px;
    /* Forgiving hit zone */
    align-items: center;
    /* Line centered vertically */
    padding: 0;
}

.timeline-segment {
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    transition: background 0.4s ease, height 0.4s ease;
}

/* Invisible hit area expansion */
.timeline-segment::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    bottom: -20px;
    background: transparent;
}

.timeline-segment:hover {
    background: rgba(255, 255, 255, 0.5);
}

.timeline-segment.active {
    background: rgba(255, 255, 255, 0.4);
}

.segment-label {
    position: absolute;
    top: 22px;
    /* Positioned below the centered line */
    left: 0;
    font-size: 11px;
    font-weight: 300;
    color: var(--text-light);
    opacity: 0;
    /* Hidden by default */
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    transform: translateY(4px);
}

/* Reveal all labels when hovering the overall timeline area */
.nav-timeline:hover .segment-label {
    opacity: 0.8;
    transform: translateY(0);
}

.timeline-marker {
    position: absolute;
    width: 8px;
    /* Smaller, more delicate */
    height: 8px;
    background: #fff;
    /* Solid white */
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    transition: left 0.6s cubic-bezier(0.25, 1, 0.2, 1);
    top: 50%;
    transform: translate(-50%, -50%);
}

.timeline-segment {
    min-width: 20px;
}

/* About Panel */
.about-panel {
    position: absolute;
    bottom: 80px;
    /* Floating above the bottom button */
    left: 50%;
    transform: translateX(-50%);
    width: 940px;
    /* Wider desktop-only layout */
    max-height: 80vh;
    background: var(--plate-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 32px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-light);
    z-index: 60;
    /* Above the trigger */
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 1, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.about-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.about-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.about-panel-header h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-strong);
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.close-btn img {
    width: 20px;
    height: 20px;
}

.about-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 34px 34px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* About Panel Scrollbar - Refined */
.about-panel-content::-webkit-scrollbar {
    width: 4px;
}

.about-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.about-panel-content::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.about-panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: background-color 0.3s;
}

.about-panel-content:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
}

/* Fix for modern browsers without arrows */
.about-panel-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

.about-panel-content:hover {
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* Content Formatting */
.about-section {
    /*margin-bottom: 24px;*/

}

.about-section h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-strong);
    margin-bottom: 12px;
}

hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 24px 0;
}

.intro-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-strong);
    font-weight: 400;
}

.muted-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.facts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: center;
}

.fact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-strong);
    background: none;
    padding: 0;
    border-radius: 0;
}

.fact-item .icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.amenities-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 16px;
    margin-top: 20px;
}

.content-row-four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: flex-start;
}

.content-row-four-col .about-section {
    margin-bottom: 0;
}

.content-row-four-col .muted-text {
    font-size: 0.8rem;
    line-height: 1.55;
}

.amenities-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-strong);
}

.amenities-list li svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.list-dots {
    list-style: none;
}

.list-dots li {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-strong);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.list-dots li svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    flex-shrink: 0;
    margin-top: 2px;
}

.list-dots li strong {
    font-weight: 500;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list li {
    padding: 4px 0;
    margin-right: 24px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
}

.tag-list li svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Booking Platforms Section (Understated Premium Chips) */
.booking-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
}

.platform-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-strong);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.platform-chip:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.platform-chip img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    filter: saturate(0.9);
}

.platform-chip span {
    letter-spacing: -0.01em;
}


/* Intro Overlay */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Above everything */
    opacity: 1;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-logo {
    font-family: 'The Nautigal', cursive;
    font-size: 8.5rem;
    font-weight: 700;
    color: #000;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    padding: 20px;
    width: auto;
    max-width: 80%;
}

.intro-logo.visible {
    opacity: 1;
    transform: scale(1);
}

.intro-logo.fade-out {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .nav-left,
    .nav-right,
    .nav-center {
        display: none;
        /* Rely on swipe */
    }

    .nav-timeline-wrapper {
        display: none;
        /* Desktop only */
    }

    .caption-block {
        bottom: 100px;
        /* Space for mobile pill */
        left: 20px;
        right: 20px;
        text-align: center;
    }

    .caption-title {
        font-size: 1.8rem;
    }

    .caption-desc {
        font-size: 0.9rem;
        min-height: auto;
        margin-bottom: 20px;
    }

    .about-panel {
        width: 100%;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: 85vh;
        max-height: 85vh;
        transform: translateY(20px);
        border-radius: 24px 24px 0 0;
        opacity: 0;
        transition: opacity 0.5s ease, transform 0.5s ease;
        pointer-events: none;
    }

    .amenities-list {
        grid-template-columns: 1fr 1fr;
    }

    .content-row-four-col {
        display: block;
    }

    .content-row-four-col .about-section {
        margin-bottom: 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 24px;
    }

    .content-row-four-col .about-section:last-child {
        border-bottom: none;
    }

    .booking-platforms {
        gap: 8px;
    }

    .platform-chip {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .about-panel.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .logo-plate {
        font-size: 2.8rem;
        padding: 12px 20px;
        margin-top: 10px;
    }

    /* Shared Bottom Control Panel Mobile Positioning */
    .panel-trigger-wrapper {
        bottom: 0px;
        bottom: calc(0px + env(safe-area-inset-bottom));
    }

    .panel-icon-flag {
        filter: grayscale(0);
        /* Disable grayscale hover requirement on mobile */
    }

    /* Cinematic Mobile Transitions - Scaled up to prevent edge gaps */
    .gallery-img {
        transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
        width: 110%;
        /* Extra width to cover movement gaps */
        left: -5%;
    }

    .gallery-img.active {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    .gallery-img.slide-next {
        opacity: 0;
        transform: translateX(-50px) scale(1.1);
        /* Increased scale to cover gaps */
    }

    .gallery-img.slide-prev {
        opacity: 0;
        transform: translateX(50px) scale(1.1);
    }

    .intro-logo {
        font-size: 4.8rem;
        max-width: 90%;
        line-height: 1.1;
    }
}