/* Typography font imports */
@import url('https://fonts.googleapis.com/css2?family=Anton+SC&display=swap');

.custom-map-music-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    height: 44px;
    min-width: 44px;
    /* Fix vertical alignment for all themes */
    position: relative;
    top: 0;
}

.music-toggle-btn {
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: var(--border-radius-pill);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-secondary);
    padding: 0;
    /* Fix icon vertical alignment */
    vertical-align: middle;
}

.music-toggle-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: var(--glow-hover);
    transform: scale(1.05);
}

.music-toggle-btn:active {
    filter: brightness(1.2);
}

.custom-map-music-icon .theme-icon {
    color: var(--text-primary);
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hide text content in tour cards but keep buttons visible */
.hide-text-only strong,
.hide-text-only .sponsor,
.hide-text-only .line-info,
.hide-text-only .content>div:not(.line-card-details) {
    opacity: 0;
    visibility: hidden;
}

:root {
    --primary-bg: #0e1011;
    --secondary-bg: #333;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --primary-color: #ff0000;
    --accent1: #444;
    --star-color: #ffc107;
    --popup-bg: #333;

    /* Card depth layers */
    --card-layer-1: #1a1a1a;
    --card-layer-2: #2a2a2a;
    --card-layer-3: #333333;
    --border-standard: rgba(255, 255, 255, 0.12);

    /* Standardized spacing */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-pill: 50%;

    /* Red glow effects */
    --glow-primary: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
    --glow-secondary: 0 0 10px rgba(255, 0, 0, 0.3);
    --glow-hover: 0 0 7.5px var(--primary-color), 0 0 15px rgba(255, 0, 0, 0.4) inset;
    --glow-strong: 0 0 20px rgba(255, 0, 0, 0.4);

    /* Gradients */
    --gradient-red-light: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(139, 0, 0, 0.1) 100%);
    --gradient-red-medium: linear-gradient(135deg, rgba(255, 0, 0, 0.2) 0%, rgba(139, 0, 0, 0.2) 100%);

    /* Map header stack */
    --oab-map-header-top: calc(env(safe-area-inset-top, 0px) + 35px);
    --oab-map-chip-gap: 53px;
    --oab-map-chip-top: calc(var(--oab-map-header-top) + var(--oab-map-chip-gap));
    --oab-map-floating-tutorial-top: calc(var(--oab-map-chip-top) + 55px);
    --oab-map-floating-qr-top: calc(var(--oab-map-floating-tutorial-top) + 56px);
    --oab-map-floating-location-top: calc(var(--oab-map-floating-qr-top) + 58px);
    --oab-map-floating-refresh-top: calc(var(--oab-map-floating-location-top) + 58px);
}

html.native-app-shell {
    --oab-map-header-top: 35px;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100vw;
    height: 100vh;
    /* iOS Safari: fill-available makes the page extend behind the translucent status bar
       so the map is seamless edge-to-edge like Android */
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

/* Typography Guidelines */
/* Inter: Primary UI font for body, navigation, buttons, cards, metadata */
/* Anton SC: Headings and section titles (weight 400 only) */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Anton SC', sans-serif !important;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Map Container */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* iOS: extend map canvas behind the status bar */
    height: -webkit-fill-available;
    z-index: 1;
    background: #000000;
}

/* ===== LIGHT MODE ===== */

/* Map: no filter needed — Mapbox switches to streets-v12 in light mode */
body.light-mode #map {
    filter: none;
}

/* Root variable overrides */
body.light-mode {
    --primary-bg: #ffffff;
    --secondary-bg: #f0f0f0;
    --text-primary: #111111;
    --text-secondary: #555555;
    --card-layer-1: #f0f0f0;
    --card-layer-2: #e8e8e8;
    --card-layer-3: #dddddd;
    --border-standard: rgba(0, 0, 0, 0.12);
    --popup-bg: #f0f0f0;
    --accent1: #d0d0d0;
    --glow-primary: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.15) inset;
    --glow-secondary: 0 0 10px rgba(255, 0, 0, 0.15);
    --glow-hover: 0 0 7.5px var(--primary-color), 0 0 15px rgba(255, 0, 0, 0.2) inset;
    --gradient-red-light: linear-gradient(135deg, rgba(255, 0, 0, 0.08) 0%, rgba(139, 0, 0, 0.08) 100%);
    --gradient-red-medium: linear-gradient(135deg, rgba(255, 0, 0, 0.15) 0%, rgba(139, 0, 0, 0.15) 100%);
}

/* Top bar stays dark for legibility over the map */
body.light-mode .top-bar {
    background-color: rgba(14, 16, 17, 0.85);
}

/* Search bar becomes white in light mode */
body.light-mode #search-input {
    background-color: #ffffff;
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.18);
}

body.light-mode #search-input::placeholder {
    color: rgba(17, 17, 17, 0.45);
}

body.light-mode #search-mic-btn,
body.light-mode #search-mic-btn i {
    color: #111111;
}

body.light-mode #search-input:focus,
body.light-mode #search-input:hover {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    border: none;
}

/* Chips */
body.light-mode .chip {
    background-color: #ffffff;
    color: #111111;
    border-color: rgba(255, 0, 0, 0.25);
}

body.light-mode .chip:hover {
    background-color: #f0f0f0;
}

body.light-mode .chip.active {
    background-color: #ffffff;
    border-color: rgba(255, 0, 0, 0.4);
}

/* Line cards */
body.light-mode .line-card {
    color: #111111;
}

body.light-mode .line-card strong {
    color: #111111;
}

/* Card mode buttons */
body.light-mode .card-mode-btn {
    border-color: #ccc;
}

body.light-mode .mode-option {
    color: #333;
}

body.light-mode .mode-option.active {
    background: #d0d0d0;
    color: #111111;
}

body.light-mode .mode-option:not(.active) {
    color: #666;
}

/* Side panel */
body.light-mode .side-panel {
    background: rgba(255, 255, 255, 0.98);
}

body.light-mode .side-panel h3 {
    color: #111111;
}

body.light-mode .side-panel a {
    color: #333333;
}

body.light-mode .side-panel a:hover {
    color: #000000;
}

/* Popup content */
body.light-mode .mapboxgl-popup-content {
    background-color: rgba(255, 255, 255, 0.95);
    color: #111111;
}

