/* Public Interface CSS Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: white;
    --border-color: #ddd;
    --header-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --input-bg: white;
    --input-border: #ddd;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --header-gradient: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    --shadow: 0 2px 15px rgba(0,0,0,0.3);
    --input-bg: #3a3a3a;
    --input-border: #555;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 33% 66%;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.filters-column {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.results-column {
    min-height: 100vh;
}

/* Header Styles */
.main-header {
    background: var(--header-gradient);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.header-controls {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-icon {
    font-size: 1.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

/* Filters Section */
.filters-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.filters-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.filters-form .filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.filter-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-actions .btn {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
}

/* Results Section */
.results-section {
    /* Remove margin since it's now in grid */
    /* overflow-y: scroll;
    height: 640px; */
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-header h2 {
    color: var(--text-color);
    font-size: 1.5rem;
}

/* Events Grid */
.events-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); */
    grid-template-columns: auto;
    gap: 2rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    /***********/
    /* display: grid;
    grid-template-columns: 33% 66%;
    align-items: start; */
    /***********/
}

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

.event-image {
    /* height: 200px; */
    height: -webkit-fill-available;
    overflow: hidden;
}

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

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

.event-content {
    padding: 1.5rem;
}

.event-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.event-meta {
    margin-bottom: 1rem;
}

.event-meta > div {
    margin-bottom: 0.5rem;
    color: #555;
}

.event-dates,
.event-location {
    font-size: 0.95rem;
}

.camping-badge {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.event-artists {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.event-artists strong {
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.event-artists p {
    color: #555;
    margin: 0;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.no-results h3 {
    color: #666;
    margin-bottom: 1rem;
}

.no-results p {
    color: #888;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

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

.main-footer a {
    color: #007bff;
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Event Details Page */
.event-details-page {
    margin: 2rem 0;
}

.back-navigation {
    margin-bottom: 2rem;
}

.event-detail-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    /* max-width: 1000px; */
    margin: 0 auto;
    /*******/
    display: flex;
    align-items: center;
}

.event-detail-image {
    /* height: 400px; */
    height: -webkit-fill-available;
    overflow: hidden;
    width: -webkit-fill-available;
}

.event-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-detail-content {
    padding: 3rem;
}

.event-detail-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 700;
}

.event-detail-meta {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 5px solid #007bff;
}

.meta-item {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item strong {
    display: inline-block;
    width: 150px;
    color: #333;
}

.camping-status.yes {
    color: #28a745;
    font-weight: 600;
}

.camping-status.no {
    color: #dc3545;
    font-weight: 600;
}

.event-detail-description {
    margin-bottom: 2rem;
}

.event-detail-description h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.event-detail-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.event-detail-artists {
    margin-bottom: 2rem;
}

.event-detail-artists h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.artists-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.artist-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.event-detail-actions {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.location-link {
    color: #007bff;
    text-decoration: none;
    margin-left: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.location-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Loading state */
.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }

    .main-header p {
        font-size: 1rem;
    }

    /* Switch to single column layout on mobile */
    .main-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-column {
        position: static;
        max-height: none;
        order: 1;
    }

    .results-column {
        order: 2;
        min-height: auto;
    }

    .filters-section {
        padding: 1rem;
    }

    .filter-actions {
        flex-direction: row;
        gap: 1rem;
    }

    .filter-actions .btn {
        width: auto;
        flex: 1;
    }

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

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

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-grid {
        gap: 0.5rem;
    }

    .filters-section,
    .event-card {
        margin: 1rem 0;
    }

    .event-content {
        padding: 1rem;
    }

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

    .filter-actions .btn {
        width: 100%;
    }
}
