/* Events Page Styles */

/* Page Layout */
.events-page {
    padding: 2rem 0;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-container {
    background-color: var(--bg-light);
    border-radius: 2rem;
    padding: 0.25rem;
    display: inline-flex;
    border: 1px solid var(--evborder-color);
    position: relative;
}

.filter-button {
    border: none;
    background: none;
    color: var(--color-text-primary);
    font-weight: 500;
    padding: 0.6rem 2rem;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin: 0 2px;
    font-family: inherit;
}

html[data-theme="dark"] .filter-button,
body[data-theme="dark"] .filter-button {
    color: rgba(255, 255, 255, 0.678);
}

.filter-button.active {
    background-color: #3b82f6;
    color: white !important;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

.filter-button:hover:not(.active) {
    color: var(--light-text); 
    background-color: rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .filter-button:hover:not(.active) {
    color: var(--light-text);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Event Card */
.event-card {
    background-color: var(--color-bg-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--color-text-primary);
}

html[data-theme="dark"] .event-card {
    background-color: #141c2f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.event-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #3b82f6;
    color: white;
    padding: 1rem;
    min-width: 80px;
    text-align: center;
    font-weight: 700;
}

/* Colored date boxes */
.blue-date {
    background-color: #3b82f6; /* Blue */
}

.green-date {
    background-color: #10b981; /* Green */
}

.purple-date {
    background-color: #8b5cf6; /* Purple */
}

.date-number {
    font-size: 2rem;
    line-height: 1;
}

.date-month {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.event-details {
    padding: 1.5rem;
    flex: 1;
}

.event-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

html[data-theme="dark"] .event-title {
    color: white;
}

.event-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.event-meta i {
    margin-right: 0.25rem;
}

.event-description {
    margin-bottom: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-attendees {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.register-button, .recap-button {
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.register-button {
    background-color: #3b82f6;
    color: white;
    font-family: inherit;
}

.recap-button {
    background-color: transparent;
    color: #3b82f6; 
    border: 1px solid #3b82f6;
    font-family: inherit;
}

.register-button:hover {
    background-color: #2563eb;
}

.recap-button:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Workshop Series */
.workshop-series-section {
    margin-top: 2rem;
    padding: 0;
    color: var(--color-text-primary);
}

.workshop-item {
    padding: 1.5rem;
    margin: 20px 0px;
    position: relative;
    background-color: var(--color-bg-primary);
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .workshop-item {
    background-color: #141c2f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.blue-border {
    border-left-color: #3b82f6;
}

.green-border {
    border-left-color: #10b981;
}

.purple-border {
    border-left-color: #8b5cf6;
}

/* Fix contrast for date box text */
.date-number {
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 700;
    color: white; 
}

.date-month {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 700;
    color: white; 
}

.workshop-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    font-size: 1.25rem;
}

html[data-theme="dark"] .workshop-title {
    color: white; 
}

/* Colored workshop titles to match borders */
.blue-border .workshop-title {
    color: #3b82f6; /* Blue */
}

.green-border .workshop-title {
    color: #10b981; /* Green */
}

.purple-border .workshop-title {
    color: #8b5cf6; /* Purple */
}

html[data-theme="dark"] .blue-border .workshop-title,
html[data-theme="dark"] .green-border .workshop-title,
html[data-theme="dark"] .purple-border .workshop-title {
    color: white; 
}

.workshop-schedule {
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

html[data-theme="dark"] .workshop-schedule {
    color: #8cabd9; 
}

.workshop-description {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

html[data-theme="dark"] .workshop-description {
    color: #a8b6cf; 
}

.workshop-register {
    color: #3b82f6; 
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}

.workshop-register:hover {
    text-decoration: underline;
    color: #2563eb; 
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .events-header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap; 
        gap: 8px; 
    }
    
    .page-title {
        font-size: 1.5rem; 
        margin-right: 8px; 
        max-width: calc(100% - 120px); 
    }
    
    .filter-container {
        display: none;
    }
    
    .mobile-filter-button {
        display: inline-block;
        background-color: #3b82f6;
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 1.5rem;
        font-weight: 500;
        font-size: 0.85rem;
        box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
        cursor: pointer;
        font-family: inherit;
        white-space: nowrap; 
        flex-shrink: 0;
        min-width: 100px;
    }
    
    .mobile-filter-button:active {
        transform: translateY(1px);
    }
    
    .event-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .event-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .register-button, .recap-button {
        width: 100%;
    }
}

/* Hide mobile filter on desktop */
@media (min-width: 768px) {
    .mobile-filter-button {
        display: none;
    }
}

/* Animation for loading */
.no-events {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
    font-style: italic;
}