/* Floating audio button stays dark */
body.light-mode .floating-audio-btn {
    background: #1a1a1a;
    color: var(--primary-color);
    border-color: rgba(255, 0, 0, 0.3);
}

/* Headings in light mode */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: #111111;
}

/* Icons: switch to dark */
body.light-mode .theme-icon {
    color: #111111;
}

body.light-mode .chip i {
    color: #111111;
}

/* Mode divider */
body.light-mode .mode-divider {
    color: #999;
}

.custom-marker-dot {
    width: 11px;
    height: 11px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    border: 1px solid #fff;
}

.custom-marker-balloon {
    width: 64px;
    height: 64px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    z-index: 10;
    border: none;
}

/* Chip Container (Horizontal Scroll) */
.chip-container {
    position: fixed;
    top: var(--oab-map-chip-top);
    left: 0;
    right: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    z-index: 15;
    gap: 8px;
    scrollbar-width: none;
    white-space: nowrap;
}

.chip-container::-webkit-scrollbar {
    display: none;
}

.chip-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.chip-container::-webkit-scrollbar-button {
    display: none;
}

/* Theme Toggle Styles */

/* Inline theme toggle for card-mode-toggle */
.theme-toggle-inline {
    display: flex;
    align-items: center;
    margin-left: 12px;
}

/* Remove fixed positioning for inline version */
.theme-toggle-inline .theme-toggle-btn {
    position: static;
    margin: 0;
}

.theme-toggle-btn {
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: var(--border-radius-pill);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-secondary);
}

.theme-toggle-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: var(--glow-hover);
    transform: scale(1.05);
}

.theme-icon {
    color: var(--text-primary);
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Light mode - theme toggle button */
body.light-mode .theme-toggle-btn {
    background: #ffffff;
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .theme-toggle-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chip {
    background-color: #1e1e1e;
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(255, 0, 0, 0.3);
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    transition: background-color 0.3s;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    flex-shrink: 0;
    min-width: fit-content;
}

.chip:hover {
    background-color: #444;
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    /* Soft red glow like live location */
}

.chip.active {
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    /* Soft red glow like live location normal state */
}

/* Your Existing Styles (Merged, Non-Conflicting) */

.mapboxgl-popup-content {
    background-color: rgba(30, 30, 30, 0.9);
    color: #fff;
    padding: 8px 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-size: 0.85em;
    max-width: 140px;
    text-align: center;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: rgba(30, 30, 30, 0.9);
}
.qr-share-tagline {
    margin-top: 10px;
    color: #ccc;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: none;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-style: italic;
    text-align: center;
}

.qr-red-period {
    color: #ff0000;
    font-style: italic;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: rgba(30, 30, 30, 0.9);
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: rgba(30, 30, 30, 0.9);
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: rgba(30, 30, 30, 0.9);
}

.marker,
.connection-marker {
    background-color: #007cbf;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    cursor: pointer;
    pointer-events: auto;
}

.connection-marker {
    background-color: #ff4d4d;
}

.active-marker {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border: none;
}

.top-bar {
    position: fixed;
    top: var(--oab-map-header-top);
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px;
    border-radius: 8px;
    z-index: 20;
    gap: 8px;
}

#app-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    margin: -4px 0;
    /* Reduced padding around logo */
}

#search-input {
    flex-grow: 1;
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    font-size: 0.9em;
    height: 32px;
    box-sizing: border-box;
    margin-right: 0;
}



#collections-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    /* Soft red glow like live location */
}

#search-input:focus,
#search-input:hover {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    /* Soft red glow like live location */
    border: none;
    transition: box-shadow 0.3s ease;
}

.toggle-switch {
    display: flex;
    align-items: center;
    background-color: #555;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8em;
    color: #ccc;
    cursor: pointer;
    gap: 5px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.toggle-switch.active {
    background-color: #555;
    box-shadow: var(--glow-primary);
}

#collections-toggle {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin: -3px 0;
    position: relative;
    overflow: hidden;
    font-size: 1em;
}
#collections-toggle::before {
    content: '';
    position: absolute;
    width: 45%;
    height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
    transform: rotate(-45deg);
    pointer-events: none;
    bottom: -75%;
    left: -75%;
    animation: floatingPlayShine 2s ease-in-out infinite;
    animation-delay: var(--sheen-sync, 0ms);
}

.metro-lines {
    position: fixed;
    bottom: 140px;
    /* Moved up 13px more (127 + 13) to accommodate 20% larger toggle button and flash ad */
    left: 0;
    width: 100vw;
    height: 200px;
    /* Reduced height to prevent going behind nav bar */
    background-color: transparent;
    /* Clean background */
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
    z-index: 10;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    display: flex;
    /* Enable Flexbox */
    align-items: center;
    /* Center vertically */
}

/* Mobile responsiveness for metro cards */
@media (max-width: 768px) {
    .metro-lines {
        bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        /* Reverted to original */
        height: 220px;
        /* Back to original height */
    }
}

@media (max-width: 480px) {
    .metro-lines {
        bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        /* Reverted to original */
        height: 200px;
        /* Back to original height */
        padding: 8px 0;
        /* Back to original padding */
    }
}

/* Ensure tourist-lines is completely hidden when display:none - prevent ghost overlap */
#tourist-lines[style*="display: none"],
#tourist-lines[style*="display:none"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#metro-lines[style*="display: none"],
#metro-lines[style*="display:none"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.metro-lines::-webkit-scrollbar {
    height: 0;
}

.metro-lines::-webkit-scrollbar-thumb {
    background: transparent;
}

.metro-lines::-webkit-scrollbar-button {
    display: none;
}

/* Metro-Tour Cards Toggle Button */
.cards-toggle-btn {
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    /* Moved down from 70px to reduce space below */
    left: 10px;
    /* Align with metro card edge padding */
    background: rgba(30, 30, 30, 0.9);
    /* Match live location button background */
    color: #999;
    /* Match live location button text color */
    border: 1px solid rgba(255, 0, 0, 0.2);
    /* Match live location button border */
    border-radius: 8px 8px 0 0;
    /* Rounded top corners */
    padding: 7px 12px;
    /* Increased from 6px for 20% deeper button */
    font-size: 16px;
    /* Slightly smaller font */
    cursor: pointer;
    z-index: 1500;
    /* Base level; overlays (AI chat / QR / AR) should use > 5000 */
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    /* Match live location button shadow */
}

