/* Event Page Styles */
.events-page {
    min-height: 100vh;
    background: #0f1419;
    margin-top: 0;
}

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

/* Hero Section */
.events-hero {
    background: linear-gradient(135deg, #0f1419 0%, #16202b 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 153, 0, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.events-hero .container {
    position: relative;
    z-index: 2;
}

.events-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
    color: #ffffff;
}

.events-hero p {
    font-size: 1.2rem;
    opacity: 0.85;
    color: #d1d5db;
}

/* Filters */
.events-filters {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    margin-bottom: 0;
}

.search-section {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
    align-items: center;
}

.search-box {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff9900;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff9900;
    background: rgba(255, 255, 255, 0.15);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid #ff9900;
    border-radius: 50%;
    color: #ff9900;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px;
    z-index: 10;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#clear-search:hover {
    background: #ff9900;
    color: white;
}

.search-spinner {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff9900;
    font-size: 1rem;
    z-index: 2;
}

.filter-dropdowns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-dropdowns select,
#category-filter,
#county-filter,
#mode-filter {
    min-width: 180px;
    max-width: 220px;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-dropdowns select:focus,
#category-filter:focus,
#county-filter:focus,
#mode-filter:focus {
    outline: none;
    border-color: #ff9900;
    background: rgba(255, 255, 255, 0.15);
}

.filter-dropdowns select option,
#category-filter option,
#county-filter option,
#mode-filter option {
    background: #16202b;
    color: #ffffff;
    padding: 8px;
}

.filter-dropdowns select[style*="display: none"] {
    display: none !important;
}

.filter-dropdowns select:not([style*="display: none"]) {
    display: block;
}

.filter-tabs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff9900;
    color: #ffffff;
    border-color: #ff9900;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

/* Events Grid */
.events-grid {
    padding: 40px 0;
    display: block;
    visibility: visible;
    margin-top: 20px;
    scroll-margin-top: 200px;
}

.events-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    flex-direction: column;
    visibility: visible;
    scroll-margin-top: 150px;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 153, 0, 0.15);
    border-color: #ff9900;
}

.event-card.past-event {
    opacity: 0.7;
}

.event-card.past-event::after {
    content: 'Past Event';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

.event-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.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: 2rem;
    flex: 1;
}

.event-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.3;
}

.event-meta {
    margin-bottom: 15px;
}

.event-date,
.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9rem;
}

.event-date i,
.event-location i {
    color: #ff9900;
    width: 18px;
}

.event-date,
.event-location {
    color: #d1d5db;
    font-size: 0.9rem;
}

.event-description {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.event-footer {
    padding: 1rem 1.5rem;
    background: #0a0e13;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-rating .stars {
    display: flex;
    gap: 1px;
}

.event-rating .stars i {
    color: #666;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.event-rating .stars i.active {
    color: #ffc107;
}

.event-rating .rating-value {
    color: #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

.event-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
}

.event-views i {
    color: #ff9900;
    font-size: 0.75rem;
}

.event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}



.register-btn {
    background: #ff9900;
    color: white;
}

.register-btn:hover {
    background: #e88b00;
    color: white;
}

.details-btn {
    background: transparent;
    color: #ff9900;
    border: 1px solid #ff9900;
}

.details-btn:hover {
    background: #ff9900;
    color: white;
}

/* No Events */
.no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #d1d5db;
}

.no-events i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: #ff9900;
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.no-events-filtered {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    margin: 20px 0;
}

.no-events-filtered i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff9900;
    opacity: 0.7;
}

.no-events-filtered h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.no-events-filtered p {
    margin-bottom: 25px;
    color: #d1d5db;
}

.btn-clear-filters {
    background: #ff9900;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-filters:hover {
    background: #e88b00;
    transform: translateY(-2px);
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover {
    color: #000;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-info {
    text-align: center;
    color: #d1d5db;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

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

.pagination-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #ff9900;
    border-color: #ff9900;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.page-number {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.page-number:hover,
.page-number.active {
    background: #ff9900;
    border-color: #ff9900;
}

.page-dots {
    color: #d1d5db;
    padding: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .events-hero {
        padding: 60px 0;
    }
    
    .events-hero h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .events-hero p {
        font-size: 1rem;
    }
    
    .events-filters {
        padding: 20px 0;
    }
    
    .search-section {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .search-box input {
        padding: 14px 45px 14px 45px;
        font-size: 16px;
    }
    
    .filter-dropdowns {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 10px;
    }
    
    .filter-dropdowns select {
        padding: 14px 15px;
        font-size: 16px;
        width: 100%;
        min-width: auto;
        max-width: none;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        padding: 0 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .events-grid {
        padding: 30px 0;
    }
    
    .events-grid .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
        max-width: 100%;
    }
    
    .event-card {
        margin: 0;
    }
    
    .event-content {
        padding: 1.5rem;
    }
    
    .event-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .event-stats {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    .event-actions {
        gap: 10px;
    }
    
    .register-btn,
    .details-btn {
        width: auto;
        min-width: 120px;
        text-align: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .events-page .container {
        padding: 0 10px;
    }
    
    .events-hero {
        padding: 50px 0;
    }
    
    .events-hero h1 {
        font-size: 1.75rem;
    }
    
    .events-hero p {
        font-size: 0.9rem;
    }
    
    .events-filters {
        padding: 15px 0;
    }
    
    .search-section {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .search-box input,
    .filter-dropdowns select {
        padding: 12px 40px 12px 40px;
        font-size: 16px;
    }
    
    .filter-dropdowns {
        gap: 10px;
    }
    
    .filter-tabs {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .events-grid {
        padding: 20px 0;
    }
    
    .events-grid .container {
        padding: 0 10px;
        gap: 15px;
    }
    
    .event-content {
        padding: 1.25rem;
    }
    
    .event-title {
        font-size: 1.2rem;
    }
    
    .event-actions {
        padding: 1rem 1.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .no-events {
        padding: 40px 15px;
    }
    
    .no-events i {
        font-size: 3rem;
    }
    
    .no-events h3 {
        font-size: 1.25rem;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-btn {
        padding: 12px 24px;
    }
    
    .event-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .event-meta {
        font-size: 0.85rem;
    }
    
    .event-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .events-page .container {
        padding: 0 5px;
    }
}