/**
 * Out with Kidz - Main Stylesheet
 * Warm & sunny family-friendly design
 */

/* ===== FONTS ===== */
/* Loaded by <link> in views/partials/head_common.php (with preconnect), not @import:
   an @import inside this file chains HTML -> styles.css -> font CSS -> font files
   and blocks first paint on every page (SEO plan Phase 6, 2026-11-13). */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary colours: an SA summer-holiday beach day. All text pairings are WCAG AA.
       ocean = Highveld summer sky (header, city hero, visit card; white text 5.6:1)
       yellow = beach-umbrella sun (home hero field; ink text 10:1)
       orange = watermelon (the one action colour: buttons, pins; white text 4.9:1)
       teal = swimming pool (labels, badges, selected states; 4.9:1 on white)
       sky = deep sky (links and numbers; 4.7:1 even on the sun yellow)
       protea = party pink (birthday pages), tangerine = restaurants. */
    --color-ocean: #1D63D3;
    --color-sky: #1554B8;
    --color-teal: #0A7E7A;
    --color-orange: #D6285F;
    --color-protea: #B81E50;
    --color-tangerine: #C2410C;
    --color-yellow: #FFCC33;
    --color-coral: #FF8FAB;
    --color-pool-light: #5ED3CE; /* decoration only, never behind text */
    --color-ink: #1D2048;
    --color-star: #E8A100;
    --color-warm-bg: #F5F9FF; /* sky-washed white ground */

    /* Neutrals */
    --color-white: #FFFFFF;
    --color-gray: #58626F; /* 4.5:1+ on white, cream and the light panels */
    --color-gray-light: #F1F5F9;
    /* Form field edges: lightest grey that passes WCAG 1.4.11 (3:1) on white.
       --color-gray-light (#F1F5F9, 1.1:1) made inputs invisible on many screens. */
    --field-border: #8A93A3;
    --field-border-hover: #64748B;
    --field-focus: #1D63D3;
    --field-ring: rgba(29, 99, 211, 0.28);
    --color-dark: #1E293B;

    /* Gradients */
    /* Solid fields, not gradients: text on them must hold contrast end to end. */
    --gradient-header: var(--color-ocean);
    --gradient-primary: var(--color-teal);
    --gradient-hero: var(--color-yellow);
    --gradient-accent: var(--color-orange);
    --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);

    /* Typography */
    --font-heading: 'Fredoka', sans-serif;
    /* Built for legibility at small sizes and in bright light (phones outdoors, grandparents). */
    --font-body: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-dark);
    background-color: var(--color-warm-bg);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

h1, h2, h3, h4, .card-title { text-wrap: balance; }
p, li { text-wrap: pretty; }

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0.5rem;
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-sky);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #0F3F8C;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: 24px 0;
}

/* ===== HEADER ===== */
.header {
    background: var(--gradient-header);
    box-shadow: 0 2px 10px rgba(21,84,184,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 var(--spacing-md);
}

.header-nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    transition: all var(--transition-fast);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.18);
}

.logo-link { text-decoration: none; }

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-white);
}

.logo-accent { color: var(--color-yellow); }

/* Hamburger button — desktop hidden */
.nav-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-menu-toggle:hover {
    background: rgba(255,255,255,0.18);
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--gradient-hero);
    color: var(--color-ink);
    padding: var(--spacing-lg) 0 calc(var(--spacing-lg) + 58px);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 340px;
    height: 340px;
    background: var(--color-pool-light);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 260px;
    height: 260px;
    background: var(--color-coral);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Scalloped bottom edge — a playful party-banner motif where the warm page
   colour pokes up into the hero as a row of half-circles. Pure CSS, no motion. */
.hero-scallop {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 16px;
    z-index: 2;
    background: radial-gradient(circle at 16px 100%, var(--color-warm-bg) 15px, transparent 16px);
    background-size: 32px 16px;
    background-repeat: repeat-x;
    background-position: center bottom;
    pointer-events: none;
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 0;
}

.hero-logo-text {
    margin-bottom: var(--spacing-xs);
}

.hero-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.25rem;
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.hero-accent {
    color: var(--color-yellow);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.hero-actions .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 600px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
}