.cards-toggle-btn:hover {
    color: #fff;
    /* Match live location button hover color */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    /* Match live location button hover shadow */
}

/* Card Mode Toggle Styles */
.card-mode-toggle {
    position: fixed;
    bottom: 160px;
    left: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
    padding: 10px;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    /* Leave a small gap above the arrow tab */
}

.card-mode-btn {
    background-color: transparent;
    /* Clean background */
    border: 1px solid #555;
    border-radius: 25px;
    padding: 8px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-mode-btn:hover {
    box-shadow: var(--glow-primary);
    border: 1px solid #777;
}

.mode-option {
    padding: 4px 8px;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #fff;
}

.mode-option.active {
    background: #555;
    color: white;
}

.mode-option:not(.active) {
    color: #ccc;
}

.mode-option:not(.active):hover {
    background: rgba(85, 85, 85, 0.3);
    color: #fff;
}

.mode-divider {
    color: #ccc;
    font-weight: bold;
    pointer-events: none;
}

.line-card {
    display: inline-block;
    width: 160px;
    max-width: 96vw;
    height: 140px;
    margin: 0 8px;
    border-radius: var(--border-radius-md);
    color: white;
    position: relative;
    overflow: visible;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    box-sizing: border-box;
    animation: gentlePulse 4s ease-in-out infinite;
    flex-shrink: 0;
    /* Prevent cards from shrinking */
    min-width: 160px;
    /* Force minimum width */
}

/* Removed shimmer animation ::before element */
.line-card:nth-child(1)::before {
    animation-delay: 0s;
}

.line-card:nth-child(2)::before {
    animation-delay: 1.5s;
}

.line-card:nth-child(3)::before {
    animation-delay: 3s;
}

.line-card:nth-child(4)::before {
    animation-delay: 4.5s;
}

.line-card:nth-child(5)::before {
    animation-delay: 6s;
}

.line-card:nth-child(6)::before {
    animation-delay: 7.5s;
}

.line-card:nth-child(7)::before {
    animation-delay: 9s;
}

.line-card:nth-child(8)::before {
    animation-delay: 10.5s;
}

.line-card:hover {
    transform: translateY(-2px) scale(1.02);
    opacity: 0.95;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.3),
        inset 0 5px 20px rgba(255, 255, 255, 0.15),
        inset 0 -5px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: none;
}

.line-card:hover::before {
    animation: shimmerHover 1.5s ease-in-out infinite;
}

@keyframes gentlePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
    }
}

@keyframes shimmerWave {
    0% {
        left: -200%;
    }

    100% {
        left: 200%;
    }
}

@keyframes shimmerHover {
    0% {
        left: -200%;
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        left: 200%;
        opacity: 0.8;
    }
}

.line-card.expanded {
    position: fixed;
    bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    /* Moved down from 50px to reduce space below */
    left: 0px;
    width: 100vw;
    height: auto;
    min-height: 400px;
    max-height: 60vh;
    z-index: 2147483647;
    /* Background will be applied via JavaScript for radial effect */
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.4),
        inset 0 5px 25px rgba(255, 255, 255, 0.2),
        inset 0 -5px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    cursor: default;
    padding: 15px;
    overflow: hidden;
    border-radius: 0;
    /* Remove inherited border-radius so overflow:hidden doesn't clip play button */
    /* Opacity will be controlled via JavaScript */
}

/* Hide the toggle when any card is expanded */
.line-card.expanded~* .card-mode-toggle,
body:has(.line-card.expanded) .card-mode-toggle {
    display: none !important;
}

.line-card .content {
    text-align: center;
    padding-top: 0px;
    /* Remove the 35px padding that's pushing content down */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically within card */
}

.line-card.expanded .content {
    padding-top: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    overflow: hidden;
    /* Clip text to prevent showing behind flash ad */
}

.line-card strong {
    display: block;
    font-family: 'Anton SC', sans-serif !important;
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Metro card details - headings and station names */
.line-card-details h5 {
    font-family: 'Anton SC', sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 12px !important;
}

.line-card-details li {
    font-family: 'Inter', sans-serif !important;
}

.line-card-details li > div:first-child {
    font-family: 'Anton SC', sans-serif !important;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2px;
    margin-bottom: 6px;
}

/* Station/POI overview descriptions */
.line-card-details li > div:not(:first-child) {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px;
    line-height: 1.5;
    color: #e0e0e0;
}

.line-card.expanded strong {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.6em;
    flex-shrink: 0;
}

.line-card .sponsor {
    font-size: 0.8em;
    opacity: 0.7;
    display: block;
    margin-bottom: 8px;
}

.line-card.expanded .sponsor {
    text-align: center;
    flex-shrink: 0;
}

.line-card .line-info {
    font-size: 0.85em;
    opacity: 0.9;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-card.expanded .line-info {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 10px;
    text-align: center;
    word-break: break-word;
    flex-shrink: 0;
    overflow-wrap: break-word;
}

/* Ensure metro line-info is visually hidden when card is collapsed
   Tour cards will continue to show their info when collapsed as before. */
.line-card.hide-stops-when-collapsed:not(.expanded) .line-info {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin-top: 0 !important;
    opacity: 0 !important;
}

.line-card .play-button,
.line-card .toggle-button {
    position: absolute;
    top: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(80%);
    opacity: 0.8;
    transition: filter 0.2s, opacity 0.2s;
}

.line-card .play-button {
    left: 8px;
    overflow: hidden;
}

.line-card .toggle-button {
    right: 8px;
}

.line-card.whiteline .play-button,
.line-card.whiteline .toggle-button {
    color: #fff;
}

.line-card .play-button i,
.line-card .toggle-button i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 16px;
}

.line-card .play-button:hover,
.line-card .toggle-button:hover {
    background: rgba(0, 0, 0, 0.7);
    filter: grayscale(0%);
    opacity: 1;
}

/* Red glow effect when audio is playing */
.line-card .play-button.playing {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.4);
    filter: grayscale(0%);
    opacity: 1;
}

/* ── Mexican wave sheen on card play buttons ── */
.line-card .play-button::before {
    content: '';
    position: absolute;
    width: 45%;
    height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
    transform: rotate(-45deg);
    pointer-events: none;
    bottom: -75%;
    left: -75%;
    animation: floatingPlayShine 2s ease-in-out infinite;
}
/* Stop sheen when playing or loading */
.line-card .play-button.playing::before {
    animation: none;
    opacity: 0;
}

