/* ============================================================
   Level UP — Responsive Stylesheet
   Mobile-first overrides. Linked AFTER style.css.
   ============================================================ */

/* ── Global overflow prevention ── */
*, *::before, *::after {
    box-sizing: border-box;
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
p, h1, h2, h3, h4, h5, h6, li, a, span, button {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Gallery Teaser Grid ── */
.gallery-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ── Gallery Teaser Cards (missing from style.css) ── */
.gallery-teaser-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: box-shadow 0.6s ease;
    cursor: pointer;
}
.gallery-teaser-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    filter: brightness(0.85);
}
.gallery-teaser-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.8); }
.gallery-teaser-card:hover img { transform: scale(1.08); filter: brightness(1.1); }

/* ── Horizontal Pre-Footer Form (missing from style.css) ── */
.horizontal-form {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.05);
}
.horizontal-form .input-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

/* ============================================================
   ── TABLET  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .gallery-grid-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   ── MOBILE  (≤ 768px)
   ============================================================ */
/* ── Hamburger button — 2 lines (minimal) ── */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 1.5px;
    background: var(--accent-gold);
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    border-radius: 2px;
}
.mobile-menu-toggle span:last-child {
    width: 18px; /* shorter second line — premium detail */
}

/* ── Full-screen overlay ── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0c;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    /* Decorative corner line */
    overflow: hidden;
}
.mobile-nav-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
    transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}
.mobile-nav-overlay.active::before {
    height: 100%;
}

/* ── Close button ── */
.mobile-nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    background: transparent;
    border: 1px solid rgba(201, 169, 97, 0.3);
    color: var(--accent-gold);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
    transition: opacity 0.4s ease 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, background 0.3s ease;
}
.mobile-nav-overlay.active .mobile-nav-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
.mobile-nav-close:hover {
    background: var(--accent-gold);
    color: #0a0a0c;
}

/* ── Nav links ── */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mobile-nav-item {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: var(--text-light);
    opacity: 0;
    transform: translateY(20px);
    transition: color 0.3s ease;
}
.mobile-nav-item:last-child {
    border-bottom: none;
}
.mobile-nav-overlay.active .mobile-nav-item {
    animation: navItemIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.mobile-nav-overlay.active .mobile-nav-item:nth-child(1) { animation-delay: 0.15s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(2) { animation-delay: 0.2s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(3) { animation-delay: 0.25s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(4) { animation-delay: 0.3s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(5) { animation-delay: 0.35s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(6) { animation-delay: 0.4s; }
.mobile-nav-overlay.active .mobile-nav-item:nth-child(7) { animation-delay: 0.45s; }
@keyframes navItemIn {
    to { opacity: 1; transform: translateY(0); }
}
.mobile-nav-item .nav-num {
    display: none;
}
.mobile-nav-item .nav-label {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 1px;
    transition: letter-spacing 0.3s ease, color 0.3s ease;
}
.mobile-nav-item:hover .nav-label,
.mobile-nav-item.active .nav-label {
    color: var(--accent-gold);
    letter-spacing: 3px;
}
.mobile-nav-item.active .nav-num {
    opacity: 1;
}

/* ── Footer CTA inside menu ── */
.mobile-nav-footer {
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease 0.55s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.55s;
}
.mobile-nav-overlay.active .mobile-nav-footer {
    opacity: 1;
    transform: translateY(0);
}
.mobile-nav-footer p {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

@media (max-width: 768px) {

    /* --- Global spacing --- */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .section-padding {
        padding-top: 2.5rem !important;
        padding-bottom: 3rem !important;
    }

    /* --- Gallery teaser grid → single column --- */
    .gallery-teaser-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* --- Typography — override ALL inline font-size values --- */
    .section-heading {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
        line-height: 1.2;
    }
    .intro-text {
        font-size: clamp(0.95rem, 4vw, 1.2rem);
    }
    p[style*="font-size"] {
        font-size: 0.95rem !important;
    }

    /* --- Header & Navigation --- */
    .nav-links {
        display: none !important;   /* hide desktop links on mobile */
    }
    .mobile-menu-toggle {
        display: flex;
    }
    header {
        height: 64px;
    }
    :root {
        --nav-height: 64px;
    }

    /* --- Hero --- */
    .hero {
        height: 100dvh !important;
        min-height: 600px !important;
        align-items: flex-end !important;
    }
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(14,14,16,0.1) 0%, rgba(14,14,16,0.85) 100%) !important;
    }
    .hero-content {
        padding: 0 1.25rem 4rem !important;
        width: 100%;
        text-align: center;
    }
    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .hero-cta .btn {
        width: 100%;
        max-width: 340px;
        padding: 1rem 1.5rem;
    }

    /* --- Typography --- */
    .section-heading {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .intro-text {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    /* --- Two-column grids → single column --- */
    .text-grid,
    .contact-grid,
    .loc-grid,
    .highlight-grid,
    .amenity-row {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        direction: ltr !important;
    }

    /* --- Stat cards --- */
    .highlight-grid {
        margin-top: 2rem;
    }
    .stat-card {
        padding: 1.75rem 1.5rem;
    }
    .stat-card h3 {
        font-size: 2.5rem;
    }

    /* --- Image block --- */
    .image-block {
        height: 60vh;
        min-height: 400px;
    }
    .image-block .overlay {
        padding: 1.5rem;
    }

    /* --- Amenities --- */
    .amenity-img {
        height: 52vw;
        min-height: 220px;
    }
    .amenity-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Gallery masonry --- */
    .gallery-grid-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 0.75rem;
    }
    .gallery-item.tall {
        grid-row: span 1;
    }

    /* --- Gallery teaser cards --- */
    .gallery-teaser-card {
        height: 260px;
    }

    /* --- Location map --- */
    .map-container {
        min-height: 300px;
    }

    /* --- Contact form --- */
    .form-container {
        padding: 1.75rem 1.25rem;
    }

    /* --- Data table: add horizontal scroll wrapper --- */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .data-table th,
    .data-table td {
        padding: 1rem 0.75rem;
    }

    /* --- Configurations page column fix --- */
    .config-grid,
    .stagger-grid[style*="repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Buttons --- */
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.85rem;
    }

    /* --- Modal --- */
    .modal-container {
        padding: 2rem 1.5rem;
        width: 95%;
        border-radius: 16px;
    }

    /* --- Horizontal form (pre-footer) --- */
    .horizontal-form {
        flex-direction: column;
        align-items: stretch;
        padding: 2rem 1.25rem;
        gap: 0;
    }
    .horizontal-form .input-group {
        margin-bottom: 1.5rem;
        min-width: unset;
    }
    .horizontal-form button {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* --- FABs (floating buttons) --- */
    .floating-ctas {
        bottom: 20px;
        right: 16px;
        gap: 10px;
    }
    .fab-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ============================================================
   ── SMALL MOBILE  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    .amenity-list-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }
    .stat-card h3 {
        font-size: 2rem;
    }
    .gallery-teaser-card {
        height: 220px;
    }
}
