/* ==================== VAPORWAVE AESTHETIC ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --vapor-purple: #7d00b3;
    --vapor-pink: #ff00ff;
    --vapor-cyan: #00ffff;
    --vapor-blue: #0a0a2e;
    --vapor-dark: #1a0a2e;
    --vapor-darker: #0d0516;

    /* Enhanced vaporwave colors */
    --neon-pink: #FF71CE;
    --neon-cyan: #01CDFE;
    --neon-green: #05FFA1;
    --neon-purple: #B967FF;
    --neon-yellow: #FFE400;
    --deep-purple: #5A189A;

    --glass-bg: rgba(26, 10, 46, 0.7);
    --glass-border: rgba(255, 113, 206, 0.3);
}

body {
    font-family: 'Exo 2', 'Arial', 'Helvetica', sans-serif;
    background: var(--vapor-darker);
    color: var(--vapor-cyan);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==================== VAPORWAVE BACKGROUND ==================== */

.vaporwave-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    /* Soft pastel vaporwave gradient - dreamy pink/purple/teal */
    background: linear-gradient(180deg,
            #1a0a2e 0%,
            #2d1b4e 25%,
            #5a3d7a 50%,
            #b48ec4 70%,
            #e8b4d8 85%,
            #f5d0e6 100%);
}

/* Perspective grid - bolder and more vibrant */
.grid-perspective {
    position: absolute;
    bottom: 0;
    left: -30%;
    width: 160%;
    height: 55%;
    background:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 30px,
            rgba(255, 0, 255, 0.4) 30px,
            rgba(255, 0, 255, 0.4) 32px),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 30px,
            rgba(0, 255, 255, 0.35) 30px,
            rgba(0, 255, 255, 0.35) 32px);
    transform: perspective(400px) rotateX(65deg);
    transform-origin: center bottom;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: perspective(400px) rotateX(65deg) translateY(0);
    }

    100% {
        transform: perspective(400px) rotateX(65deg) translateY(30px);
    }
}

/* Retro sun - soft circular glow */
.sun {
    position: absolute;
    bottom: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle,
            rgba(255, 200, 150, 0.8) 0%,
            rgba(255, 150, 180, 0.5) 40%,
            rgba(180, 100, 200, 0.2) 70%,
            transparent 100%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.6;
    animation: sunGlow 6s ease-in-out infinite alternate;
}

@keyframes sunGlow {
    0% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.05);
    }
}

/* Removed mountain silhouettes for cleaner look */

/* CRT scanlines */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.08) 2px,
            rgba(0, 0, 0, 0.08) 4px);
    pointer-events: none;
}

/* Chromatic aberration effect on edges */
.vaporwave-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(255, 0, 255, 0.1) 100%);
    pointer-events: none;
}

/* ==================== MAIN CONTAINER ==================== */

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* ==================== HEADER ==================== */

.header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: linear-gradient(90deg,
            #fff 0%,
            var(--neon-pink) 25%,
            var(--neon-cyan) 50%,
            var(--neon-pink) 75%,
            #fff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Softer glow effect */
    filter: drop-shadow(0 0 8px rgba(255, 113, 206, 0.4));
    margin-bottom: 0.3rem;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px var(--vapor-pink)) drop-shadow(0 0 40px var(--vapor-cyan));
    }

    to {
        filter: drop-shadow(0 0 30px var(--vapor-pink)) drop-shadow(0 0 60px var(--vapor-cyan));
    }
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* ==================== CONTROLS NEW LAYOUT ==================== */
.controls-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.filter-group-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Custom Venue Select */
.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.venue-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-purple);
    color: white;
    padding: 0 2rem 0 0.75rem;
    height: 32px;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B967FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.8em;
}

.venue-select:hover,
.venue-select:focus {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(185, 103, 255, 0.4);
    outline: none;
}

.filter-chip {
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    height: 28px;
}

.filter-chip:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 113, 206, 0.4);
    color: var(--neon-pink);
}

.filter-chip[data-active="true"] {
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 0 15px rgba(185, 103, 255, 0.6);
}