.line-card .toggle-button[style*="opacity: 0.5"] {
    filter: grayscale(100%);
    opacity: 0.4;
    cursor: default;
}

.line-card.expanded::before {
    animation: shimmerWave 1.5s ease-out;
    left: -200%;
}

.line-card.expanded .line-card-details {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    width: 100%;
    max-width: 100vw;
}

.line-card.expanded .line-card-details h5 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: rgba(30, 30, 30, 0.8);
}

.line-card-details ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-height: calc(40vh - 150px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 5px;
    text-align: left;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.line-card-details li {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    line-height: 1.6;
}

.line-card.expanded .line-card-details ul::-webkit-scrollbar {
    width: 5px;
}

.line-card.expanded .line-card-details ul::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.line-card.expanded .line-card-details ul::-webkit-scrollbar-button {
    display: none;
}
























/* Collections Panel */
#collectionsPanel {
    position: fixed;
    top: 0;
    left: -100vw;
    width: 344px;
    max-width: 88vw;
    height: 100vh;
    /* Radial gray gradient background */
    background: radial-gradient(ellipse at top, rgba(60, 60, 60, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 48px 22px 24px 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(255, 0, 0, 0.3), 2px 0 15px rgba(0, 0, 0, 0.5);
    border-right: 2px solid rgba(255, 0, 0, 0.5);
}

#collectionsPanel.active {
    left: 0;
    box-shadow: 5px 0 25px rgba(255, 0, 0, 0.4), 2px 0 15px rgba(0, 0, 0, 0.6);
}

#collectionsPanel h3 {
    margin: 0 0 20px 0;
    padding-top: 40px;
    text-align: center;
    color: #fff;
    font-size: 1.38em;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* ── Tagline letter-cascade animation ── */
.tagline-container {
    position: relative;
    overflow: visible;
    height: 1.6em;
    line-height: 1.6em;
    padding: 0 2px;
}
.tagline-text {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    font-size: 1.15em;
    font-style: normal;
    letter-spacing: 0.04em;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    color: #fff;
}
.tagline-dot {
    color: #ffffff;
    font-weight: bold;
    vertical-align: middle;
    font-size: 1.1em;
    display: inline-block;
    opacity: 0;
    transition: none;
}
.tagline-dot.visible {
    animation: dotStamp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.tagline-dot.exiting {
    animation: dotFall 0.3s ease-in forwards;
}
.tagline-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-1.2em) scale(0.7);
    filter: blur(3px);
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
    will-change: transform, opacity, filter;
}
.tagline-letter.space {
    width: 0.25em;
}
@keyframes letterDrop {
    0%   { opacity: 0; transform: translateY(-1.2em) scale(0.7) rotate(-8deg); filter: blur(3px); text-shadow: 0 0 8px rgba(255,255,255,0.3); }
    50%  { opacity: 1; transform: translateY(0.08em) scale(1.05) rotate(1deg); filter: blur(0); }
    70%  { transform: translateY(-0.04em) scale(0.98) rotate(-0.5deg); }
    85%  { transform: translateY(0.015em) scale(1.01) rotate(0deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); text-shadow: 0 0 12px rgba(255,255,255,0.15); }
}
@keyframes letterGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(255,255,255,0.1); }
    50%       { text-shadow: 0 0 14px rgba(255,255,255,0.3), 0 0 30px rgba(255,200,200,0.08); }
}
@keyframes shimmerSweep {
    0%   { text-shadow: 0 0 6px rgba(255,255,255,0.1); color: #fff; }
    50%  { text-shadow: 0 0 18px rgba(255,255,255,0.5), 0 0 35px rgba(255,220,220,0.15); color: #fff; }
    100% { text-shadow: 0 0 6px rgba(255,255,255,0.1); color: #fff; }
}
@keyframes letterScatter {
    0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); }
    100% { opacity: 0; transform: translateY(var(--scatter-y, 1.5em)) translateX(var(--scatter-x, 0px)) scale(0.5) rotate(var(--scatter-r, 15deg)); filter: blur(4px); }
}
@keyframes dotStamp {
    0%   { opacity: 0; transform: scale(2.5) translateY(-0.3em); text-shadow: 0 0 20px rgba(255,255,255,0.9); }
    60%  { opacity: 1; transform: scale(0.9); text-shadow: 0 0 12px rgba(255,255,255,0.6); }
    80%  { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); text-shadow: 0 0 10px rgba(220,220,220,0.4); }
}
@keyframes dotFall {
    0%   { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.4) translateY(1.5em); }
}
.tagline-letter.dropping  { animation: letterDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.tagline-letter.landed    { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: blur(0); animation: letterGlow 3s ease-in-out infinite; }
.tagline-letter.swept     { animation: shimmerSweep 0.6s ease-in-out forwards; }
.tagline-letter.scattering { animation: letterScatter 0.45s ease-in forwards; }

#collectionsList {
    list-style: none;
    padding: 0;
    margin: 28px 0 0 0;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 24px;
    scroll-padding-bottom: 24px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#collectionsList::-webkit-scrollbar {
    display: none;
}

#collectionsList .menu-item {
    margin: 5px 0;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#collectionsList .menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

#collectionsList .menu-item:hover::before {
    background: var(--accent-color);
}

#collectionsList .menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 17px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#collectionsList .menu-item a::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

#collectionsList .menu-item:hover a::before {
    left: 100%;
}

#collectionsList .menu-item a i {
    width: 26px;
    text-align: center;
    font-size: 21px;
    transition: transform 0.3s ease;
}

#collectionsList .menu-item:hover a i {
    transform: scale(1.1);
}

/* ===== Explore Accordion ===== */
.explore-accordion {
    margin: 8px auto !important;
    width: calc(100% - 14px);
    box-sizing: border-box;
    border-radius: 14px !important;
    overflow: visible !important;
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.08), rgba(183, 28, 28, 0.04));
    border: 1px solid rgba(229, 57, 53, 0.3);
    transition: all 0.3s ease;
}

.explore-accordion:hover {
    border-color: rgba(229, 57, 53, 0.55);
    box-shadow: 0 2px 12px rgba(229, 57, 53, 0.2);
}

.explore-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: #ef9a9a !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 52px;
}