/* ===== COMPACT, SEARCH-FIRST HERO ===== */
.hero--compact {
    padding: var(--spacing-md) 0 calc(var(--spacing-md) + 48px);
}
.hero--compact h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}
.hero-count {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 0;
}
.hero-count strong {
    color: #0F3F8C;
    font-weight: 700;
}

/* "Near me" — the primary action; leads the search row */
.btn-nearme {
    background: var(--gradient-accent);
    color: var(--color-white);
    border: none;
    min-height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.btn-nearme:hover { filter: brightness(1.05); }
.btn-nearme.is-loading { opacity: 0.7; pointer-events: none; }

.btn-ghost {
    background: transparent;
    color: var(--color-gray);
    border: 1px solid var(--color-gray-light);
    flex-shrink: 0;
    align-self: center;
}
.btn-ghost:hover { background: var(--color-gray-light); }

/* Mobile-only "Filters" disclosure toggle */
.search-unified-group .filters-toggle { display: none; }

.near-me-status {
    display: none;
    margin: var(--spacing-xs) 0 0;
    font-size: 0.85rem;
    color: var(--color-gray);
}
.near-me-status.is-error { color: #BE123C; } /* coral failed contrast on white */
.near-me-cities { display: inline; color: var(--color-gray); }
.near-me-city {
    background: none; border: 0; padding: 0.35rem 0.1rem; font: inherit; cursor: pointer;
    color: var(--color-teal); font-weight: 600; text-decoration: underline;
}
.near-me-city:hover { color: var(--color-sky); }

@media (max-width: 600px) {
    .hero--compact h1 { font-size: 1.4rem; }
    .hero-count { font-size: 0.9rem; }
}

/* On mobile, collapse the filter row behind the toggle */
@media (max-width: 768px) {
    .search-unified-group .filters-toggle {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
    }
    #filtersPanel { display: none; }
    #filtersPanel.is-open { display: flex; }
}

/* ===== SEARCH FILTER WRAPPER ===== */
.search-filter-wrapper {
    margin-top: -2rem;
    position: relative;
    z-index: 10;
    margin-bottom: var(--spacing-md);
}

.search-filter-card {
    background: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.search-unified-group {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white);
    padding: var(--spacing-xs);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: var(--radius-md);
    outline: none;
}

.search-input:focus {
    background: var(--color-gray-light);
}

.btn {
    padding: 0.5rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-gray-light);
    color: var(--color-dark);
}

.btn-secondary:hover {
    background: var(--color-gray);
    color: var(--color-white);
}

/* Report button — unobtrusive, sits at end of action row */
.btn-report {
    margin-left: auto;
    background: none;
    border: 1.5px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    color: var(--color-gray);
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}
.btn-report:hover { border-color: var(--color-coral); color: var(--color-coral); }

/* ===== CARDS ===== */
.card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sky);
    cursor: pointer;
}

.card-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--color-gray-light);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
}

.card-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--gradient-overlay);
}

.card-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--color-yellow);
    color: var(--color-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1;
}

