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

html {
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Better text rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent font size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    /* Safe area insets for notched devices */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    /* Background image set dynamically in base.html template */
    background-image: url('/static/blucifer.jpg'); /* fallback */
    background-size: 85%;
    background-position: center 18%;
    background-repeat: no-repeat;
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(30, 58, 138, 0.85) 0%, rgba(30, 58, 138, 0.6) 40%, rgba(30, 58, 138, 0.3) 70%, transparent 100%);
    pointer-events: none;
}

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

header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    font-weight: 900;
    font-family: Impact, 'Arial Black', 'Helvetica Inserat', 'Franklin Gothic Bold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Color set dynamically in base.html template */
    text-shadow: 3px 3px 0px rgba(0,0,0,0.8), 
                 -1px -1px 0px rgba(0,0,0,0.3);
    transform: skewY(-2deg);
}

header h1 a,
header h1 a:link,
header h1 a:visited,
header h1 a:hover,
header h1 a:active {
    /* Color set dynamically in base.html template */
    text-decoration: none !important;
    transition: opacity 0.2s;
}

header h1 a:hover {
    opacity: 0.9;
}

header .tagline {
    font-size: 1.4rem;
    opacity: 1;
    font-weight: 700;
    font-family: Impact, 'Arial Black', sans-serif;
    color: #ff8c42;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.7);
    letter-spacing: 0.03em;
}

header .subtagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: -webkit-sticky;
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    z-index: 20;
}

.filters-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filters-section h2 {
    margin-bottom: 0;
    color: #667eea;
}

.toggle-filters {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #667eea;
    transition: transform 0.3s;
}

.toggle-filters.collapsed .filter-icon {
    transform: rotate(-90deg);
    display: inline-block;
}

.filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 150px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    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='currentColor' stroke-width='2' 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.75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    background-color: white;
}

.filter-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Date Range Picker */
.date-range-container {
    width: 100%;
    margin-top: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.date-range-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 0.6rem;
    border: 2px solid #667eea;
    border-radius: 8px;
}

.date-range-control input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
    cursor: pointer;
    padding: 0;
    line-height: 1.2;
    min-width: 0;
    background-image: none;
    padding-right: 0;
}

.date-range-control input[type="text"]::placeholder {
    color: #6b7280;
}

.date-range-control input[type="text"]:focus {
    outline: none;
}

.date-input-group input[type="date"]:hover {
    border-color: #667eea;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Modern date picker styling */
.date-input-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
}

.date-input-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 2px solid #667eea;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.flatpickr-months {
    background: #667eea;
    border-radius: 6px 6px 0 0;
}

.flatpickr-current-month {
    color: white;
    font-weight: 600;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: white;
}

.flatpickr-weekday {
    color: #667eea;
    font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.flatpickr-day.inRange {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: none;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.flatpickr-day:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.flatpickr-day.today {
    border-color: #667eea;
}

.flatpickr-day.today:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* Make inputs look clickable */
.date-input-group input[type="text"] {
    cursor: pointer;
    background-color: white;
}

.date-input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.date-input-group input[type="text"]::placeholder {
    color: #9ca3af;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-secondary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Better focus states for accessibility */
select:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 1px;
}

/* Site Description */
.site-description {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-left: 4px solid #667eea; /* Default, overridden in template */
    border-radius: 4px;
}

.site-description p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Direct Answer for AI extraction */
.direct-answer {
    background: #fafafa;
    border-left: 2px solid var(--primary-color);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 8px;
}

.direct-answer p {
    margin: 0 0 .6rem 0;
    line-height: 1.6;
}

.direct-answer p:last-child {
    margin-bottom: 0;
}

.direct-answer .evidence,
.direct-answer .sources,
.direct-answer .last-updated {
    color: #4b5563;
    font-size: .95rem;
}

.direct-answer .local-proof-line {
    margin: 0.35rem 0 0 0;
    color: #4b5563;
    font-size: .95rem;
}

.direct-answer .local-context {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    font-size: .95rem;
    line-height: 1.5;
}

/* Featured weekend carousel */
.featured-weekend {
    margin: 2rem 0;
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.featured-header > div {
    text-align: center;
    width: 100%;
}

.featured-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1f2937;
    text-align: center;
}

.featured-header-link {
    color: var(--secondary-color);
    text-decoration: none;
}

.featured-header-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.featured-subtitle {
    margin: 0.25rem 0 0;
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
}

.featured-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 320px);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}

.featured-card {
    position: relative;
    height: 260px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #e5e7eb;
    background: #111827;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.featured-card-clickable {
    cursor: pointer;
}

.featured-card-clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.featured-card-clickable:active {
    transform: scale(1.01);
}

