/*
 * Festivals listing styles, linked in <head> via $GLOBALS['page_stylesheets'] (includes/header.php).
 *
 * Moved verbatim from an inline <style> block in festivals.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 */
.festivals-hero {
    position: relative;
    padding: 50px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.festivals-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcc00 100%);
    z-index: -2;
}

.festivals-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(15,15,26,0.9) 100%);
    z-index: -1;
}

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

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

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

.stat-box {
    text-align: center;
    padding: 15px 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffcc00;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Filters */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.filter-group select {
    padding: 10px 35px 10px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.clear-filters {
    color: var(--pink);
    text-decoration: none;
    font-size: 0.9rem;
}

.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Section Title */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.featured-festival-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.featured-festival-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255,107,53,0.2);
    border-color: #ff6b35;
}

/* Festivals Grid */
.festivals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.festival-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.festival-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border-color: var(--pink);
}

.festival-link {
    display: block;
    text-decoration: none;
}

.festival-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder span {
    font-size: 3rem;
    font-family: 'Bangers', cursive;
    color: rgba(255,255,255,0.3);
}

.free-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    background: #1ed760;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 15px;
    text-transform: uppercase;
}

.festival-date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.8);
    border-radius: 10px;
    text-align: center;
}

.festival-date-badge .month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #ff6b35;
}

.festival-date-badge .day {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
}

.festival-date-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.date-main {
    font-weight: bold;
    font-size: 1.1rem;
}

.date-range {
    font-size: 0.9rem;
    opacity: 0.8;
}

.festival-content {
    padding: 20px;
}

.festival-content h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.3;
}

.festival-content h3 a {
    color: inherit;
    text-decoration: none;
}

.festival-content h3 a:hover {
    color: #ff6b35;
}

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

.festival-location svg {
    opacity: 0.6;
}

.festival-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.meta-item::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.meta-item:first-child::before {
    display: none;
}

.festival-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.genre-tag {
    padding: 4px 10px;
    background: rgba(255,107,53,0.15);
    color: #ff6b35;
    border-radius: 12px;
    font-size: 0.75rem;
}

.festival-actions {
    display: flex;
    gap: 10px;
}

.festival-actions .btn {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-tickets {
    background: #ff6b35;
    color: white;
}

.btn-tickets:hover {
    background: #e55a25;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

/* Featured card specific */
.featured-festival-card .festival-info {
    padding: 20px;
}

.featured-festival-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.featured-festival-card .festival-genres {
    font-size: 0.85rem;
    color: #ff6b35;
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 30px;
    background: var(--card-bg);
    border-radius: 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-results h2 {
    margin: 0 0 15px;
}

.no-results p {
    color: var(--text-muted);
    margin: 0 0 25px;
}

.no-results .btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
}

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

.page-link {
    padding: 12px 24px;
    background: var(--card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.page-link:hover {
    background: #ff6b35;
    color: white;
}

.page-info {
    color: var(--text-muted);
}

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

    .hero-stats {
        gap: 20px;
    }

    .stat-box {
        padding: 12px 18px;
    }

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

    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-form {
        width: 100%;
    }

    .filter-group {
        flex: 1;
    }

    .filter-group select {
        width: 100%;
    }

    .festivals-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .festivals-hero {
        padding: 40px 0 35px;
    }

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

    .festival-actions {
        flex-direction: column;
    }
}

/* ===== Light Mode Overrides ===== */
[data-theme="light"] .festivals-hero,
[data-theme="light"] .festivals-hero .hero-bg { color: #1a1a2e; }
[data-theme="light"] .festivals-hero h1 { color: #1a1a2e; text-shadow: none; }
[data-theme="light"] .festivals-hero .subtitle,
[data-theme="light"] .festivals-hero p { color: #555; }


[data-theme="light"] .festivals-hero h1 { color: #fff; text-shadow: 3px 3px 0 rgba(0,0,0,0.2); }
[data-theme="light"] .festivals-hero .subtitle { color: rgba(255,255,255,0.9); }
[data-theme="light"] .stat-box { background: rgba(255,255,255,0.2); }
[data-theme="light"] .filters-bar { border-color: #e0e0e0; }
[data-theme="light"] .filter-group label { color: #666; }
[data-theme="light"] .filter-group select { background: #fff; border-color: #ddd; color: #333; }
[data-theme="light"] .clear-filters { color: #8338EC; }
[data-theme="light"] .results-count { color: #666; }
[data-theme="light"] .section-title { color: #1a1a2e; }
[data-theme="light"] .featured-festival-card { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
[data-theme="light"] .featured-festival-card:hover { box-shadow: 0 15px 40px rgba(255,107,53,0.15); }
[data-theme="light"] .festival-card { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
[data-theme="light"] .festival-card:hover { box-shadow: 0 15px 40px rgba(0,0,0,0.12); }

/* ===== End Light Mode ===== */