.card-content {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.05rem;
    margin-bottom: 3px;
    color: var(--color-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: var(--color-gray);
    flex-wrap: wrap;
}

.card-description {
    color: var(--color-gray);
    font-size: 0.9375rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Never grow past the clamped lines: a stretched box showed half of line 3. */
    flex: 0 1 auto;
    max-height: calc(1.6em * 2);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
    padding-top: 6px;
}

.tag {
    background: #FFF7ED;
    color: #C2410C;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    gap: 10px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== CATEGORY BADGE ===== */
.card-category {
    display: inline-block;
    background: rgba(2, 132, 199, 0.1);
    color: var(--color-sky);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    color: var(--color-gray);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

/* ===== HORIZONTAL CARD (venue list only) ===== */
.card-horizontal {
    flex-direction: row;
    min-height: 88px;
}

.card-horizontal .card-image-wrapper {
    width: 120px;
    min-width: 120px;
    flex-shrink: 0;
}

.card-horizontal .card-image-wrapper::after {
    display: none;
}

.card-horizontal .card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    min-height: 88px;
    object-fit: cover;
}

.card-horizontal .card-content {
    padding: 8px 10px;
}

/* Let the card grow rather than squeezing the clamped lines when a tag row is present. */
.card-horizontal .card-title,
.card-horizontal .card-description,
.trending-card .card-title,
.trending-card .card-description {
    flex-shrink: 0;
}

.card-horizontal .card-title {
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.card-horizontal .card-meta {
    font-size: 0.75rem;
    margin-bottom: 3px;
    gap: 0.4rem;
}

.card-horizontal .card-description {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
}

.card-horizontal .card-tags {
    padding-top: 4px;
}

.card-horizontal .tag {
    font-size: 0.7rem;
    padding: 1px 6px;
}

/* ===== MAP & LIST LAYOUT ===== */
.map-list-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: var(--spacing-sm);
}

.map-container {
    position: sticky;
    top: 76px;
    /* Sticky beside the list; 70% of the viewport-filling size so it stays usable. */
    height: clamp(322px, calc(70vh - 70px), 532px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#map {
    width: 100%;
    height: 100%;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Cards size to their content; shrinking them clipped the title and tag row. */
.locations-list > .card {
    flex-shrink: 0;
    height: auto;
}

/* ===== TRENDING SECTION ===== */
.trending {
    background: var(--color-warm-bg);
    padding: var(--spacing-sm) 0 var(--spacing-md);
}

.trending-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.trending-header h2 {
    margin: 0;
    line-height: 1;
}

.trending-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.trending-scroll {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    /* ensure cards don't wrap — they scroll */
    flex-wrap: nowrap;
    scrollbar-width: thin;
    scrollbar-color: var(--color-orange) #DBEAFE;
}

.trending-scroll::-webkit-scrollbar {
    height: 6px;
}

.trending-scroll::-webkit-scrollbar-track {
    background: #DBEAFE;
}

.trending-scroll::-webkit-scrollbar-thumb {
    background: var(--color-orange);
    border-radius: var(--radius-sm);
}

/* Horizontal card layout — image on left, content on right */
.trending-card {
    flex-shrink: 0;
    flex-direction: row;          /* override default column */
    min-width: 300px;
    max-width: 300px;
    height: auto;
}

.trending-card .card-image-wrapper {
    width: 110px;
    min-width: 110px;
    flex-shrink: 0;
    min-height: 90px;
}

.trending-card .card-image {
    width: 110px;
    height: 100%;
    aspect-ratio: unset;          /* override 16/9 */
    object-fit: cover;
    min-height: 90px;
}

.trending-card .card-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
}

.trending-card .card-content {
    padding: 8px 10px;
    justify-content: center;
}

.trending-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 2px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card .card-meta {
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.trending-card .card-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
}

/* ===== FILTERS ===== */
.filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast);
    background: var(--color-white);
}

.filter-select:focus {
    border-color: var(--color-sky);
}

/* ===== BROWSE BY CITY ===== */
.city-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-gray);
    margin: 0 0 var(--spacing-sm);
}
.city-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}
.city-feature-card {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    border: 2px solid var(--color-gray-light);
    text-decoration: none;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.city-feature-card:hover {
    border-color: var(--color-teal);
    transform: translateY(-2px);
}
.city-feature-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-dark);
}
.city-feature-count {
    font-size: 0.9rem;
    color: var(--color-gray);
    font-weight: 600;
}
.city-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}
.city-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-gray-light);
    background: var(--color-white);
    color: var(--color-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.city-pill:hover {
    border-color: var(--color-teal);
    color: var(--color-teal);
}
.city-pill-count {
    color: var(--color-gray);
    font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-white);
    display: block;
    margin-bottom: var(--spacing-sm);
}

.footer-logo-accent { color: var(--color-yellow); }

.footer-brand p,
.footer-contact p { font-size: 0.875rem; line-height: 1.6; }

.footer-contact h3,
.footer-links h3 {
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.footer-email {
    display: inline-block;
    color: var(--color-orange);
    font-weight: 600;
    margin-top: var(--spacing-xs);
    text-decoration: none;
}

.footer-email:hover {
    color: #FB923C;
    text-decoration: underline;
}

.contact-modal-container { max-width: 520px; }

.contact-form { display: flex; flex-direction: column; gap: var(--spacing-sm); }

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.contact-field { display: flex; flex-direction: column; gap: 4px; }

.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--color-gray-light);
    border: 1.5px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    color: var(--color-dark);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: 0.55rem 0.85rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.contact-input::placeholder { color: var(--color-gray); }

.contact-input:focus { border-color: var(--color-teal); background: white; }

.contact-textarea { resize: vertical; min-height: 110px; }

.contact-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.contact-status { font-size: 0.875rem; flex: 1; }

