/* =============================================================
   THE CONSTANTINOPLE — Mobile App-like Stylesheet
   Loaded AFTER all other CSS to override desktop styles.
   Designed for future native-app wrapping (Capacitor / WebView).
   ============================================================= */

/* ---------- MOBILE CSS VARIABLES ---------- */
:root {
    --bottom-bar-height: 64px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --mobile-padding: 16px;
    --mobile-radius: 14px;
    --drawer-width: 85vw;
}

/* =============================================================
   SECTION 1: BOTTOM TAB BAR
   ============================================================= */
.mobile-tab-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tab-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9998;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        height: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
        padding-bottom: var(--safe-area-bottom);
        background: rgba(15, 25, 45, 0.92);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(201, 168, 76, 0.15);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .mobile-tab-bar {
        background: rgba(10, 14, 20, 0.95);
    }

    .tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.45);
        font-family: var(--font-body);
        font-size: 0.62rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        padding: 6px 0;
        position: relative;
        transition: color 0.25s ease;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    .tab-item:active {
        transform: scale(0.92);
    }

    .tab-icon {
        font-size: 1.35rem;
        line-height: 1;
        transition: transform 0.25s ease;
    }

    .tab-icon-svg {
        width: 22px;
        height: 22px;
        transition: transform 0.25s ease;
    }

    .tab-label {
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .tab-item.active {
        color: var(--gold-primary);
    }

    .tab-item.active .tab-icon,
    .tab-item.active .tab-icon-svg {
        transform: scale(1.15);
        filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.5));
    }

    .tab-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 28px;
        height: 2.5px;
        background: var(--gold-primary);
        border-radius: 0 0 4px 4px;
    }

    /* Body padding for bottom bar */
    body {
        padding-bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom));
    }

    /* Hide footer on mobile — content accessible in profile */
    .site-footer {
        display: none;
    }

    /* Scroll-to-top repositioned well above tab bar */
    .scroll-top {
        bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 24px);
        right: 14px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        box-shadow: 0 2px 12px rgba(201, 168, 76, 0.3);
    }

    /* Reservation cart badge repositioned */
    .rez-cart-badge {
        bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
    }
}

/* =============================================================
   SECTION 2: MOBILE DRAWER NAVIGATION
   ============================================================= */
@media (max-width: 768px) {

    /* Override the existing mobile-open overlay with a proper drawer */
    .nav-links.mobile-open {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: var(--drawer-width);
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: rgba(12, 20, 40, 0.97);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        padding: calc(var(--nav-height) + 16px) 24px 32px;
        gap: 0;
        flex-direction: column;
        z-index: 1000;
        animation: drawerSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(201, 168, 76, 0.1);
    }

    @keyframes drawerSlideIn {
        from {
            transform: translateX(100%);
            opacity: 0.8;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* Drawer link items */
    .nav-links.mobile-open li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links.mobile-open li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 8px;
        font-size: 0.95rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
        transition: color 0.2s, background 0.2s;
        border-radius: 10px;
    }

    .nav-links.mobile-open li a:active {
        background: rgba(201, 168, 76, 0.1);
        color: var(--gold-light);
    }

    /* nav-actions always visible in navbar, no drawer override */

    /* Drawer backdrop overlay */
    .drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    .drawer-backdrop.visible {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Hamburger reposition */
    .hamburger {
        z-index: 1002;
    }
}

/* =============================================================
   SECTION 3: NAVBAR MOBILE REFINEMENTS
   ============================================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 var(--mobile-padding);
        height: 56px;
    }

    :root {
        --nav-height: 56px;
    }

    .nav-logo .logo-text {
        font-size: 0.85rem;
    }

    .logo-img {
        height: 120px;
        margin: -35px -10px;
    }

    .nav-cta {
        display: none;
    }
}

/* =============================================================
   SECTION 4: INDEX PAGE — HERO MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .hero {
        padding: 56px 0 0;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-title-area {
        padding: 1.2rem 1rem 0.3rem;
    }

    .title-cloud-bg {
        width: 90vw;
        height: 180px;
    }

    .hero-title {
        font-size: clamp(1.4rem, 6.5vw, 2rem);
    }

    .hero-subtitle-top,
    .hero-subtitle-bottom {
        font-size: 0.68rem;
        letter-spacing: 0.25em;
    }

    .hero-diamond {
        font-size: 0.5rem;
    }

    .island-container {
        padding: 0 0.5rem;
    }

    .island-img {
        width: 88vw;
        max-width: 380px;
    }

    /* Hide clouds on very small screens for performance */
    .css-cloud {
        display: none;
    }

    /* Hide floating game icons on mobile */
    .game-icon {
        display: none;
    }

    .hero-cta-area {
        padding: 0.5rem 1rem 1rem;
        gap: 0.6rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.78rem;
        padding: 0.85rem 1.8rem;
        width: 100%;
        text-align: center;
    }

    .cultural-border {
        height: 32px;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1.3rem;
    }

    .island-img {
        width: 92vw;
    }
}

/* =============================================================
   SECTION 5: INDEX PAGE — TEASER MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .teaser {
        padding: 3rem var(--mobile-padding);
    }

    .teaser-heading {
        font-size: 1.4rem;
    }

    .teaser-text {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    /* Force 2x2 grid layout for teaser feature chips */
    .teaser-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        flex-wrap: nowrap;
    }

    .teaser-chip {
        justify-content: center;
        padding: 0.55rem 0.5rem;
        font-size: 0.78rem;
    }

    .teaser-cta {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
    }

    .teaser-pattern-left,
    .teaser-pattern-right {
        display: none;
    }
}