.featured-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    display: block;
}

.featured-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.featured-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    z-index: 1;
}

.featured-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    gap: 0.4rem;
    color: #f9fafb;
    z-index: 2;
    pointer-events: none;
}

.featured-rank {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #f9fafb;    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.featured-title {
    margin: 0;
    font-size: 1.05rem;
    color: #f9fafb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    margin: 0;
    font-size: 0.85rem;
    color: #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.featured-blurb {
    margin: 0;
    font-size: 0.85rem;
    color: #f3f4f6;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-venue {
    color: #f9fafb;
    text-decoration: none;
    pointer-events: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-venue:hover,
.featured-card-venue:focus-visible {
    text-decoration: underline;
}

.featured-card-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-cta {
    align-self: flex-start;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.featured-card-cta:hover,
.featured-card-cta:focus-visible {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.tm-logo-inline {
    width: 110px;
    height: auto;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Featured pages */
.breadcrumb {
    font-size: 0.85rem;
    margin: 1rem 0;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.featured-page {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.featured-page-header {
    max-width: 760px;
}

.featured-page-header h1 {
    margin-bottom: 0.5rem;
}

.featured-lede .lede {
    margin: 0.5rem 0 0.75rem 0;
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
}

.featured-lede .local-context {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.featured-lede .updated {
    margin: 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.home-lede .lede {
    margin: 0.5rem 0 0.75rem 0;
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
}

.home-lede .local-context {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.home-lede .updated {
    margin: 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.featured-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.featured-link {
    text-decoration: none;
    font-weight: 600;
}

.featured-nav {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.featured-nav-link {
    text-decoration: none;
    color: #6b7280;
}

.featured-weekend-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.featured-weekend-item {
    display: block;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.featured-weekend-item:first-child {
    border-top: none;
    padding-top: 0;
}

.featured-item-body h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #111827;
}

.featured-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0;
    margin: 0 0 0.75rem;
    list-style: none;
    color: #6b7280;
    font-size: 0.9rem;
}

.featured-facts li::after {
    content: "•";
    margin-left: 0.75rem;
}

.featured-facts li:last-child::after {
    content: "";
}

.featured-event-card {
    margin-bottom: 1.5rem;
}

.featured-tags {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.event-card-cta .tm-badge-inline {
    height: 14px;
    width: auto;
}

.event-card-cta-row {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.featured-footer {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.featured-footer-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.featured-footer-list a {
    text-decoration: none;
    font-weight: 600;
}

.featured-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 1.5rem;
    align-items: start;
    margin: 1.5rem 0;
}

.featured-hero-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

.featured-hero-details h2 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.featured-cta-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.featured-cta-inline {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.tm-badge-inline {
    height: 16px;
    width: auto;
    opacity: 0.9;
}

#upcoming-events {
    scroll-margin-top: 140px;
}

.featured-article p {
    margin: 0 0 1rem;
    color: #374151;
    line-height: 1.7;
    font-size: 1rem;
}

.featured-weekend-item .featured-article {
    margin-top: 0.75rem;
}

.featured-intro {
    color: #374151;
    line-height: 1.6;
}

.featured-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.featured-list-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid #e5e7eb;
}

.featured-list-item:first-child {
    border-top: none;
}

.featured-list-rank {
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
}

.featured-list-body h2 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: #111827;
}

.featured-list-meta {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.featured-list-blurb {
    margin: 0 0 0.5rem;
    color: #374151;
}

.featured-list-cta {
    display: inline-flex;
    align-items: center;
}

.featured-archive {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.featured-archive-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.featured-archive-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.featured-archive-list a {
    text-decoration: none;
    font-weight: 600;
}

.featured-archive-count {
    color: #6b7280;
    font-size: 0.85rem;
}

.archive-pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

/* Events Section */
.events-section {
    margin-bottom: 3rem;
}

.events-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.event-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-content {
    padding: 1.25rem;
}

.event-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.3;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.event-date,
.event-venue,
.event-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-dates-multiple {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.event-date-extra {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.event-date-more {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #e0e7ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.3rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.event-date-more:hover {
    background: #c7d2fe;
    transform: translateY(-1px);
}

.event-date-more:active {
    transform: translateY(0);
}

.all-dates-list {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.additional-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    gap: 1rem;
}

.additional-date-time {
    flex: 1;
    font-size: 0.85rem;
    color: #666;
}

.btn-date-tickets {
    padding: 0.4rem 0.8rem;
    background: #667eea;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-date-tickets:hover {
    background: #5568d3;
}

.event-category {
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #e0e7ff;
    color: #667eea;
}

.badge-free {
    background: #d1fae5;
    color: #059669;
}

.event-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.2rem 0.6rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

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

.no-events {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    color: #666;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: #667eea;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0 0 0.5rem 0;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

footer .footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

footer .footer-links a:hover {
    color: #fff;
}

footer .footer-links span {
    color: #6b7280;
}

footer .social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

footer .social-links a {
    color: #9ca3af;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

footer .social-links a:hover {
    color: #fff;
}

footer .social-links svg {
    width: 18px;
    height: 18px;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    footer .footer-links {
        flex-wrap: wrap;
    }
    
    footer .footer-links a {
        color: #e5e7eb;
        font-size: 0.9rem;
    }
    
    footer .footer-links span {
        color: #9ca3af;
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Header - More compact on mobile */
    header {
        padding: 2.5rem 0;
        margin-bottom: 1.5rem;
        min-height: 260px;
    }

    header {
        background-size: cover;
        background-position: center 23%;
    }

    header h1 {
        font-size: 3rem !important;
        line-height: 1.2;
        margin-bottom: 1rem !important;
    }

    header .tagline {
        font-size: 1.5rem !important;
        margin-top: 1rem !important;
    }

    header .subtagline {
        font-size: 0.85rem;
    }

    /* Filters - Mobile optimized */
    .filters-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .filters-header {
        margin-bottom: 0.75rem;
    }

    .filters-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    /* Show collapse button on mobile */
    .toggle-filters {
        display: none;
    }

    /* Collapsible filters on mobile */
    .filters.collapsed {
        display: none;
    }

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .filter-group {
        gap: 0.4rem;
    }

    .filter-group label {
        font-size: 0.875rem;
    }

    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        min-width: auto;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Checkbox filter - Larger touch target */
    .filter-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 0.75rem;
    }

    /* Buttons - Minimum 48px touch target */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        touch-action: manipulation;
    }
    
    /* Ensure card view buttons are consistent */
    .event-card .button-wrapper .btn-secondary {
        padding: 0.6rem 1.2rem !important;
        font-size: 1rem !important;
        width: auto !important;
    }

    /* Events Grid - Single column on mobile */
    .events-section {
        margin-bottom: 2rem;
    }

    .events-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Event Cards - Optimized for mobile */
    .event-card {
        border-radius: 12px;
    }

    .event-image {
        height: 180px;
    }

    .event-content {
        padding: 1rem;
    }

    .event-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .event-meta {
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .event-description {
        font-size: 0.875rem;
    }

    /* Tags and badges - Smaller on mobile */
    .badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }

    footer p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* No events message */
    .no-events {
        padding: 2rem 1rem;
    }

    /* Loading indicator */
    .loading {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    header {
        background-size: cover;
        background-position: center 20%;
        padding: 2rem 0;
        min-height: 180px;
    }
    
    header::after {
        background: linear-gradient(to right, rgba(30, 58, 138, 0.9) 0%, rgba(30, 58, 138, 0.7) 50%, rgba(30, 58, 138, 0.3) 100%);
    }

    header h1 {
        font-size: 1.6rem;
    }

    header .tagline {
        font-size: 0.95rem;
    }

    .filters-section {
        border-radius: 0;
        margin-left: -12px;
        margin-right: -12px;
        padding: 1rem 12px;
    }

    .event-card {
        border-radius: 8px;
    }

    .event-image {
        height: 160px;
    }

    .event-title {
        font-size: 1rem;
    }

    .events-section h2 {
        font-size: 1.25rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .event-card:hover {
        transform: none;
    }

    /* Active state for better touch feedback */
    .event-card:active {
        opacity: 0.9;
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }

    /* Larger tap targets */
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
    }

    /* Better spacing for touch */
    .filter-group {
        margin-bottom: 0.5rem;
    }

    /* Prevent tap highlight on iOS */
    * {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.1);
    }
}

/* Dark mode support (respects system preference) */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles in future */
    /* For MVP, keeping light mode only */
}

/* View Toggle */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.view-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.view-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* List View */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.event-photo-card {
    position: relative;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.event-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}

.event-card-link:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: -2px;
}

.event-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}

.event-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.event-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.15) 60%, transparent 100%);
    z-index: 2;
}

.event-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    gap: 0.35rem;
    color: #f9fafb;
    z-index: 3;
    pointer-events: none;
}

.event-card-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-subline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #e5e7eb;
    line-height: 1.3;
}

.event-card-venue,
.event-card-time {
    pointer-events: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card-venue {
    color: #f9fafb;
    text-decoration: none;
    max-width: 60%;
}

.event-card-venue:hover,
.event-card-venue:focus-visible {
    text-decoration: underline;
}

.event-card-time {
    color: #e5e7eb;
}

.event-card-cta {
    align-self: flex-end;
    pointer-events: auto;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: background 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.event-card-cta:hover,
.event-card-cta:focus-visible {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Venue hero */
.venue-hero {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
}

.venue-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.venue-hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.venue-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.venue-hero h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.venue-blurb {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #e5e7eb;
}

.venue-address a {
    color: #e5e7eb;
    text-decoration: underline;
}

.back-link {
    margin-top: 2rem;
    text-align: center;
}

.event-list-item {
    display: grid;
    grid-template-columns: 120px 200px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
    min-height: 120px;
}

.event-list-item:last-child {
    border-bottom: none;
}

.event-list-item:hover {
    background: #f9fafb;
}

.event-list-item .event-image,
.event-list-item .event-image-placeholder,
.event-list-item .event-meta,
.event-list-item .event-category,
.event-list-item .event-tags,
.event-list-item .event-description,
.event-list-item .event-price {
    display: none !important;
}

.list-event-image {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.list-event-image-placeholder {
    width: 200px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
}

.event-list-item .list-date-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.1rem;
    min-width: 120px;
}

.event-list-item .list-day {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-list-item .list-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.event-list-item .list-time {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.event-list-item .event-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.event-list-item .event-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-list-item .event-venue {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-list-item .event-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.event-list-item .btn-secondary {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Mobile adjustments for filters */
@media (max-width: 768px) {
    .filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        align-items: end;
    }

    .filters-section {
        padding: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input[type="text"] {
        font-size: 16px; /* Prevent zoom on iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .date-range-container {
        margin-top: 0;
        grid-column: 1 / -1;
    }

    .date-range-control {
        padding: 0.2rem 0.4rem;
        height: 28px;
    }

    .date-range-control input[type="text"] {
        font-size: 0.85rem;
        line-height: 1.05;
        height: 100%;
    }

    .featured-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-input-group input[type="date"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .date-range-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .date-input-group {
        width: 100%;
    }

    .featured-list-item {
        flex-direction: column;
    }

    .featured-archive-list li {
        flex-direction: column;
        gap: 0.25rem;
    }

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

    .featured-weekend-item {
        display: block;
    }

    .featured-links {
        flex-direction: column;
        align-items: flex-start;
    }

    #upcoming-events {
        scroll-margin-top: 120px;
    }
}

/* Mobile adjustments for list view */
@media (max-width: 768px) {
    .event-list-item {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .list-event-image,
    .list-event-image-placeholder {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .event-list-item .list-date-block {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .event-list-item .list-day,
    .event-list-item .list-date,
    .event-list-item .list-time {
        font-size: 0.85rem;
    }
    
    .event-list-item .event-content {
        width: 100%;
    }
    
    .event-list-item .event-title {
        font-size: 1.1rem;
        white-space: normal;
        overflow: visible;
        margin-bottom: 0.5rem;
    }
    
    .event-list-item .event-venue {
        white-space: normal;
        overflow: visible;
        margin-bottom: 0.75rem;
    }
    
    .event-list-item .event-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .event-list-item .event-actions-tm {
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
    }
    
    .event-list-item .tm-logo-list {
        height: 16px;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .event-list-item .btn-secondary {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100%;
        text-align: center;
        min-height: 48px;
    }
    
    .event-list-item .button-wrapper {
        width: 100%;
    }
    
    .event-list-item .button-wrapper .btn-secondary {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100%;
    }

    .event-photo-card {
        height: 210px;
    }

    .event-card-overlay {
        padding: 0.85rem;
    }

    .event-card-title {
        font-size: 1rem;
    }

    .event-card-subline {
        font-size: 0.85rem;
    }

    .event-card-cta {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .venue-hero {
        height: 220px;
    }

    .venue-hero h1 {
        font-size: 1.5rem;
    }
}

/* Ticketmaster Branding */

/* Card/Tile View - Logo to the RIGHT of button */
.event-cta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1rem;
}

.event-cta-tm {
    gap: 2rem; /* Generous white space between button and logo */
}

.tm-logo-card {
    height: 20px;
    min-height: 12px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 2rem; /* Extra white space on left */
}

.tm-logo-hidden {
    visibility: hidden;
}

/* List View - Logo to the LEFT of button */
.event-actions-tm {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Generous white space between logo and button */
}

.event-actions-tm .btn-secondary {
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
}

.tm-logo-list {
    height: 16px;
    min-height: 12px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 1.5rem; /* Extra white space on right */
}

/* Button wrapper with "Official Tickets" text on top */
.button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.button-wrapper .btn-secondary {
    /* Ensure all buttons have same explicit dimensions */
    padding: 0.6rem 1.2rem !important;
    font-size: 1rem !important;
    margin: 0;
}

.official-tickets-text {
    font-size: 0.5rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