.contact-status.success { color: #059669; }
.contact-status.error   { color: #dc2626; }

.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--spacing-xs); }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: white; }
/* Mobile: stacked footer links were ~17px tall — pad them into thumb-sized (~40px) targets */
@media (max-width: 768px) {
    .footer-links li { margin-bottom: 0; }
    .footer-links a { display: block; padding: 0.7rem 0; }
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--spacing-md);
    font-size: 0.75rem;
    text-align: center;
    color: rgba(255,255,255,0.65);
}
.footer-bottom a { color: var(--color-white); text-decoration: underline; text-underline-offset: 2px; }

/* ===== LOADING STATES ===== */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray-light);
    border-top-color: var(--color-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .map-list-container {
        grid-template-columns: 1fr;
    }

    .map-container {
        position: relative;
        top: 0;
        height: 260px;
        order: -1;
    }
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    .hero h1 { font-size: 1.4rem; }
    .hero-brand { font-size: 1.75rem; }

    .hero {
        padding: var(--spacing-sm) 0 calc(var(--spacing-sm) + 58px);
    }

    .section {
        padding: 16px 0;
    }

    .search-filter-wrapper {
        margin-top: -1.5rem;
    }

    /* Horizontal cards revert to vertical on small screens */
    .card-horizontal {
        flex-direction: column;
        min-height: unset;
    }
    .card-horizontal .card-image-wrapper {
        width: 100%;
        min-width: unset;
    }
    .card-horizontal .card-image {
        width: 100%;
        height: auto;
        min-height: unset;
        aspect-ratio: 16 / 9;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .footer-grid { grid-template-columns: 1fr; gap: var(--spacing-lg); }
    .contact-form-row { grid-template-columns: 1fr; }
    .contact-modal-container { max-width: 100%; }

    .trending-card {
        min-width: 78vw;
        max-width: 78vw;
    }

    .trending-card .card-image-wrapper,
    .trending-card .card-image {
        width: 100px;
        min-width: 100px;
    }

    /* Header stays horizontal — hamburger handles nav */
    .header-content {
        flex-direction: row;
        height: 60px;
        padding: 0 var(--spacing-md);
    }

    /* Hamburger visible on mobile */
    .nav-menu-toggle {
        display: flex;
        align-items: center;
    }

    /* Nav hidden by default on mobile; revealed by JS .open class */
    .header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--gradient-header);
        padding: var(--spacing-sm) var(--spacing-md);
        gap: 4px;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 99;
        box-shadow: var(--shadow-md);
    }

    .header-nav.open {
        display: flex;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.75rem var(--spacing-sm);
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: var(--spacing-xs) 0 calc(var(--spacing-xs) + 58px);
    }

    .search-filter-wrapper {
        margin-top: 0;
    }

    .section {
        padding: 12px 0;
    }

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

    /* Grid venue cards (city / birthday / restaurant pages) set a 16:9 frame;
       capping the image inside it left a grey strip under every photo. */
    .trending-card .card-image,
    .venue-card .card-image {
        max-height: none;
    }
}

/* ===== VENUE MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  backdrop-filter: blur(4px);
}

.modal-overlay[hidden] { display: none; }

.modal-container {
  background: var(--color-white);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background var(--transition-fast);
}

.modal-close:hover { background: rgba(0,0,0,0.8); }

/* Carousel */
.modal-images {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-gray-light);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.modal-carousel {
  display: flex;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: none;
}

.carousel-slide.active { display: block; }

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.carousel-prev { left: var(--spacing-xs); }
.carousel-next { right: var(--spacing-xs); }
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,0.7); }

.carousel-dots {
  position: absolute;
  bottom: var(--spacing-xs);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast);
}

.carousel-dot.active { background: white; }

/* Modal body */
.modal-body {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.modal-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-sky);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: var(--spacing-xs) 0 0;
  line-height: 1.2;
}

.modal-meta {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--color-gray);
  flex-wrap: wrap;
}

.modal-price {
  background: var(--color-yellow);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.modal-description {
  color: var(--color-dark);
  line-height: 1.6;
  font-size: 0.9375rem;
  margin: 0;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  border-top: 1px solid var(--color-gray-light);
  padding-top: var(--spacing-md);
}

.detail-row {
  display: flex;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--color-dark);
  line-height: 1.5;
}

