/* ==========================================================================
   5. TH GATEWAY (SPLIT SCREEN) - FIXED
   ========================================================================== */
.gateway-wrapper {
    display: flex;
    width: 100%;
    height: calc(100vh - 104px); /* Subtract header height */
    min-height: 600px;
    overflow: hidden;
    position: relative; /* Essential for Logo Positioning */
}

.gateway-node {
    position: relative;
    flex: 1;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; overflow: hidden; cursor: pointer;
}

/* Background & Overlay */
.gateway-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transition: transform 0.8s ease; z-index: 0;
}
.gateway-node::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0.3); z-index: 1;
    transition: background 0.4s ease;
}

/* Content & Logic */
.gateway-content {
    position: relative; z-index: 2; text-align: center;
    color: #fff; transition: transform 0.4s ease;
}
.gateway-title {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 4vw, 4rem);
    text-shadow: 0 4px 12px rgba(0,0,0,0.3); margin: 0; color: #fff;
}
.gateway-subtitle {
    font-family: var(--font-body); font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    margin-top: 10px; opacity: 0.9; color: #fff;
}

/* Gateway Logo Center */
.gateway-logo-anchor {
    position: absolute; top: 105px; left: 50%;
    transform: translateX(-50%); z-index: 20;
}
.gateway-logo {
    width: 120px; height: auto;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
    transition: transform 0.3s ease;
}
.gateway-logo:hover { transform: scale(1.05); }

/* Gateway Interactions */
.gateway-node:hover { flex: 1.5; }
.gateway-wrapper:hover .gateway-node:not(:hover) { flex: 0.8; }
.gateway-wrapper:hover .gateway-node:not(:hover)::before { background: rgba(0,0,0,0.6); }
.gateway-node:hover .gateway-bg { transform: scale(1.05); }

@media (max-width: 768px) {
    .gateway-wrapper { flex-direction: column; }
    .gateway-node { width: 100%; }
}

/* =========================================
   OYSTER LODGE ADD-ONS (Airbnb Layout)
   ========================================= */

/* --- 1. The Mosaic Grid --- */
.th-mosaic-container {
    /* Uses your existing variable for rounding */
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: clamp(24px, 4vw, 20px);
}

.th-mosaic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% split */
    gap: 8px; /* Small gap like Airbnb */
    height: clamp(300px, 50vw, 450px);
}

.th-mosaic-sub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;

    /* === THESE LINES ARE MISSING === */
    height: 100%;        /* Forces it to fit the parent height exactly */
    min-height: 0;       /* Prevents grid blowout on some browsers */
    /* ============================== */
}

.th-mosaic-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.th-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Hover Effect: Darken slightly on hover */
.th-mosaic-item:hover img {
    filter: brightness(0.9);
}

/* --- 2. Layout Grid (Content + Sidebar) --- */
.th-listing-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr; /* Content is wider */
    gap: clamp(40px, 5vw, 80px);
    position: relative;
    padding-bottom: 60px;
}

/* --- 3. The Sticky Sidebar Card --- */
.th-sidebar-col {
    position: relative;
}

.th-sticky-card {
    position: sticky;
    top: 120px; /* offset from your fixed header */
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-2); /* Using your deeper shadow */
    background: #fff;
}

/* The Date Picker Grid Box */
.th-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.th-date-cell {
    padding: 10px 12px;
    background: #fff;
}

.th-date-cell label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink);
}

.th-date-cell input,
.th-date-cell select {
    border: none;
    width: 100%;
    font-size: 14px;
    color: var(--ink-2);
    outline: none;
    background: transparent;
    padding: 0;
}

.th-date-cell.full-width {
    grid-column: span 2;
    border-top: 1px solid #b0b0b0;
}

.th-date-cell.border-right {
    border-right: 1px solid #b0b0b0;
}

/* --- 4. Amenities Grid --- */
.th-amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- 5. Flex Utilities (If missing from your file) --- */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.border-bottom { border-bottom: 1px solid var(--line); }

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .th-listing-layout {
        grid-template-columns: 1fr; /* Stack content */
    }
    .th-mosaic-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        height: 300px;
        gap: 0;
    }
    .th-mosaic-main, .th-mosaic-sub {
        min-width: 100%;
        scroll-snap-align: center;
    }
    .th-mosaic-sub { display: none; /* Simplify to single image on mobile */ }
}

/* --- 1. Mosaic Overlays (Restored) --- */
.th-mosaic-item {
    position: relative; /* Essential for positioning text over image */
}

.th-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 16px;
    /* Gradient makes text readable against any image */
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
    z-index: 2;
    pointer-events: none; /* Allows clicking through to the image link */
}

.th-overlay-text h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-family: var(--font-head);
}

.th-overlay-text.small {
    padding: 12px;
}

.th-overlay-text.small span {
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* --- 2. Static Calendar Section --- */
.th-calendar-wrapper {
    background: #fff;
    padding-bottom: 20px;
}

.th-cal-header {
    margin-bottom: 20px;
}

.th-cal-months {
    display: flex;
    gap: 40px;
    margin-bottom: 10px;
}

.th-cal-month {
    flex: 1;
}

.th-cal-month-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ink);
}

.th-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    row-gap: 6px;
}

.th-cal-day-label {
    font-size: 0.75rem;
    color: #717171;
    margin-bottom: 8px;
    font-weight: 600;
}

.th-cal-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    cursor: default;
}

/* Styling for "Available", "Disabled", and "Selected" dates */
.th-cal-date.disabled { color: #ddd; text-decoration: line-through; }
.th-cal-date.selected { background: var(--ink); color: #fff; }
.th-cal-date.range { background: #f7f7f7; border-radius: 0; width: 100%; }

.th-clear-btn {
    text-decoration: underline;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.9rem;
    cursor: pointer;
    float: right;
}

/* Mobile: Stack calendars */
@media (max-width: 768px) {
    .th-cal-months { flex-direction: column; gap: 20px; }
    .th-cal-month + .th-cal-month { display: none; /* Hide 2nd month on mobile for space */ }
}
.th-mini-logo {
    display: block;
    margin: 0 auto -10px auto; /* Centers it and adds space below */
    width: 60px; /* Adjust size as needed */
    height: auto;
    opacity: 0.9;
}

.bg-oyster-dark {
    background-color: #2b4e57; /* Deep Coastal Teal */
    color: #fff;
    padding: 80px 0;
    margin-bottom: 60px; /* Space before the next white section */
}

/* Adjust text inside this dark section to be white */
.bg-oyster-dark .subheading { color: #8ecacb !important; } /* Lighter teal for contrast */
.bg-oyster-dark h2 { color: #fff !important; }
.bg-oyster-dark p { color: rgba(255,255,255,0.9) !important; }

/* OPTIONAL: Make the logo white if it's a transparent PNG */
.bg-oyster-dark .th-mini-logo { filter: brightness(0) invert(1); }