.explore-toggle:hover {
    color: #ffcdd2 !important;
    background: rgba(229, 57, 53, 0.12);
    border-radius: 14px;
}

.explore-toggle i:first-child {
    width: 26px;
    text-align: center;
    font-size: 21px;
    color: #e53935;
    transition: transform 0.3s ease;
}

.explore-toggle:hover i:first-child {
    transform: scale(1.15) rotate(15deg);
}

.explore-chevron {
    margin-left: auto;
    font-size: 12px;
    color: rgba(229, 57, 53, 0.7);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto !important;
}

.explore-accordion.open .explore-chevron {
    transform: rotate(180deg);
}

.explore-submenu {
    list-style: none;
    padding: 0 4px 0 4px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s ease,
                opacity 0.3s ease;
    opacity: 0;
}

.explore-accordion.open .explore-submenu {
    max-height: 500px;
    padding: 2px 4px 10px 4px;
    opacity: 1;
}

.explore-submenu .menu-item {
    margin: 3px 0 !important;
    border-radius: 10px !important;
}

.explore-submenu .menu-item a {
    gap: 14px !important;
    min-height: 44px;
    padding: 9px 13px 9px 20px !important;
    font-size: 15px !important;
    color: #b0bec5 !important;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
}

.explore-submenu .menu-item a:hover {
    border-left-color: #e53935;
}

.explore-submenu .menu-item a i {
    width: 21px;
    font-size: 17px !important;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.explore-submenu .menu-item:hover a i {
    opacity: 1;
}

/* Subtle stagger animation on open */
.explore-accordion.open .explore-submenu .menu-item {
    animation: exploreSlideIn 0.3s ease forwards;
}

.explore-accordion.open .explore-submenu .menu-item:nth-child(1) { animation-delay: 0.03s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(2) { animation-delay: 0.06s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(3) { animation-delay: 0.09s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(4) { animation-delay: 0.12s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(5) { animation-delay: 0.15s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(6) { animation-delay: 0.18s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(7) { animation-delay: 0.21s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(8) { animation-delay: 0.24s; }
.explore-accordion.open .explore-submenu .menu-item:nth-child(9) { animation-delay: 0.27s; }

@keyframes exploreSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Settings Accordion (mirrors Explore accordion) */
.settings-accordion {
    margin: 8px auto !important;
    width: calc(100% - 14px);
    box-sizing: border-box;
    border-radius: 14px !important;
    overflow: visible !important;
    background: linear-gradient(135deg, rgba(100, 100, 120, 0.08), rgba(60, 60, 80, 0.04));
    border: 1px solid rgba(150, 150, 170, 0.3);
    transition: all 0.3s ease;
}
.settings-accordion:hover {
    border-color: rgba(150, 150, 170, 0.55);
    box-shadow: 0 2px 12px rgba(150, 150, 170, 0.2);
}
.settings-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: #b0bec5 !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 52px;
}
.settings-toggle:hover {
    color: #cfd8dc !important;
    background: rgba(150, 150, 170, 0.12);
    border-radius: 14px;
}
.settings-toggle i:first-child {
    width: 26px;
    text-align: center;
    font-size: 21px;
    color: #90a4ae;
    transition: transform 0.3s ease;
}
.settings-toggle:hover i:first-child {
    transform: scale(1.15) rotate(15deg);
}
.settings-chevron {
    margin-left: auto;
    font-size: 12px;
    color: rgba(150, 150, 170, 0.7);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto !important;
}
.settings-accordion.open .settings-chevron {
    transform: rotate(180deg);
}
.settings-submenu {
    list-style: none;
    padding: 0 4px 0 4px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s ease,
                opacity 0.3s ease;
    opacity: 0;
}
.settings-accordion.open .settings-submenu {
    max-height: 400px;
    padding: 2px 4px 10px 4px;
    opacity: 1;
}
.settings-submenu .menu-item {
    margin: 3px 0 !important;
    border-radius: 10px !important;
}
.settings-submenu .menu-item a {
    gap: 14px !important;
    min-height: 44px;
    padding: 9px 13px 9px 20px !important;
    font-size: 15px !important;
    color: #b0bec5 !important;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
}
.settings-submenu .menu-item a i {
    width: 21px;
    font-size: 17px !important;
}
.settings-submenu .menu-item a:hover {
    border-left-color: #90a4ae;
}
.settings-lang-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.settings-lang-row a {
    flex: 0 0 auto;
}

/* Right-handed mode: flip top bar and panel */
.top-bar.right-handed {
    flex-direction: row-reverse;
}
#collectionsPanel.right-handed {
    left: auto;
    right: -100vw;
    border-right: none;
    border-left: 2px solid rgba(255, 0, 0, 0.5);
    box-shadow: -5px 0 25px rgba(255, 0, 0, 0.3), -2px 0 15px rgba(0, 0, 0, 0.5);
}
#collectionsPanel.right-handed.active {
    right: 0;
    box-shadow: -5px 0 25px rgba(255, 0, 0, 0.4), -2px 0 15px rgba(0, 0, 0, 0.6);
}

/* Right-handed chip text direction fix */
body.right-handed-layout .chip-container .chip {
    direction: ltr;
}

/* Category-based hover effects */
.audio-category:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05));
}

.audio-category:hover::before {
    background: #ffc107;
}

.audio-category:hover a {
    color: #ffc107;
}

.food-category:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
}

.food-category:hover::before {
    background: #4caf50;
}

.food-category:hover a {
    color: #4caf50;
}

.stay-category:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.05));
}

.stay-category:hover::before {
    background: #2196f3;
}

.stay-category:hover a {
    color: #2196f3;
}

.explore-category:hover {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.15), rgba(156, 39, 176, 0.05));
}

.explore-category:hover::before {
    background: #9c27b0;
}

.explore-category:hover a {
    color: #9c27b0;
}

.user-category:hover {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.15), rgba(255, 87, 34, 0.05));
}

.user-category:hover::before {
    background: #ff5722;
}

.user-category:hover a {
    color: #ff5722;
}

.auth-category:hover {
    background: linear-gradient(135deg, rgba(103, 58, 183, 0.15), rgba(103, 58, 183, 0.05));
}

.auth-category:hover::before {
    background: #673ab7;
}

.auth-category:hover a {
    color: #673ab7;
}

.checkout-category:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.05));
}

.checkout-category:hover::before {
    background: #ff0000;
}