/* =============================================================
   SECTION 6: INDEX PAGE — EVENTS / CARDS MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .events {
        padding: 2.5rem var(--mobile-padding) 3rem;
    }

    .events-title {
        font-size: 1.5rem;
    }

    .events-subtitle {
        font-size: 0.88rem;
    }

    /* Countdown strip compact */
    .countdown-strip {
        padding: 1rem;
        border-radius: var(--mobile-radius);
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .digit-value {
        font-size: 1.5rem;
    }

    .digit-label {
        font-size: 0.55rem;
    }

    .countdown-digit {
        min-width: 48px;
    }

    /* Filter tabs horizontal scroll */
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        gap: 6px;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 0.55rem 1rem;
        font-size: 0.7rem;
    }

    /* Event cards single column, full width */
    .events-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .event-card {
        border-radius: var(--mobile-radius);
    }

    .card-image {
        height: 180px;
    }

    .event-body {
        padding: 14px 16px 16px;
    }

    .event-name {
        font-size: 0.95rem;
    }

    .event-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .event-meta {
        gap: 6px;
    }

    .meta-item {
        font-size: 0.72rem;
    }

    .event-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .btn-book {
        padding: 8px 16px;
        font-size: 0.72rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-airbnb-card {
        min-height: 44px;
        padding: 6px 12px;
    }
}

/* =============================================================
   SECTION 7: STATS, TESTIMONIALS, GALLERY, MEDIA — MOBILE
   ============================================================= */
