/* ============================================
   EVENTS PAGE STYLES
   ============================================ */

/* Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.spinner {
    border: 4px solid var(--light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   FEATURED EVENTS
   ============================================ */
.featured-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.featured-event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.featured-event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
}

.featured-event-image {
    height: 220px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.featured-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-event-card:hover .featured-event-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.featured-event-content {
    padding: 25px;
}

.featured-event-content h3 {
    color: var(--primary);
    font-size: 22px;
    margin: 15px 0;
    line-height: 1.4;
    min-height: 60px;
}

.featured-event-content p {
    color: var(--dark);
    line-height: 1.7;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   FILTERS SECTION
   ============================================ */
.filters-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--light);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.1);
}

.category-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--light);
    background: white;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.campus-filter {
    max-width: 300px;
    margin: 0 auto;
}

.campus-select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--light);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    outline: none;
    background: white;
    transition: all 0.3s;
}

.campus-select:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.1);
}

/* ============================================
   EVENTS GRID
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.event-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.event-image {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    position: relative;
    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.08);
}

.event-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.95);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.event-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-date-badge {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
    width: fit-content;
}

.event-content h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 56px;
}

.event-content > p {
    color: var(--dark);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--light);
}

.event-campuses {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.campus-tag {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.campus-tag-small {
    background: var(--light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.read-more-btn:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Event Meta */
.event-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.event-date,
.event-category {
    font-size: 13px;
    color: var(--gray);
    font-weight: 600;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 18px;
    border: 2px solid var(--light);
    background: white;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    color: var(--gray);
    padding: 0 5px;
}

/* ============================================
   EVENT DETAIL MODAL
   ============================================ */
.event-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    position: relative;
}

.event-modal-header {
    height: 350px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.event-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-modal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: white;
}

.event-modal-body {
    padding: 40px;
}

.event-meta-large {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.event-date-large,
.event-category-large {
    background: var(--light);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

.event-modal-body h2 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.event-content-detail {
    margin: 30px 0;
}

.event-content-detail p {
    font-size: 17px;
    line-height: 1.9;
    color: var(--dark);
    margin-bottom: 20px;
    text-align: justify;
}

/* Event Gallery */
.event-gallery {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--light);
}

.event-gallery h3 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 25px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ============================================
   IMAGE LIGHTBOX
   ============================================ */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s;
}

.close-lightbox:hover {
    transform: scale(1.2);
    color: var(--accent);
}

/* ============================================
   NO EVENTS / ERROR MESSAGES
   ============================================ */
.no-events,
.error-message {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-events h3,
.error-message h3 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 15px;
}

.no-events p,
.error-message p {
    color: var(--gray);
    font-size: 16px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
    .featured-events-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .category-filters::-webkit-scrollbar {
        height: 6px;
    }

    .category-filters::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .event-modal-header {
        height: 250px;
    }

    .event-modal-body {
        padding: 25px 20px;
    }

    .event-modal-body h2 {
        font-size: 24px;
    }

    .event-content-detail p {
        font-size: 16px;
        text-align: left;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-grid img {
        height: 150px;
    }

    .pagination-container {
        gap: 6px;
    }

    .page-btn {
        padding: 8px 14px;
        font-size: 14px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .featured-event-content h3 {
        font-size: 18px;
        min-height: auto;
    }

    .event-content h3 {
        font-size: 18px;
        min-height: auto;
    }

    .event-modal-header {
        height: 200px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    
}