/* =================
   EVENTS PAGE STYLES
   ================= */

/* Page Header */
.events-page-header {
    padding: 3rem 0 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: #3D1825;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters Section */
.events-filters {
    padding: 2rem 0;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 158px;
    z-index: 100;
}

.filters-wrapper {
    margin-bottom: 1rem;
}

/* Mobile Filter Toggle */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #3D1825;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: #5D2D3F;
}

.filter-toggle i {
    font-size: 1.125rem;
}

/* Filters Content - Hidden on Mobile by Default */
.filters-content {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    gap: 1rem;
}

.filters-content.active {
    display: flex;
    flex-direction: column;
}

/* Filter Groups */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #3D1825;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label i {
    color: #3D1825;
    font-size: 1rem;
}

.filter-select,
.filter-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    background: #ffffff;
    color: #333;
    transition: all 0.3s ease;
    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='%233D1825' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.filter-input {
    background-image: none;
    padding-right: 1rem;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3D1825;
    box-shadow: 0 0 0 3px rgba(61, 24, 37, 0.1);
}

/* Clear Filters Button */
.btn-clear-filters,
.btn-clear-filters-alt {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #3D1825;
    border: 2px solid #3D1825;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-clear-filters:hover,
.btn-clear-filters-alt:hover {
    background: #3D1825;
    color: #ffffff;
}

/* Results Info */
.results-info {
    margin-top: 1rem;
}

.results-count {
    color: #666;
    font-size: 0.875rem;
}

.results-count strong {
    color: #3D1825;
    font-weight: 900;
}

/* Events List */
.events-list {
    padding: 3rem 0;
}

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

/* Event Card - Reusing existing styles with enhancements */
.event-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.event-image {
    position: relative;
    width: 100%;
    height: 200px;
    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-date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #3D1825;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.event-date-badge .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.event-date-badge .month {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.event-type-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-type-tag.workshop {
    background: #4CAF50;
    color: #ffffff;
}

.event-type-tag.webinar {
    background: #2196F3;
    color: #ffffff;
}

.event-type-tag.conference {
    background: #FF9800;
    color: #ffffff;
}

.event-type-tag.course {
    background: #9C27B0;
    color: #ffffff;
}

.event-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.event-datetime p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-datetime i {
    color: #3D1825;
    font-size: 1rem;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: #3D1825;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.event-instructor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.event-instructor i {
    color: #3D1825;
}

.event-description {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.event-location i {
    color: #3D1825;
}

.event-price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.event-price-info i {
    color: #3D1825;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.event-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: #3D1825;
}

.event-footer .btn {
    flex-shrink: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
}

.no-results.active {
    display: block;
}

.no-results i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #3D1825;
    margin-bottom: 0.75rem;
}

.no-results p {
    color: #666;
    margin-bottom: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    color: #3D1825;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.pagination-btn span {
    display: none;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    color: #3D1825;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: #f8f9fa;
    border-color: #3D1825;
}

.pagination-number.active {
    background: #3D1825;
    color: #ffffff;
    border-color: #3D1825;
}

/* Tablet Styles - 768px and up */
@media (min-width: 768px) {
    .events-page-header {
        padding: 4rem 0 3rem;
    }

    .page-title {
        font-size: 3rem;
    }

    .page-subtitle {
        font-size: 1.25rem;
    }

    .events-filters {
        top: 158px;
    }

    /* Show filters inline on tablet/desktop */
    .filter-toggle {
        display: none;
    }

    .filters-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 0;
        padding: 0;
        background: transparent;
    }

    .filter-search {
        grid-column: span 2;
    }

    .btn-clear-filters {
        grid-column: span 2;
        width: fit-content;
        margin: 0 auto;
    }

    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .event-image {
        height: 220px;
    }

    .pagination-btn span {
        display: inline;
    }
}

/* Desktop Styles - 1024px and up */
@media (min-width: 1024px) {
    .events-page-header {
        padding: 5rem 0 3rem;
    }

    .page-title {
        font-size: 3.5rem;
    }

    .filters-content {
        grid-template-columns: repeat(4, 1fr);
    }

    .filter-search {
        grid-column: 4;
    }

    .btn-clear-filters {
        grid-column: 1 / -1;
    }

    .events-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .event-image {
        height: 240px;
    }

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

/* Large Desktop - 1440px and up */
@media (min-width: 1440px) {
    .events-grid {
        gap: 3.5rem;
    }
}

/* Loading and Error States */
.loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    font-size: 1.125rem;
    grid-column: 1 / -1;
}

.loading-spinner::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3D1825;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.no-events,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-events i,
.error-message i {
    font-size: 3rem;
    color: #3D1825;
    margin-bottom: 1rem;
}

.no-events h3,
.error-message h3 {
    font-size: 1.5rem;
    color: #3D1825;
    margin-bottom: 0.5rem;
}

.no-events p,
.error-message p {
    color: #666;
    font-size: 1.125rem;
}

.error-message .btn {
    margin-top: 1.5rem;
}

/* Pagination Container */
.pagination-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #3D1825;
}

.pagination-btn.active {
    background: #3D1825;
    color: #ffffff;
    border-color: #3D1825;
}

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

.pagination-dots {
    padding: 0 0.5rem;
    color: #999;
}