@media (max-width: 768px) {

    /* Stats — compact mobile layout */
    .stats-section {
        padding: 40px 0;
    }

    .stats-header {
        margin-bottom: 24px;
    }

    .stats-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px 10px;
        border-radius: var(--mobile-radius);
    }

    .stat-icon {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .stat-icon-img {
        width: 52px;
        height: 52px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-plus {
        font-size: 1.2rem;
    }

    .stat-desc {
        font-size: 0.72rem;
        margin-top: 6px;
    }

    /* Testimonials */
    .testimonials-section {
        padding: 50px 0;
    }

    .testimonials-title {
        font-size: 1.6rem;
    }

    .testimonial-card {
        min-width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        border-radius: var(--mobile-radius);
    }

    .testimonial-text {
        font-size: 0.9rem;
    }

    .testimonial-controls {
        margin-top: 24px;
    }

    .testimonial-btn {
        width: 40px;
        height: 40px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Gallery — carousel mode on mobile */
    .gallery-section {
        padding: 40px 0;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .gallery-slide {
        min-width: calc(100% - 40px);
    }

    .gallery-slide img {
        height: 240px;
        border-radius: 10px;
    }

    .gallery-slide-overlay {
        opacity: 1;
        border-radius: 0 0 10px 10px;
    }

    .gallery-caption {
        font-size: 0.85rem;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .gallery-dots {
        margin-top: 12px;
        align-items: center;
    }

    .gallery-dot {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
        flex-shrink: 0;
        border-radius: 50%;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 160px;
        gap: 10px;
    }

    .gallery-item {
        border-radius: 10px;
    }

    .gallery-overlay {
        padding: 14px;
        opacity: 1;
    }

    /* Media section */
    .media-section {
        padding: 40px 0;
    }

    .media-title {
        font-size: 1.5rem;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .media-card {
        padding: 18px;
        border-radius: var(--mobile-radius);
    }

    .media-card-title {
        font-size: 0.95rem;
    }

    .media-card-excerpt {
        font-size: 0.82rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* =============================================================
   SECTION 8: CALENDAR PAGE — MOBILE
   ============================================================= */
@media (max-width: 768px) {

    /* Main layout single column */
    .cal-main-layout {
        grid-template-columns: 1fr;
    }

    .cal-sidebar {
        position: static;
        max-height: none;
    }

    /* Event cards vertical layout */
    .cal-event-card {
        grid-template-columns: 1fr;
    }

    .cal-card-image {
        min-height: 160px;
        max-height: 180px;
    }

    .cal-card-body {
        padding: 16px;
    }

    .cal-event-title {
        font-size: 1.05rem;
    }

    .cal-event-desc {
        font-size: 0.82rem;
    }

    /* Carousel cards */
    .cal-carousel-card {
        flex: 0 0 180px;
    }

    /* Activity feed */
    .cal-activity-feed {
        position: static;
        max-height: none;
    }

    .cal-feed-card {
        border-radius: var(--mobile-radius);
    }

    /* Spotlight */
    .cal-spotlight-inner {
        grid-template-columns: 1fr;
    }

    .cal-spotlight-image {
        min-height: 180px;
        max-height: 220px;
    }

    .cal-spotlight-info {
        padding: 16px;
    }

    /* Info strip */
    .cal-info-strip-inner {
        padding: 12px var(--mobile-padding);
    }

    /* Calendar tabs scrollable */
    .cal-tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cal-tabs-container::-webkit-scrollbar {
        display: none;
    }

    .cal-tabs {
        flex-wrap: nowrap;
    }

    .cal-tab {
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px;
    }

    /* Calendar page body padding */
    .cal-page {
        padding-bottom: 0;
    }
}

/* =============================================================
   SECTION 9: LIVE DASHBOARD — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .live-dashboard {
        padding: 56px var(--mobile-padding) 16px;
    }

    .live-main-layout {
        grid-template-columns: 1fr;
    }

    .live-sidebar {
        position: static;
    }

    .live-game-card {
        border-radius: var(--mobile-radius);
    }

    .live-messages {
        max-height: 200px;
    }

    .live-chat-input {
        font-size: 16px !important;
        /* prevents zoom on iOS */
    }

    .live-chat-send {
        min-width: 48px;
        min-height: 48px;
    }

    .live-stat-card {
        min-width: 100px;
        padding: 10px 12px;
    }

    .live-sidebar-card {
        border-radius: var(--mobile-radius);
    }
}

/* =============================================================
   SECTION 10: ABOUT PAGE — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .about-hero {
        min-height: 35vh;
        padding-top: 56px;
    }

    .about-hero-title {
        font-size: 1.8rem;
    }

    .about-hero-content {
        padding: 40px var(--mobile-padding);
    }

    .about-timeline {
        padding-left: 28px;
    }

    .timeline-dot {
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .timeline-card {
        padding: 1rem;
    }

    .about-activities-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .about-activity-card {
        padding: 1.5rem 1.2rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .value-card {
        padding: 24px 20px;
    }

    .about-contact-wrapper {
        grid-template-columns: 1fr;
    }

    .about-contact-form-card {
        padding: 24px var(--mobile-padding);
    }

    .about-form-group input,
    .about-form-group textarea {
        font-size: 16px !important;
        /* prevent iOS zoom */
        padding: 14px 16px;
    }

    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .about-stat-item {
        padding: 1.2rem 0.8rem;
    }
}

/* =============================================================
   SECTION 11: INVENTORY PAGE — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .inv-hero {
        min-height: 240px;
        margin-top: 56px;
    }

    .inv-hero-content {
        padding: 40px var(--mobile-padding);
    }

    .inv-filter-bar {
        top: 56px;
        padding: 12px 0 10px;
    }

    .inv-filter-bar .inv-container {
        flex-direction: column;
        gap: 8px;
    }

    .inv-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        justify-content: flex-start;
        width: 100%;
    }

    .inv-filters::-webkit-scrollbar {
        display: none;
    }

    .inv-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
        min-height: 40px;
        display: flex;
        align-items: center;
        padding: 6px 14px;
        font-size: 0.68rem;
    }

    .inv-stats {
        font-size: 0.75rem;
        justify-content: center;
    }

    .inv-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .inv-card {
        overflow: hidden;
    }

    .inv-card-image {
        aspect-ratio: 4 / 3;
    }

    .inv-card-body {
        padding: 10px 10px 12px;
    }

    .inv-card-title {
        font-size: 0.82rem;
        margin-bottom: 4px;
    }

    .inv-card-desc {
        font-size: 0.72rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
    }

    .inv-card-footer {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .inv-interest-btn {
        padding: 6px 10px;
        font-size: 0.72rem;
        min-height: 38px;
        justify-content: center;
        width: 100%;
    }

    .inv-interest-text {
        font-size: 0.68rem;
    }

    .inv-interest-count {
        text-align: center;
        font-size: 0.72rem;
        padding: 4px 8px;
    }

    .inv-cta-inner {
        padding: 32px 20px;
    }

    .inv-cta-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 420px) {
    .inv-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .inv-card-image {
        aspect-ratio: 16 / 9;
    }

    .inv-card-body {
        padding: 14px 14px 16px;
    }

    .inv-card-footer {
        flex-direction: row;
        align-items: center;
    }

    .inv-interest-btn {
        width: auto;
    }
}

/* =============================================================
   SECTION 12: CORPORATE PAGE — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .corp-hero {
        min-height: 70vh;
    }

    .corp-section {
        padding: 3rem 0;
    }

    .corp-section-title {
        font-size: 1.5rem;
    }

    .corp-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .corp-card {
        padding: 1.5rem 1.2rem;
    }

    .corp-custom-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .corp-why-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .corp-why-card {
        padding: 1.5rem 1rem;
    }

    .corp-gallery-slide img {
        height: 240px;
    }

    .corp-contact-wrapper {
        grid-template-columns: 1fr;
    }

    .corp-contact-form-card {
        padding: 20px var(--mobile-padding);
    }

    .corp-form-group input,
    .corp-form-group select,
    .corp-form-group textarea {
        font-size: 16px !important;
        padding: 14px;
    }

    .corp-form-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .corp-why-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   SECTION 12.5: AUTH MODAL — MOBILE
   ============================================================= */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-social-btn {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    .rez-auth-buttons {
        flex-direction: column;
    }

    .rez-auth-buttons .rez-btn {
        width: 100%;
    }
}

/* =============================================================
   SECTION 13: RESERVATION SYSTEM — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .rez-overlay {
        align-items: flex-end;
    }

    .rez-panel {
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        max-height: calc(95vh - var(--safe-area-bottom));
        padding-bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
    }

    .rez-close {
        width: 44px;
        height: 44px;
    }

    .rez-stepper-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .rez-stepper-val {
        font-size: 22px;
        width: 56px;
    }

    .rez-input {
        font-size: 16px !important;
        padding: 14px 16px;
    }

    .rez-btn {
        min-height: 52px;
        font-size: 15px;
    }

    .rez-step {
        padding: 20px var(--mobile-padding);
    }

    .rez-progress {
        padding: 16px var(--mobile-padding) 0;
    }

    .rez-step-line {
        width: 40px;
    }
}

/* =============================================================
   SECTION 14: AUTH MODAL — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
    }

    .modal-panel {
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        padding: 2rem var(--mobile-padding) calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
        max-height: 90vh;
    }

    .modal-close {
        width: 44px;
        height: 44px;
    }

    .form-input {
        font-size: 16px !important;
        padding: 14px 16px;
        min-height: 48px;
    }

    .btn-modal-primary {
        min-height: 52px;
        font-size: 0.9rem;
    }
}

/* =============================================================
   SECTION 15: GLOBAL MOBILE TOUCH OPTIMIZATIONS
   ============================================================= */
@media (max-width: 768px) {

    /* Touch-friendly tap targets minimum 44px */
    button,
    a,
    [role="button"],
    input[type="submit"],
    input[type="button"],
    .filter-tab,
    .cal-tab,
    .inv-filter-btn {
        min-height: 44px;
    }

    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Smooth scrolling with overscroll containment */
    * {
        overscroll-behavior: contain;
    }

    /* Remove hover effects on touch */
    @media (hover: none) {

        .event-card:hover,
        .stat-card:hover,
        .value-card:hover,
        .about-activity-card:hover,
        .inv-card:hover,
        .corp-card:hover,
        .corp-custom-card:hover,
        .corp-why-card:hover,
        .media-card:hover {
            transform: none;
            box-shadow: inherit;
        }

        .gallery-overlay {
            opacity: 1;
        }
    }

    /* Disable user-select on interactive elements */
    .mobile-tab-bar,
    .hamburger,
    .nav-logo {
        -webkit-user-select: none;
        user-select: none;
    }

    /* iOS input zoom prevention */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Content sections tighter padding */
    .events-container,
    .stats-container,
    .testimonials-container,
    .gallery-container,
    .media-container {
        padding: 0 var(--mobile-padding);
    }

    /* About page containers */
    .about-timeline-section,
    .about-activities-section,
    .about-values,
    .about-brands-section,
    .about-contact-section {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }

    /* Inventory containers */
    .inv-container {
        padding: 0 var(--mobile-padding);
    }

    /* Corporate containers */
    .corp-container {
        padding: 0 var(--mobile-padding);
    }

    /* Calendar page container */
    .cal-container {
        padding: 0 var(--mobile-padding);
    }

    /* Live page padding */
    .live-container {
        padding: 0 var(--mobile-padding);
    }
}

/* =============================================================
   SECTION 16: VERY SMALL SCREENS (< 360px)
   ============================================================= */
@media (max-width: 360px) {
    .tab-label {
        font-size: 0.55rem;
    }

    .tab-icon {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }

    .gallery-item.gallery-wide {
        grid-column: span 1;
    }
}

/* =============================================================
   SECTION 17: LANDSCAPE MOBILE
   ============================================================= */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
    }

    .mobile-tab-bar {
        height: calc(48px + var(--safe-area-bottom));
    }

    .tab-icon {
        font-size: 1.1rem;
    }

    .tab-label {
        display: none;
    }

    body {
        padding-bottom: calc(48px + var(--safe-area-bottom));
    }
}

/* =============================================================
   SECTION 18: AIRBNB LOGO — MOBILE FIX
   ============================================================= */
@media (max-width: 768px) {
    .airbnb-logo-img {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
}

/* =============================================================
   SECTION 19: PRINT — HIDE MOBILE UI
   ============================================================= */
@media print {

    .mobile-tab-bar,
    .drawer-backdrop {
        display: none;
    }
}

/* =============================================================
   SECTION 19: GAME DETAIL MODAL — MOBILE
   ============================================================= */
@media (max-width: 768px) {
    .game-detail-panel {
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        max-height: calc(95vh - var(--safe-area-bottom));
        padding-bottom: calc(var(--bottom-bar-height) + var(--safe-area-bottom) + 16px);
    }

    .gd-hero-img {
        height: 200px;
        object-fit: cover;
    }

    .gd-content {
        padding: 16px var(--mobile-padding);
    }

    .gd-title {
        font-size: 1.2rem;
    }

    .gd-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .gd-stat {
        padding: 10px;
    }

    .gd-section-title {
        font-size: 0.95rem;
    }

    .gd-story {
        font-size: 0.88rem;
    }

    .gd-features li {
        font-size: 0.85rem;
    }

    .gd-book-btn {
        min-height: 52px;
        font-size: 0.9rem;
    }

    .gd-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* =============================================================
   SECTION 20: MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================================= */
@media (max-width: 768px) {

    /* Reduce star particles on mobile for performance */
    .star:nth-child(n+12) {
        display: none;
    }

    /* Reduce sparkle particles on mobile */
    .sparkle:nth-child(n+4) {
        display: none;
    }

    /* Optimize will-change for frequently animated elements */
    .mobile-tab-bar,
    .navbar {
        will-change: auto;
        contain: layout style;
    }

    /* Reduce box-shadow complexity on cards for perf */
    .event-card,
    .stat-card,
    .media-card,
    .testimonial-card {
        contain: content;
    }

    /* Prevent layout thrashing on scroll */
    .hero,
    .events,
    .teaser,
    .stats-section,
    .testimonials-section,
    .gallery-section,
    .media-section {
        contain: layout style;
    }

    /* Reduce firefly animation complexity */
    .firefly:nth-child(n+4) {
        display: none;
    }
}

/* =============================================================
   SECTION 21: REDUCED MOTION SUPPORT
   ============================================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }

    .hero.visible .island-img,
    .hero.visible .icon-compass,
    .hero.visible .icon-magnifier,
    .hero.visible .icon-hourglass,
    .hero.visible .icon-coin,
    .hero.visible .icon-key,
    .hero.visible .icon-chest {
        animation: none;
    }

    .star,
    .sparkle,
    .css-cloud,
    .firefly {
        display: none;
    }

    .gallery-track {
        transition: none;
    }
}