.detail-icon { flex-shrink: 0; }

.modal-actions {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  border-top: 1px solid var(--color-gray-light);
  padding-top: var(--spacing-md);
}

@media (max-width: 600px) {
  .modal-body { padding: var(--spacing-md); }
  .modal-title { font-size: 1.25rem; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { text-align: center; justify-content: center; }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-teal { color: var(--color-teal); }
.text-coral { color: var(--color-coral); }
.text-yellow { color: var(--color-yellow); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }

/* ===== STATIC / EDITORIAL PAGES (about, privacy, terms, contact, guides) ===== */
.static-page,
.guide-article {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    line-height: 1.65;
    color: var(--color-dark);
}
.static-page h1,
.guide-article h1 {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.15;
}
.static-page h2,
.guide-article h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}
.static-page h3,
.guide-article h3 {
    font-size: 1.15rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
}
.static-page p,
.guide-article p {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}
/* Keep running text to roughly 70 characters per line (ch is the wide "0" glyph). */
.static-page p, .static-page li,
.guide-article p, .guide-article li,
.home-intro p, .venue-description {
    max-width: 56ch;
}
.static-page ul,
.static-page ol,
.guide-article ul,
.guide-article ol {
    padding-left: 1.5rem;
    margin-bottom: var(--spacing-sm);
}
.static-page li,
.guide-article li {
    margin-bottom: 0.4rem;
}
.static-page a,
.guide-article a {
    color: var(--color-sky);
    text-decoration: underline;
}
.static-page a:hover,
.guide-article a:hover { color: var(--color-teal); }
.guide-meta {
    color: var(--color-gray);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}
.guide-hero {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}
.guide-related {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-gray-light);
}
.guide-related h2 { margin-top: 0; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
}
.related-grid a {
    display: block;
    padding: var(--spacing-sm);
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    color: var(--color-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}
.related-grid a:hover {
    border-color: var(--color-teal);
    box-shadow: var(--shadow-sm);
}
.related-grid strong { display: block; margin-bottom: 0.25rem; color: var(--color-dark); }
.related-grid span { font-size: 0.85rem; color: var(--color-gray); }

/* Guides index list */
.guides-grid {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: var(--spacing-md);
}
.guide-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.guide-card-body { padding: var(--spacing-md); flex: 1; display: flex; flex-direction: column; }
.guide-card h3 { font-size: 1.15rem; margin-bottom: var(--spacing-xs); }
.guide-card p { font-size: 0.9rem; color: var(--color-gray); flex: 1; }
.guide-card .guide-card-meta { font-size: 0.8rem; color: var(--color-gray); margin-top: var(--spacing-xs); }

/* City intro block */
.city-intro {
    max-width: 900px;
    margin: 0 auto var(--spacing-lg);
    padding: 0 var(--spacing-md);
    line-height: 1.65;
}
.city-intro h2 { font-size: 1.4rem; margin-bottom: var(--spacing-sm); }
.city-intro p { font-size: 1rem; color: var(--color-dark); }

/* What-to-expect on venue pages */
.what-to-expect {
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}
.what-to-expect h3 { font-size: 1.1rem; margin-bottom: var(--spacing-sm); }
.what-to-expect dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem var(--spacing-md); margin: 0; }
.what-to-expect dt { font-weight: 600; color: var(--color-gray); }
.what-to-expect dd { margin: 0; color: var(--color-dark); }
.what-to-expect .disclaimer {
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--color-gray);
    font-style: italic;
}

/* ===== HOMEPAGE SEARCH CARD (2026-11-13 redesign) =====================
   One outlined search field (icon + input + Search inside), "Near me" beside
   it, and a single aligned filter row: four equal selects, two chips and
   "Clear all". Every control is 44px with the same visible border.
   Scoped under .search-filter-card and placed last so it beats the generic
   .btn / .filters / .filter-select rules defined earlier in this file. */