.checkout-category:hover a {
    color: #ff0000;
}

.special-item {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 50, 50, 0.05));
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.special-item:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 50, 50, 0.1));
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transform: translateX(-3px);
}

.special-item a {
    font-weight: 600;
    color: white !important;
    /* Make text white while keeping red box */
}

.special-item:hover a i {
    color: #ff6b6b !important;
    transform: scale(1.2) rotate(10deg);
}

/* Breathing animation for menu items */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

.breathing-animation {
    animation: breathe 4s ease-in-out infinite;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .breathing-animation {
        animation: none !important;
    }
}

/* Ensure panel maintains fixed positioning while allowing transform */
#collectionsPanel {
    will-change: transform;
    transform-origin: center;
}

/* Mobile optimizations for collections panel */
@media (max-width: 768px) {
    #collectionsList {
        padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    }

    #collectionsPanel {
        width: 320px;
        max-width: 90vw;
        padding: 30px 18px 18px 18px;
        backdrop-filter: blur(8px);
    }

    #collectionsPanel h3 {
        font-size: 1.18em;
        margin-bottom: 22px;
    }

    #collectionsList .menu-item a {
        padding: 11px 13px;
        font-size: 15px;
        gap: 14px;
    }

    #collectionsList .menu-item a i {
        width: 22px;
        font-size: 18px;
    }

    #collectionsList > .menu-item > a,
    .explore-toggle,
    .settings-toggle {
        min-height: 50px;
        padding: 11px 14px;
        font-size: 15.5px;
        gap: 15px;
    }

    #collectionsList > .menu-item > a i,
    .explore-toggle i:first-child,
    .settings-toggle i:first-child {
        width: 24px;
        font-size: 20px;
    }

    .explore-submenu .menu-item a,
    .settings-submenu .menu-item a {
        min-height: 42px;
        padding: 8px 11px 8px 18px !important;
        font-size: 14.5px !important;
        gap: 12px !important;
    }

    .explore-submenu .menu-item a i,
    .settings-submenu .menu-item a i {
        width: 19px;
        font-size: 16px !important;
    }

    /* Reduce parallax effect on mobile for better performance */
    .breathing-animation {
        animation-duration: 6s;
    }
}

@media (max-width: 480px) {
    #collectionsList {
        padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    #collectionsPanel {
        width: 304px;
        max-width: 92vw;
        padding: 26px 16px 18px 16px;
    }

    #collectionsPanel h3 {
        font-size: 1.14em;
        margin-bottom: 20px;
    }

    #collectionsList .menu-item a {
        padding: 10px 11px;
        font-size: 14.5px;
        gap: 12px;
    }

    #collectionsList .menu-item a i {
        width: 20px;
        font-size: 17px;
    }

    #collectionsList > .menu-item > a,
    .explore-toggle,
    .settings-toggle {
        min-height: 48px;
        padding: 10px 13px;
        font-size: 15px;
        gap: 14px;
    }

    #collectionsList > .menu-item > a i,
    .explore-toggle i:first-child,
    .settings-toggle i:first-child {
        width: 23px;
        font-size: 19px;
    }

    .explore-submenu .menu-item a,
    .settings-submenu .menu-item a {
        min-height: 40px;
        padding: 8px 10px 8px 16px !important;
        font-size: 14px !important;
        gap: 11px !important;
    }

    .explore-submenu .menu-item a i,
    .settings-submenu .menu-item a i {
        width: 18px;
        font-size: 15px !important;
    }

    /* Keep breathing animation on small screens but reduce intensity/duration
       and keep transform origin left-aligned for better visual on narrow panels.
       We still respect prefers-reduced-motion above. */
    .breathing-animation {
        animation: breathe 5s ease-in-out infinite;
        transform-origin: left center;
        opacity: 0.95;
        /* slightly lower max opacity for subtlety */
    }
}

/* Overlay behind collections panel for frosted effect */
#collectionsOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 199;
    /* Below panel (200), above all other UI */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#collectionsOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.ios-device #collectionsOverlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Touch-friendly hover states for mobile */
@media (hover: none) and (pointer: coarse) {
    #collectionsList .menu-item:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.98);
    }

    #collectionsList .menu-item:active::before {
        background: var(--accent-color);
    }
}

#longPressModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 110;
    display: none;
    align-items: center;
    justify-content: center;
}

#longPressModal[style*="display: flex"] {
    display: flex;
}

.modal-content {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.2em;
}

.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
}

.modal-content textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.modal-buttons button {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: white;
}

#saveLongPressMarker {
    background-color: #4CAF50;
}

#saveLongPressMarker:hover {
    background-color: #45a049;
}

#cancelLongPressMarker {
    background-color: #888;
}

#cancelLongPressMarker:hover {
    background-color: #777;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(25, 25, 25, 0.98);
    transition: right 0.3s ease-in-out;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 60;
    overflow-y: auto;
    display: none;
}

.side-panel.active {
    right: 0;
    display: block;
}

.side-panel h3 {
    margin-top: 0;
    color: #eee;
}

.side-panel ul {
    list-style: none;
    padding: 0;
}

.side-panel li {
    margin: 10px 0;
}

.side-panel a {
    text-decoration: none;
    color: #ccc;
    font-size: inherit;
}

.side-panel a:hover {
    color: #fff;
}

body.affiliate-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

main {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background-color: var(--popup-bg);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

h1 .accent {
    color: #ffffff;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 400px;
    margin: 0 auto 24px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-bg);
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
    transition: box-shadow 0.3s ease;
}

input:focus {
    box-shadow: 0 0 7.5px var(--primary-color), 0 0 15px rgba(255, 0, 0, 0.4) inset;
    outline: none;
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    box-shadow: none;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--primary-color);
}

button[type="submit"] {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background-color: #cc0000;
    box-shadow: 0 0 7.5px #cc0000, 0 0 15px rgba(204, 0, 0, 0.4) inset;
    transform: scale(1.05);
}

.btn-primary:hover,
.play-btn:hover {
    background-color: #cc0000;
}

.perks {
    background-color: var(--popup-bg);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
}

.perks h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 16px;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px;
}

