/*
 * Venues directory styles, linked in <head> via $GLOBALS['page_stylesheets'] (includes/header.php).
 *
 * Moved verbatim from an inline <style> block in venues.php on 2026-10-24. Emitted
 * after the content it styles, it let the browser paint that content without
 * these rules and then reflow it whenever the HTML arrived in more than one
 * piece: the desktop CLS class fixed for gig pages in #1782 (see gig.css).
 */

/* Hero */
.venues-hero {
    position: relative;
    padding: 50px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.venues-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: -2;
}

.venues-hero .hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,0,110,0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(131,56,236,0.3) 0%, transparent 50%);
}

.venues-hero .hero-content {
    position: relative;
    z-index: 1;
}

.venues-hero h1 {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    color: white;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    margin: 0 0 10px;
    letter-spacing: 2px;
}

.venues-hero .subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 30px;
}

.hero-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pink);
}

.stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.title-icon {
    font-size: 1.3rem;
}

/* Featured Venues Grid */
.featured-venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.venue-card {
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.venue-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.venue-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.venue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.venue-card:hover .venue-image img {
    transform: scale(1.05);
}

.venue-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.venue-type {
    background: var(--pink);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.venue-info {
    padding: 20px;
}

.venue-info h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.venue-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 5px;
}

.venue-capacity {
    color: var(--pink);
    font-size: 0.85rem;
    margin: 0;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3a3a4a, #2a2a3a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder span {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* City Cards Grid */
.city-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.city-venue-card {
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, rgba(131,56,236,0.2), rgba(255,0,110,0.2));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s;
}

.city-venue-card:hover {
    background: linear-gradient(135deg, rgba(131,56,236,0.4), rgba(255,0,110,0.4));
    transform: translateY(-5px);
    border-color: var(--pink);
}

.city-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.city-venue-card h3 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.city-state {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 10px;
}

.venue-count {
    color: var(--pink);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--pink);
}

.filter-select {
    padding: 14px 20px;
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--pink);
}

.filter-btn {
    padding: 14px 25px;
    background: var(--pink);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: var(--purple);
}

.clear-filters {
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.clear-filters:hover {
    color: var(--pink);
}

.results-count {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 10px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results .btn {
    margin-top: 15px;
    display: inline-block;
    padding: 12px 25px;
    background: var(--pink);
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    background: rgba(255,0,110,0.2);
    border-color: var(--pink);
}

.page-link.active {
    background: var(--pink);
    border-color: var(--pink);
    color: white;
}

.page-link.prev,
.page-link.next {
    padding: 0 20px;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 5px;
}

/* Sort Controls */
.sort-section {
    padding: 0 0 15px;
}

.sort-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 4px;
}

.sort-btn {
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.sort-btn:hover {
    color: var(--text-color);
    border-color: var(--border-color);
}

.sort-btn.active {
    background: linear-gradient(135deg, var(--purple, #8338EC), var(--pink, #FF006E));
    color: white;
    border-color: transparent;
}

/* Venues List */
.venues-list {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
}

.venue-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

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

.venue-row:hover {
    background: rgba(131, 56, 236, 0.08);
}

.venue-row:nth-child(even) {
    background: rgba(131, 56, 236, 0.03);
}

.venue-row:nth-child(even):hover {
    background: rgba(131, 56, 236, 0.08);
}

.venue-row__name {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venue-row__location {
    width: 180px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.venue-row__type {
    width: 80px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.venue-row__gigs {
    width: 80px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: right;
    white-space: nowrap;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
}

.cta-box h2 {
    color: white;
    margin: 0 0 15px;
    font-size: 1.8rem;
}

.cta-box p {
    color: rgba(255,255,255,0.9);
    margin: 0 0 25px;
    font-size: 1.1rem;
}

.btn-white {
    display: inline-block;
    padding: 14px 35px;
    background: white;
    color: var(--purple);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-white:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .venues-hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat-box {
        padding: 15px 30px;
    }

    .stat-num {
        font-size: 2rem;
    }

    .featured-venues-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-bar {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .venue-row__type,
    .venue-row__gigs {
        display: none;
    }

    .venue-row__location {
        width: auto;
        flex-shrink: 1;
    }

    .venue-row {
        padding: 10px 15px;
    }

    .sort-controls {
        gap: 6px;
    }

    .sort-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .cta-box {
        padding: 35px 25px;
    }
}

@media (max-width: 480px) {
    .venues-hero {
        padding: 30px 15px 25px;
    }

    .venues-hero h1 {
        font-size: 2rem;
    }

    .city-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .city-venue-card {
        padding: 20px 15px;
    }

    .city-icon {
        font-size: 2rem;
    }

    .pagination {
        gap: 5px;
    }

    .page-link {
        min-width: 40px;
        height: 40px;
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .page-link.prev,
    .page-link.next {
        padding: 0 12px;
        font-size: 0.85rem;
    }
}

/* Light mode overrides */
[data-theme="light"] .venues-hero .hero-bg {
    background: linear-gradient(135deg, #e8e0ff 0%, #f0e6ff 50%, #ddd6fe 100%);
}
[data-theme="light"] .venues-hero .hero-bg::before {
    background: radial-gradient(circle at 20% 80%, rgba(255,0,110,0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(131,56,236,0.08) 0%, transparent 50%);
}
[data-theme="light"] .venues-hero h1 {
    color: #1a1a2e;
    text-shadow: none;
}
[data-theme="light"] .venues-hero .subtitle {
    color: #555;
}
[data-theme="light"] .hero-stats .stat-number {
    color: #8338EC;
}
[data-theme="light"] .hero-stats .stat-label {
    color: #666;
}
[data-theme="light"] .venue-card {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] .venue-card h3,
[data-theme="light"] .venue-card h3 a {
    color: #1a1a2e;
}
[data-theme="light"] .venue-info,
[data-theme="light"] .venue-meta,
[data-theme="light"] .venue-card p {
    color: #555;
}
[data-theme="light"] .filter-bar,
[data-theme="light"] .search-box {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    color: #333;
}
[data-theme="light"] .filter-bar input,
[data-theme="light"] .search-box input {
    background: #f8f7ff;
    color: #333;
    border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .city-filter a,
[data-theme="light"] .filter-tag {
    background: rgba(131,56,236,0.08);
    color: #6b21a8;
    border-color: rgba(131,56,236,0.15);
}
[data-theme="light"] .city-filter a.active,
[data-theme="light"] .filter-tag.active {
    background: #8338EC;
    color: #fff;
}

[data-theme="light"] .section-title {
    color: #1a1a2e;
}
[data-theme="light"] .container {
    color: #333;
}
[data-theme="light"] .venue-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
}
[data-theme="light"] .venue-type-badge {
    background: rgba(131,56,236,0.9);
    color: #fff;
}
[data-theme="light"] .venue-location {
    color: #666;
}
[data-theme="light"] .venue-gig-count {
    color: #555;
}
[data-theme="light"] .section {
    color: #333;
}
[data-theme="light"] .pagination a {
    background: #fff;
    color: #333;
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .pagination .active {
    background: #8338EC;
    color: #fff;
}
[data-theme="light"] .hero-stats .stat-box {
    background: rgba(255,255,255,0.85);
    border-color: rgba(0,0,0,0.1);
}

/* Venue type chips (/venues/?type=). Base .ch-chip lives in style.css. */
.venue-type-chips { margin: 0 0 16px; }
.venue-type-chips .ch-chip.is-active { border-color: var(--primary); color: var(--text-primary); }