/* Ending Soon filter chip - red/urgent styling */
.filter-chip-urgent {
    border-color: #ff4444;
    color: #ff4444;
}

.filter-chip-urgent:hover {
    border-color: #ff6666;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
    color: #ff6666;
}

.filter-chip-urgent[data-active="true"] {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border-color: #ff4444;
    color: white;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
}

/* Hidden Gems filter chip - cyan/blue styling */
.filter-chip-gem {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.filter-chip-gem:hover {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(1, 205, 254, 0.4);
    color: #00e5ff;
}

.filter-chip-gem[data-active="true"] {
    background: linear-gradient(135deg, var(--neon-cyan), #0088aa);
    border-color: var(--neon-cyan);
    color: var(--vapor-darker);
    box-shadow: 0 0 15px rgba(1, 205, 254, 0.6);
}

/* Area select dropdown */
.area-select {
    min-width: 160px;
}

.view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-purple);
    border-radius: 20px;
    overflow: hidden;
    height: 32px;
    /* Slight height constraint for compact look */
    min-width: 120px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.3rem 0;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.toggle-btn:hover {
    color: white;
}

.location-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    color: white;
    /* Box shadow removed to keep sharp pill shape edges inside container */
}

/* ==================== SPLIT VIEW (MAP MODE) ==================== */

.split-view {
    display: flex;
    flex-direction: row-reverse; /* Map on right, cards on left (like Airbnb) */
    gap: 1rem;
    margin-bottom: 2rem;
    height: 75vh;
    min-height: 550px;
}

.split-map {
    flex: 1.5; /* Map gets more space */
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
}

.split-map .map-container {
    height: 100%;
    width: 100%;
}

.split-cards {
    flex: 1; /* Cards panel narrower */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    min-width: 280px;
    max-width: 360px;
}

.exhibitions-list-split {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem;
    overflow-y: auto;
    height: 100%;
}

.exhibitions-list-split::-webkit-scrollbar {
    width: 6px;
}

.exhibitions-list-split::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.exhibitions-list-split::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 3px;
}

.exhibitions-list-split::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
}

/* Cards in split view - compact for better overview */
.exhibitions-list-split .exhibition-card {
    flex-shrink: 0;
    border-radius: 8px;
    border-width: 1px;
}

.exhibitions-list-split .exhibition-card::after {
    display: none; /* Hide "click to expand" hint in compact view */
}

.exhibitions-list-split .exhibition-image {
    height: 70px;
}

.exhibitions-list-split .exhibition-content {
    padding: 0.5rem 0.6rem;
}

.exhibitions-list-split .exhibition-venue {
    font-size: 0.65rem;
    margin-bottom: 0.2rem;
}

.exhibitions-list-split .exhibition-title {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.exhibitions-list-split .exhibition-dates {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
}

.exhibitions-list-split .exhibition-badges {
    margin-bottom: 0.4rem;
    gap: 0.3rem;
}

.exhibitions-list-split .badge-item {
    padding: 0.15rem 0.5rem;
    font-size: 0.6rem;
}

.exhibitions-list-split .exhibition-description {
    display: none;
}

.exhibitions-list-split .exhibition-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
}

/* ==================== LIST VIEW ==================== */

.list-view {
    margin-bottom: 2rem;
}

/* List view cards - more compact */
.list-view .exhibitions-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.list-view .exhibition-card {
    border-radius: 10px;
}

.list-view .exhibition-image {
    height: 180px;
}

.list-view .exhibition-content {
    padding: 1rem;
}

.list-view .exhibition-venue {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
}

.list-view .exhibition-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.list-view .exhibition-dates {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.list-view .exhibition-description {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.list-view .exhibition-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ==================== MAP SECTION (legacy, keep for compatibility) ==================== */

.map-section {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
}

.map-container {
    height: 50vh;
    min-height: 400px;
    width: 100%;
}

/* ==================== EXHIBITIONS LIST ==================== */

.exhibitions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.exhibition-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.exhibition-card:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 30px rgba(255, 113, 206, 0.4);
    transform: translateY(-4px);
}

.exhibition-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(89, 103, 255, 0.3), rgba(1, 205, 254, 0.3));
}

