/*--------------------------------- event page-----------------------------------------------*/

/* Filter Section */
.filter-section {
    max-width: 1400px;
    margin: 0.1px auto 40px;
    padding: 0 20px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 12px 30px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Events Timeline */
.events-timeline {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.timeline-year {
    margin-bottom: 60px;
}

.year-header {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

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

/* Event Card */
.event-page-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 2px solid rgb(206, 205, 205);
}

.event-page-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.event-page-card:hover {
    transform: translateY(-10px);
}

.event-page-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.event-page-card-image img,
.event-page-card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-page-card:hover .event-page-card-image img,
.event-page-card:hover .event-page-card-image video {
    transform: scale(1.1);
}

.event-date-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: #000;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.media-type-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-page-card-content {
    padding: 25px;
}

.event-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.event-page-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.event-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.mevent-page-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.event-page-meta-item i {
    color: var(--primary);
}

/* Gallery View Button */
.view-gallery-btn {
    margin-top: 20px;
    background: #000;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-gallery-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Modal */

.modal {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.8); /* semi-transparent black */
    z-index: 9999;
}

.modal.active {
    display: block;
}


.modal-content {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 40px 20px;
    position: relative;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.modal-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.modal-header p {
    color: #ccc;
    font-size: 1.1rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    height: 300px;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.event-meta i {
    color: #a3e635;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--primary);
    color: #000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

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

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

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .modal-header h2 {
        font-size: 1.8rem;
    }

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

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
}

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

.loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .gallery-item {
        height: 280px;
        width: 100%;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 25px;
    }
}

/* Tablets */
@media (max-width: 991px) {
    .filter-controls {
        justify-content: flex-start;
        gap: 12px;
    }

    .year-header {
        font-size: 2.5rem;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-item {
        height: 250px;
        width: 100%;
    }

    .event-page-card-image {
        height: 220px;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .year-header {
        font-size: 2rem;
        padding-bottom: 12px;
    }

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

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .modal-header h2 {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item {
        height: 280px;
        width: 100%;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .event-page-card-image {
        height: 250px;
    }

    .event-page-title {
        font-size: 1.4rem;
    }
}

/* Mobile Portrait */
@media (max-width: 575px) {
    .filter-section {
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .filter-controls {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .year-header {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .event-page-card-content {
        padding: 20px;
    }

    .event-page-title {
        font-size: 1.3rem;
    }

    .event-page-description {
        font-size: 0.9rem;
    }

    .gallery-grid {
        gap: 12px;
    }

    .gallery-item {
        height: 220px;
        width: 100%;
        border-radius: 10px;
    }

    .modal-content {
        padding: 20px 10px;
        margin-top: 60px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .event-page-card-image {
        height: 220px;
    }

    .event-date-badge,
    .media-type-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .view-gallery-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
    .gallery-item {
        height: 200px;
        width: 100%;
    }

    .event-page-card-image {
        height: 200px;
    }

    .year-header {
        font-size: 1.4rem;
    }

    .event-page-title {
        font-size: 1.2rem;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .event-page-meta-item {
        font-size: 0.85rem;
    }
}

/* Fix for gallery item to use full width in grid */
@media (max-width: 991px) {
    .gallery-item {
        max-width: 100%;
    }
}

@media (max-width: 2000px) {
    .filter-controls {
        justify-content: flex-start;
        gap: 12px;
    }

    .year-header {
        font-size: 2.5rem;
    }

    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-item {
        height: 250px;
        width: 100%;
    }

    .event-page-card-image {
        height: 220px;
    }
}