.perk-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.footer button {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 0, 0, 0.3) inset;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.footer button:hover {
    box-shadow: 0 0 7.5px var(--primary-color), 0 0 15px rgba(255, 0, 0, 0.4) inset;
    transform: scale(1.05);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Page Overlay Styles for Category Pages */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-overlay.active {
    opacity: 1;
}

.page-container {
    max-width: 360px;
    margin: 0 auto;
    background: var(--primary-bg);
    min-height: 100vh;
    padding: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--accent1);
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    background: var(--primary-bg);
    z-index: 10;
}

.page-close {
    background: var(--primary-bg);
    border: 1px solid rgba(255, 0, 0, 0.4);
    box-shadow: inset 0 0 6px rgba(255, 0, 0, 0.1);
    color: #999;
    /* Grey color for the X icon */
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.page-close:hover {
    box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.15), 0 0 6px rgba(255, 0, 0, 0.1);
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Ensure category popup works within page overlay */
.page-overlay .miscellaneous-popup {
    z-index: 2100;
}

.page-overlay .miscellaneous-popup.active {
    display: block;
    transform: translateX(-50%) translateY(0);
}

/* Mobile responsiveness for page overlay */
@media (max-width: 768px) {
    .page-container {
        padding: 12px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .page-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* Mobile search bar expansion */
    .top-bar.search-focused #metro-toggle,
    .top-bar.search-focused #tourmap-toggle {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .top-bar #metro-toggle,
    .top-bar #tourmap-toggle {
        transition: all 0.3s ease;
    }

    .top-bar.search-focused #search-input {
        flex-grow: 1.5;
        /* Reduced from 2 to prevent covering language dropdown */
        box-shadow: var(--glow-primary);
        transform: scale(1.02);
        z-index: 1000;
        transition: all 0.3s ease;
        margin-left: 10px;
        /* Add margin to prevent covering logo */
    }

    /* Mobile top bar layout adjustments */
    .top-bar {
        padding: 6px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow: visible;
    }

    /* Flash ad banner position adjustment on mobile */
    .line-card.expanded {
        bottom: calc(36px + env(safe-area-inset-bottom, 0px));
    }

    #app-logo {
        height: 48px;
        width: auto;
        flex-shrink: 0;
        object-fit: contain;
    }

    #search-input {
        flex-grow: 1;
        min-width: 0;
        height: 32px;
        font-size: 14px;
        padding: 6px 10px;
    }

    #collections-toggle {
        width: 38px;
        height: 38px;
        font-size: 16px;
        flex-shrink: 0;
    }

    /* Disable hover effects on mobile */
}

/* Extra small screens */
@media (max-width: 360px) {
}

/* Small phone optimizations */
@media (max-width: 480px) {
    :root {
        --oab-map-header-top: 38px;
        --oab-map-chip-gap: 50px;
    }

    html.native-app-shell {
        --oab-map-header-top: 38px;
    }

    .top-bar {
        padding: 4px;
        gap: 4px;
        left: 5px;
        right: 5px;
    }

    #app-logo {
        height: 48px;
        width: auto;
        object-fit: contain;
    }

    #search-input {
        height: 30px;
        font-size: 13px;
        padding: 5px 8px;
    }

    #collections-toggle {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    #languageDropdown {
        font-size: 12px;
        padding: 2px 4px;
        height: 28px;
        min-width: 50px;
        flex-shrink: 0;
    }

    .chip-container {
        padding-left: 5px;
    }
}

/* Container styles for category pages (from containers.html) */
.page-overlay .container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-overlay h2 {
    font-weight: 700;
    font-size: 20px;
    margin: 8px 0;
    color: var(--text-primary);
}

.page-overlay h2.top-attractions {
    margin: 8px 0;
    color: var(--text-primary);
}

.page-overlay h2.top-attractions span:first-child {
    color: var(--text-primary) !important;
}

/* FORCE TOP ATTRACTIONS TEXT TO BE WHITE - NUCLEAR OPTION */
h2.top-attractions,
h2.top-attractions span:first-child,
.page-overlay h2.top-attractions,
.page-overlay h2.top-attractions span:first-child {
    color: #e0e0e0 !important;
}

.page-overlay .featured-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    overflow-y: hidden;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.page-overlay .featured-scroll {
    display: flex;
    overflow-x: scroll;
    gap: 16px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    scrollbar-width: auto;
}

.page-overlay .featured-scroll::-webkit-scrollbar {
    height: 8px;
}

.page-overlay .featured-scroll::-webkit-scrollbar-track {
    background: var(--accent1);
    border-radius: 4px;
}

.page-overlay .featured-scroll::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

.page-overlay .featured-scroll::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

.page-overlay .featured-item {
    flex: 0 0 300px;
    /* Updated to match new image width */
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.page-overlay .featured-image {
    width: 300px;
    /* Made wider and more square - matching business popup card size approach */
    height: 300px;
    /* Made square for better proportions */
    border-radius: 12px;
    object-fit: cover;
}

.page-overlay .featured-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-overlay .featured-details-heading {
    font-size: 16px;
    font-weight: 400;
    font-family: 'Anton SC', sans-serif !important;
}

.page-overlay .featured-details-list {
    font-size: 12px;
    color: var(--text-secondary);
    list-style: none;
}

.page-overlay .featured-details-list li {
    margin-bottom: 4px;
}

.page-overlay .featured-details-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-overlay .categories-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.page-overlay .categories-scroll {
    display: flex;
    overflow-x: scroll;
    gap: 12px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    scrollbar-width: auto;
}

.page-overlay .categories-scroll::-webkit-scrollbar {
    height: 8px;
}

.page-overlay .categories-scroll::-webkit-scrollbar-track {
    background: var(--accent1);
    border-radius: 4px;
}

.page-overlay .categories-scroll::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

.page-overlay .categories-scroll::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

.page-overlay .category-item {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.page-overlay .category-image {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.page-overlay .category-text {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Anton SC', sans-serif !important;
}

.page-overlay .miscellaneous-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.page-overlay .miscellaneous-list {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    gap: 16px;
    padding-top: 8px;
    min-height: 500px;
}

.page-overlay .miscellaneous-item {
    width: 100%;
    height: 144px;
    background-color: var(--secondary-bg);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 8px;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    visibility: visible;
    transition: transform 0.3s ease;
}

.page-overlay .miscellaneous-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0;
    display: block;
}

.page-overlay .miscellaneous-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-overlay .miscellaneous-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-overlay .miscellaneous-details-heading {
    font-size: 14px;
    font-weight: 400;
    font-family: 'Anton SC', sans-serif !important;
}

.page-overlay .miscellaneous-details-list {
    font-size: 10px;
    color: var(--text-secondary);
    list-style: none;
}

.page-overlay .miscellaneous-details-list li {
    margin-bottom: 4px;
}

.page-overlay .miscellaneous-details-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.floating-audio-btn {
    position: fixed;
    top: 138px;
    right: 20px;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 0, 0, 0.3);
    box-shadow: var(--glow-primary);
    color: var(--primary-color);
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    display: flex;
    /* Always visible by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s ease;
}

.floating-audio-btn:hover {
    box-shadow: var(--glow-hover);
    transform: scale(1.05);
}

/* Only hide when specifically told to */
.floating-audio-btn.hide {
    display: none;
}

/* Animated Rating Loader */
.animated-rating-loader {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    overflow: hidden;
}

.animated-stars {
    display: flex;
    gap: 2px;
}

.animated-stars .star {
    color: #ffd700;
    font-size: 16px;
    opacity: 0.3;
    animation: starPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

.animated-stars .star:nth-child(1) {
    animation-delay: 0s;
}

.animated-stars .star:nth-child(2) {
    animation-delay: 0.15s;
}

.animated-stars .star:nth-child(3) {
    animation-delay: 0.3s;
}

.animated-stars .star:nth-child(4) {
    animation-delay: 0.45s;
}

.animated-stars .star:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes starPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
        filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3));
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    }
}