.exhibition-content {
    padding: 1.5rem;
    position: relative;
}

.exhibition-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.badge-item {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Exo 2', sans-serif;
}

/* Ending soon badge - urgent red pulsing */
.badge-ending-soon {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.badge-just-opened {
    background: linear-gradient(135deg, var(--neon-green), #04cc7a);
    color: var(--vapor-darker);
    box-shadow: 0 0 15px rgba(5, 255, 161, 0.6);
}

.badge-free {
    background: linear-gradient(135deg, var(--neon-cyan), #0199c9);
    color: var(--vapor-darker);
    box-shadow: 0 0 15px rgba(1, 205, 254, 0.6);
}

/* Hidden Gem badge - cyan/blue */
.badge-hidden-gem {
    background: linear-gradient(135deg, var(--neon-cyan), #0088aa);
    color: var(--vapor-darker);
    box-shadow: 0 0 15px rgba(1, 205, 254, 0.6);
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 68, 68, 0.9);
    }
}

.exhibition-venue {
    font-size: 0.8rem;
    color: var(--vapor-pink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.exhibition-title {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-weight: 600;
    transition: all 0.1s ease;
}

.exhibition-card:hover .exhibition-title {
    animation: glitch 0.3s ease-in-out;
    text-shadow: 2px 0 var(--neon-pink), -2px 0 var(--neon-cyan), 0 0 20px var(--neon-pink);
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

.exhibition-dates {
    font-size: 0.9rem;
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.75rem;
}

.exhibition-description {
    font-size: 0.9rem;
    color: #a0a0a0;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Description toggle for expandable cards */
.exhibition-description-full {
    display: none;
}

.exhibition-card.expanded .exhibition-description-truncated {
    display: none;
}

.exhibition-card.expanded .exhibition-description-full {
    display: block;
}

/* Expanded card state */
.exhibition-card.expanded {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 40px rgba(1, 205, 254, 0.5);
    transition: all 0.3s ease;
}

.exhibition-card.expanded .exhibition-image {
    height: 350px;
}

/* List view expanded card - in-place vertical expansion (no grid changes) */
.list-view .exhibition-card.expanded {
    /* Keep in same grid position - no grid-column changes */
    transform: scale(1.02);
    z-index: 10;
    box-shadow:
        0 0 50px rgba(1, 205, 254, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.5);
}

.list-view .exhibition-card.expanded .exhibition-image {
    height: 280px;
}

.list-view .exhibition-card.expanded .exhibition-content {
    padding: 1.5rem;
}

.list-view .exhibition-card.expanded .exhibition-title {
    font-size: 1.3rem;
}

.list-view .exhibition-card.expanded .exhibition-description-full {
    max-height: 200px;
    overflow-y: auto;
}

/* Visual hint that card is clickable */
.exhibition-card::after {
    content: 'Click to expand';
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.7rem;
    color: rgba(1, 205, 254, 0.5);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.exhibition-card.expanded::after {
    content: 'Click to collapse';
    color: rgba(255, 113, 206, 0.6);
}

.exhibition-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 113, 206, 0.2);
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.3s ease;
}

.exhibition-link:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 20px var(--neon-pink);
    transform: translateY(-2px);
}

/* Map view styles removed - map is now always visible in hero section */

/* ==================== FOOTER ==================== */

.footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

/* ==================== LEAFLET MAP CUSTOMIZATION ==================== */

.leaflet-popup-content-wrapper {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(10px) !important;
    color: white !important;
}

.leaflet-popup-tip {
    background: var(--glass-bg) !important;
}

.custom-marker {
    background: none !important;
    border: none !important;
}

/* ==================== RESPONSIVE - TABLET ==================== */

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }

    /* Compact header on mobile */
    .header {
        margin-bottom: 0.75rem;
        padding: 0.5rem 0;
    }

    .title {
        font-size: 1.8rem;
        letter-spacing: 0.08em;
    }

    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    /* Controls container - horizontal scrollable on mobile */
    .controls-container {
        padding: 0.5rem;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .controls-top {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Filter group - horizontal scroll */
    .filter-group-main {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-group-main::-webkit-scrollbar {
        display: none;
    }

    /* Dropdowns side by side on mobile */
    .venue-select {
        min-width: 120px;
        height: 36px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }

    .area-select {
        min-width: 130px;
    }

    /* Filter chips - compact and inline */
    .filter-chip {
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
        height: 36px;
        flex-shrink: 0;
        border-radius: 18px;
    }

    /* View toggle full width */
    .view-toggle {
        width: 100%;
        height: 36px;
    }

    .toggle-btn {
        flex: 1;
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }

    /* Split view - map dominant on mobile */
    .split-view {
        flex-direction: column;
        height: calc(100vh - 180px);
        min-height: 450px;
        gap: 0;
        border-radius: 12px;
        overflow: hidden;
    }

    .split-map {
        flex: 1.2;
        min-height: 200px;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid var(--glass-border);
        order: 1;
    }

    .split-cards {
        flex: 1;
        min-height: 180px;
        max-width: none;
        border-radius: 0;
        border: none;
        order: 2;
    }

    /* Horizontal scrolling cards on mobile map view */
    .exhibitions-list-split {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.5rem;
        padding: 0.5rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .exhibitions-list-split .exhibition-card {
        flex-shrink: 0;
        width: 200px;
        scroll-snap-align: start;
    }

    .exhibitions-list-split .exhibition-image {
        height: 80px;
    }

    .exhibitions-list-split .exhibition-content {
        padding: 0.5rem;
    }

    .exhibitions-list-split .exhibition-title {
        font-size: 0.8rem;
        line-height: 1.15;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .exhibitions-list-split .exhibition-venue {
        font-size: 0.6rem;
    }

    .exhibitions-list-split .exhibition-dates {
        font-size: 0.65rem;
    }

    .exhibitions-list-split .badge-item {
        padding: 0.1rem 0.4rem;
        font-size: 0.55rem;
    }

    .exhibitions-list-split .exhibition-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }

    /* List view on mobile */
    .list-view .exhibitions-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }

    .list-view .exhibition-image {
        height: 160px;
    }

    .list-view .exhibition-content {
        padding: 0.75rem;
    }

    .list-view .exhibition-title {
        font-size: 1rem;
    }

    /* Map overlay controls - compact on mobile */
    .map-overlay-controls {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.35rem;
        gap: 0.3rem;
    }

    .postcode-input-overlay {
        width: 70px;
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    .zone-btn-overlay {
        padding: 0.25rem 0.4rem;
        font-size: 0.6rem;
    }

    /* Hide "click to expand" text on mobile */
    .exhibition-card::after {
        display: none;
    }

    /* Reduce background effects on mobile for performance */
    .sun {
        width: 100px;
        height: 100px;
        opacity: 0.4;
    }

    .grid-perspective {
        opacity: 0.5;
    }

    /* Footer compact */
    .footer {
        padding: 1rem 0;
        font-size: 0.75rem;
    }
}

/* ==================== RESPONSIVE - SMALL PHONE ==================== */

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .header {
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
    }

    .title {
        font-size: 1.5rem;
        letter-spacing: 0.05em;
    }

    .subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
    }

    /* Even more compact controls */
    .controls-container {
        padding: 0.4rem;
        gap: 0.3rem;
    }

    .venue-select {
        min-width: 100px;
        height: 32px;
        font-size: 0.65rem;
        padding-left: 0.5rem;
    }

    .filter-chip {
        padding: 0.3rem 0.5rem;
        font-size: 0.6rem;
        height: 32px;
    }

    .view-toggle {
        height: 32px;
    }

    .toggle-btn {
        font-size: 0.7rem;
    }

    /* Full height map view on small phones */
    .split-view {
        height: calc(100vh - 150px);
        min-height: 400px;
    }

    .split-map {
        flex: 1.5;
    }

    .split-cards {
        flex: 1;
        min-height: 150px;
    }

    /* Smaller horizontal cards */
    .exhibitions-list-split .exhibition-card {
        width: 170px;
    }

    .exhibitions-list-split .exhibition-image {
        height: 65px;
    }

    .exhibitions-list-split .exhibition-title {
        font-size: 0.75rem;
    }

    /* List view cards */
    .list-view .exhibition-image {
        height: 140px;
    }

    .list-view .exhibition-title {
        font-size: 0.95rem;
    }

    .list-view .exhibition-venue {
        font-size: 0.65rem;
    }

    .list-view .exhibition-dates {
        font-size: 0.75rem;
    }

    /* Badges even smaller */
    .badge-item {
        padding: 0.2rem 0.5rem;
        font-size: 0.6rem;
    }

    /* Map overlay - minimal on small phones */
    .map-overlay-controls {
        top: 0.4rem;
        right: 0.4rem;
        padding: 0.25rem;
    }

    .postcode-input-overlay {
        width: 60px;
        font-size: 0.65rem;
    }

    .zone-btn-overlay {
        font-size: 0.55rem;
        padding: 0.2rem 0.35rem;
    }

    /* Reduce visual clutter on small screens */
    .scanlines {
        display: none;
    }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */

@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch */
    .filter-chip,
    .toggle-btn,
    .zone-btn-overlay {
        min-height: 44px;
    }

    .venue-select {
        min-height: 44px;
    }

    /* Remove hover effects that don't work well on touch */
    .exhibition-card:hover {
        transform: none;
        box-shadow: none;
    }

    .exhibition-card:active {
        transform: scale(0.98);
        border-color: var(--neon-pink);
    }

    .filter-chip:hover {
        box-shadow: none;
    }

    .filter-chip:active {
        transform: scale(0.95);
    }

    /* Smooth scrolling for card lists */
    .exhibitions-list-split {
        scroll-behavior: smooth;
    }
}

/* ==================== SAFE AREA (NOTCH DEVICES) ==================== */

@supports (padding: env(safe-area-inset-bottom)) {
    .container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        .container {
            padding-left: max(0.5rem, env(safe-area-inset-left));
            padding-right: max(0.5rem, env(safe-area-inset-right));
        }
    }
}

/* Category Badges */
.badge-photography {
    background: rgba(1, 205, 254, 0.2);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
}

.badge-painting {
    background: rgba(255, 113, 206, 0.2);
    color: var(--neon-pink);
    border: 1px solid var(--neon-pink);
}

.badge-sculpture {
    background: rgba(185, 103, 255, 0.2);
    color: var(--neon-purple);
    border: 1px solid var(--neon-purple);
}

.badge-design {
    background: rgba(255, 228, 0, 0.2);
    color: var(--neon-yellow);
    border: 1px solid var(--neon-yellow);
}

.badge-historical {
    background: rgba(255, 165, 0, 0.2);
    color: #FFA500;
    border: 1px solid #FFA500;
}

.badge-contemporary {
    background: rgba(5, 255, 161, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}

/* Map Overlay Controls */
.split-map {
    position: relative;
}

.map-overlay-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    /* Above Leaflet */
    display: flex;
    gap: 0.5rem;
    background: rgba(10, 10, 46, 0.85);
    /* Semi-transparent dark bg */
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--neon-blue);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.postcode-input-overlay {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 0.3rem 0.5rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    width: 100px;
    text-transform: uppercase;
    text-align: center;
}

.postcode-input-overlay:focus {
    outline: none;
    border-bottom-color: var(--neon-pink);
    color: white;
}

.postcode-input-overlay::placeholder {
    color: rgba(1, 205, 254, 0.5);
}

.zone-btn-overlay {
    background: rgba(1, 205, 254, 0.15);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zone-btn-overlay:hover {
    background: var(--neon-blue);
    color: var(--vapor-darker);
}

.zone-btn-overlay.clear-btn {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.zone-btn-overlay.clear-btn:hover {
    background: #ff4444;
    color: white;
}