.search-filter-card {
    padding: var(--spacing-md);
}
.search-filter-card .search-unified-group {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
    margin-bottom: 12px;
}
.search-filter-card .btn-nearme {
    background: var(--field-focus);
    color: var(--color-white);
    min-height: 52px;
    padding: 0 1.25rem;
    border-radius: 14px;
    box-shadow: none;
    font-size: 1rem;
}
.search-filter-card .btn-nearme:hover { background: #115E59; filter: none; }
.search-filter-card .btn-nearme:focus-visible { outline: 3px solid var(--field-ring); outline-offset: 2px; }

.search-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 4px 4px 4px 14px;
    background: var(--color-white);
    border: 1.5px solid var(--field-border);
    border-radius: 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-field:hover { border-color: var(--field-border-hover); }
.search-field:focus-within {
    border-color: var(--field-focus);
    box-shadow: 0 0 0 4px var(--field-ring);
}
.search-field-icon { flex-shrink: 0; color: var(--color-gray); }
.search-field:focus-within .search-field-icon { color: var(--field-focus); }
.search-filter-card .search-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-dark);
    outline: none;
}
.search-filter-card .search-input:focus { background: transparent; }
.search-filter-card .search-input::placeholder { color: #6B7280; }
.search-filter-card .search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-filter-card .search-go {
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 1.35rem;
    border-radius: 10px;
    font-size: 0.9375rem;
}

/* Filter row */
.search-filter-card .filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.search-filter-card .filter-select {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--field-border);
    border-radius: 12px;
    font-size: 0.9375rem;
    color: var(--color-dark);
    cursor: pointer;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-filter-card .filter-select:hover { border-color: var(--field-border-hover); }
.search-filter-card .filter-select:focus {
    border-color: var(--field-focus);
    box-shadow: 0 0 0 4px var(--field-ring);
}
.search-filter-card .birthday-filter-toggle {
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
}
.search-filter-card .birthday-filter-toggle:focus-within { box-shadow: 0 0 0 4px var(--field-ring); }
.btn-clear {
    height: 44px;
    padding: 0 6px;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-clear:hover { color: var(--color-dark); }
.btn-clear:focus-visible { outline: 3px solid var(--field-ring); outline-offset: 2px; border-radius: 6px; }

/* Narrow desktops / tablets: selects keep one row, chips move below */
@media (max-width: 1100px) {
    .search-filter-card .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .search-filter-card .filters .birthday-filter-toggle { justify-self: stretch; }
    .search-filter-card .filters .btn-clear { justify-self: end; grid-column: 4; }
}

/* Mobile: field on its own line; Near me + Filters share the next */
@media (max-width: 768px) {
    .search-filter-card { padding: var(--spacing-sm); }
    .search-filter-card .search-unified-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .search-filter-card .search-field { grid-column: 1 / -1; order: -1; }
    .search-filter-card .btn-nearme,
    .search-filter-card .filters-toggle { min-height: 44px; justify-content: center; }
    #filtersPanel.is-open { display: grid; }
    .search-filter-card .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-filter-card .filters .birthday-filter-toggle { min-width: 0; overflow: hidden; padding: 0 10px; gap: 6px; font-size: 0.875rem; }
    .search-filter-card .filter-select { font-size: 0.875rem; padding: 0 28px 0 10px; background-position: right 10px center; }
    .search-filter-card .filters-toggle {
        background: var(--color-white);
        color: var(--field-focus);
        border: 1.5px solid var(--field-focus);
        border-radius: 14px;
    }
    .search-filter-card .filters-toggle[aria-expanded="true"] { background: #EAF2FF; }
    .search-filter-card .filters .birthday-filter-toggle,
    .search-filter-card .filters .restaurant-filter-toggle { grid-column: auto; justify-self: stretch; justify-content: flex-start; }
    .search-filter-card .filters .birthday-filter-toggle span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .search-filter-card .filters .btn-clear { grid-column: 1 / -1; justify-self: center; }
}

/* ── Icons (sprite: assets/images/icons.svg, via icon() / owkIcon()) ── */
.icon {
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
    vertical-align: -0.16em;
    display: inline-block;
}
.icon-star { color: var(--color-star, #E8A100); }
.icon-pin  { color: var(--color-pin, var(--color-orange)); }
.nav-link .icon, .btn .icon { margin-right: 0.35em; }
.heading-icon { width: 1.1em; height: 1.1em; vertical-align: -0.14em; margin-right: 0.3em; color: var(--color-orange); }
.birthday-filter-toggle .icon, .restaurant-filter-toggle .icon { margin-right: 0.3em; }
@media (max-width: 600px) {
    .hero::before { width: 150px; height: 150px; top: -95px; right: -70px; }
    .hero::after  { width: 120px; height: 120px; bottom: -75px; left: -65px; }
}