.loading-text {
    color: #888;
    font-size: 14px;
    font-weight: 500;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.loading-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 215, 0, 0.1),
            transparent);
    animation: shimmer 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Make hamburger and language dropdown match chip styling */
#collections-toggle {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid rgba(255, 0, 0, 0.3) !important;
}

#collections-toggle:hover {
    background-color: #444 !important;
    border-color: #ff0000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5) !important;
    /* Soft red glow like live location */
}

.language-dropdown,
#languageDropdown {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid rgba(255, 0, 0, 0.3) !important;
    border-radius: var(--border-radius-xl) !important;
    flex-shrink: 0;
    margin: 0;
}

.language-dropdown:hover,
#languageDropdown:hover {
    background-color: #444 !important;
    border-color: #ff0000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5) !important;
    /* Soft red glow like live location */
}

.language-dropdown:focus,
#languageDropdown:focus {
    outline: none !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5) !important;
    /* Soft red glow like live location */
}

/* Business Containers Styles */
.business-containers {
    position: absolute;
    top: 120px;
    left: 16px;
    right: 16px;
    z-index: 100;
    display: none;
    /* Hidden by default, can be toggled */
}

.business-containers h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ff0000;
    margin: 16px 0 8px 0;
}

.business-containers .featured-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    overflow-y: hidden;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.business-containers .featured-scroll {
    display: flex;
    overflow-x: scroll;
    gap: 16px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    scrollbar-width: auto;
}

.business-containers .featured-scroll::-webkit-scrollbar {
    height: 8px;
}

.business-containers .featured-scroll::-webkit-scrollbar-track {
    background: var(--accent1);
    border-radius: 4px;
}

.business-containers .featured-scroll::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

.business-containers .featured-scroll::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

.business-containers .featured-item {
    flex: 0 0 192.5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.business-containers .featured-item:hover {
    transform: translateY(-5px);
}

.business-containers .featured-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
}

.business-containers .featured-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.business-containers .featured-details-heading {
    font-size: 16px;
    font-weight: 400;
    font-family: 'Anton SC', sans-serif !important;
}

.business-containers .featured-details-list {
    font-size: 12px;
    color: var(--text-secondary);
    list-style: none;
}

.business-containers .featured-details-list li {
    margin-bottom: 4px;
}

.business-containers .featured-details-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.business-containers .categories-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.business-containers .categories-scroll {
    display: flex;
    overflow-x: scroll;
    gap: 12px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    scrollbar-width: auto;
}

.business-containers .categories-scroll::-webkit-scrollbar {
    height: 8px;
}

.business-containers .categories-scroll::-webkit-scrollbar-track {
    background: var(--accent1);
    border-radius: 4px;
}

.business-containers .categories-scroll::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

.business-containers .categories-scroll::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

.business-containers .category-item {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.business-containers .category-item:hover {
    transform: translateY(-5px);
}

.business-containers .category-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.business-containers .category-text {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Anton SC', sans-serif !important;
}

.business-containers .miscellaneous-container {
    background-color: var(--secondary-bg);
    padding: 8px;
    border-radius: 12px;
    width: 100%;
    margin: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.business-containers .miscellaneous-list {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    gap: 16px;
    padding-top: 8px;
    min-height: 200px;
}

.business-containers .miscellaneous-item {
    width: 100%;
    height: 120px;
    background-color: var(--secondary-bg);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 8px;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    visibility: visible;
    transition: transform 0.3s ease;
}

.business-containers .miscellaneous-item:hover {
    transform: translateY(-5px);
}

.business-containers .miscellaneous-image {
    width: 190px;
    height: 190px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0;
    display: block;
}

.business-containers .miscellaneous-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.business-containers .miscellaneous-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.business-containers .miscellaneous-details-heading {
    font-size: 14px;
    font-weight: 400;
    font-family: 'Anton SC', sans-serif !important;
}

.business-containers .miscellaneous-details-list {
    font-size: 10px;
    color: var(--text-secondary);
    list-style: none;
}

.business-containers .miscellaneous-details-list li {
    margin-bottom: 4px;
}

.business-containers .miscellaneous-details-list a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ── Tour card: sponsor text + POI count visibility ────────────────────────────────
 *  When CLOSED: hide sponsor tag, show POI count
 *  When OPEN:   show sponsor tag, hide POI count (sponsor loading screen takes over)
 * ──────────────────────────────────────────────────────────────────────────────── */

/* Sponsor tag: hidden when card is closed */
.line-card[data-category]:not(.expanded) .sponsor {
    display: none !important;
}

/* Sponsor tag: visible when card is open */
.line-card[data-category].expanded .sponsor {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 4px;
}

/* POI count: visible when card is closed and has text */
.line-card[data-category]:not(.expanded) .line-info:not(:empty) {
    display: block !important;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

/* POI count: hidden when card is open */
.line-card[data-category].expanded .line-info {
    display: none !important;
}