/* ==========================================================================
   CityHub Listings — v2

   CSS custom properties (set inline by PHP on wrapper elements):
     --cityhub-accent  — City accent color (gold for Milan, teal for others, etc.)
     --cityhub-bg      — City background tint (used in gradients)
     --filter-color    — Per-button category color on map filter pills

   Sections:
     1. Listings wrapper & parallax background
     2. Decorative accent circles
     3. Category accordion (header, toggle switch, body)
     4. Venue rows (desktop: horizontal with pipe separators)
     5. Buttons (save list, add to maps, see more)
     6. City map (Leaflet container, filter pills, markers, popups)
     7. Mobile breakpoint (<=768px — stacked layout, pipes hidden)
   ========================================================================== */

.cityhub-listings {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #ffffff 0%, var(--cityhub-bg, #f5e6c8) 300px);
    color: #1a1a1a;
}

/* ==========================================================================
   Parallax background — fades from white to city color
   ========================================================================== */

.cityhub-listings::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff 0%, var(--cityhub-bg, #f5e6c8) 400px);
    z-index: -1;
}

/* ==========================================================================
   Category Accordion
   ========================================================================== */

.cityhub-category {
    position: relative;
}

.cityhub-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: transparent;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.cityhub-category__name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #1a1a1a;
}

.cityhub-category__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cityhub-category__accent-line {
    height: 3px;
    background: var(--cityhub-accent, #6ec6c0);
}

/* Toggle switch */
.cityhub-category__toggle-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #1a1a1a;
}

.cityhub-category__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.cityhub-toggle__track {
    display: block;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s ease;
}

.cityhub-category--open .cityhub-toggle__track {
    background: var(--cityhub-accent, #6ec6c0);
}

.cityhub-toggle__thumb {
    display: block;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cityhub-category--open .cityhub-toggle__thumb {
    transform: translateX(20px);
}

/* Body — hidden by default, shown when open */
.cityhub-category__body {
    display: none;
    background: transparent;
    padding: 0 30px 20px;
}

.cityhub-category--open .cityhub-category__body {
    display: block;
}

/* ==========================================================================
   Venue Row — Desktop: horizontal with pipe separators
   ========================================================================== */

.cityhub-venue-list {
    padding: 0;
}

.cityhub-venue-wrapper {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cityhub-venue-wrapper:last-child {
    border-bottom: none;
}

.cityhub-venue--hidden {
    display: none;
}

.cityhub-venue {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    gap: 20px;
}

.cityhub-venue__content {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.cityhub-venue__name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

a.cityhub-venue__name {
    transition: color 0.2s ease;
}

a.cityhub-venue__name:hover {
    color: var(--cityhub-accent, #c9b037);
}

.cityhub-venue__sep {
    color: #ccc;
    padding: 0 12px;
    font-weight: 300;
    font-size: 16px;
}

.cityhub-venue__address {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.cityhub-venue__district {
    font-size: 13px;
    color: #555;
    font-style: italic;
    white-space: nowrap;
}

.cityhub-venue__icon {
    display: inline-flex;
    align-items: center;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.cityhub-venue__icon:hover {
    color: var(--cityhub-accent, #6ec6c0);
}

.cityhub-venue__page {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.cityhub-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Venue buttons container */
.cityhub-venue__buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* Pill outline button — Save List + Add to Google Maps + Apple Maps */
.cityhub-btn--save-list,
.cityhub-btn--maps,
.cityhub-btn--apple {
    background: transparent;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 22px;
    border: 2px solid #1a1a1a;
    border-radius: 30px;
    white-space: nowrap;
}

.cityhub-btn--save-list:hover,
.cityhub-btn--maps:hover,
.cityhub-btn--apple:hover {
    background: var(--cityhub-accent, #6ec6c0);
    border-color: var(--cityhub-accent, #6ec6c0);
    color: #fff;
}

/* See More — wide gold/amber pill */
.cityhub-btn--see-more {
    display: block;
    width: 100%;
    background: #d4a84b;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding: 18px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}

.cityhub-btn--see-more:hover {
    background: #c49a3f;
}

.cityhub-arrow {
    font-size: 16px;
    margin-left: 6px;
}

/* ==========================================================================
   City Map
   ========================================================================== */

.cityhub-map-wrapper {
    margin: 0 auto 30px;
    max-width: 1400px;
}

.cityhub-map {
    width: 100%;
    border-radius: 12px;
    z-index: 0;
}

.cityhub-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 30px;
}

.cityhub-map-filter {
    background: transparent;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 2px solid #ccc;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.cityhub-map-filter:hover {
    border-color: var(--filter-color, var(--cityhub-accent));
    color: var(--filter-color, var(--cityhub-accent));
}

.cityhub-map-filter--active {
    background: var(--filter-color, var(--cityhub-accent));
    border-color: var(--filter-color, var(--cityhub-accent));
    color: #fff;
}

/* Custom marker icon */
.cityhub-marker {
    background: none !important;
    border: none !important;
}

/* Popup styling */
.cityhub-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.cityhub-popup strong {
    font-size: 14px;
    text-transform: uppercase;
}

.cityhub-popup a {
    color: var(--cityhub-accent, #c9b037);
    text-decoration: none;
}

.cityhub-popup a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Mobile (<=768px) — stacked cards
   ========================================================================== */

@media (max-width: 768px) {
    .cityhub-category__header {
        padding: 18px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .cityhub-category__name {
        font-size: 20px;
    }

    .cityhub-category__actions {
        gap: 12px;
        flex-wrap: wrap;
    }

    .cityhub-category__body {
        padding: 0 16px 16px;
    }

    .cityhub-venue {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0;
        gap: 8px;
    }

    /* Row layout with flex order: name+icons+page on line 1, address on line 2 */
    .cityhub-venue__content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
    }

    /* Hide pipe separators on mobile */
    .cityhub-venue__sep {
        display: none;
    }

    /* Line 1: name + icons + page */
    .cityhub-venue__name {
        font-size: 14px;
        order: 1;
    }

    .cityhub-venue__icon {
        order: 2;
        display: inline-flex;
    }

    .cityhub-venue__page {
        order: 3;
        display: inline-flex;
    }

    /* Line 2: address + district — full width forces new line */
    .cityhub-venue__address {
        order: 4;
        flex-basis: 100%;
    }

    .cityhub-venue__district {
        order: 5;
        flex-basis: 100%;
    }

    /* Buttons — smaller on mobile */
    .cityhub-btn--maps,
    .cityhub-btn--apple {
        font-size: 10px;
        padding: 8px 14px;
    }

}
