/* ==========================================
   SPECIAL OLYMPICS SOUTH SUDAN
   ACTIVITIES GALLERY
========================================== */

.activities-gallery {
    padding: 90px 20px;
    background: #ffffff;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}


/* ==========================================
   HEADING
========================================== */

.gallery-heading {
    max-width: 750px;
    margin: 0 auto 45px;
    text-align: center;
}

.gallery-eyebrow {
    display: inline-block;
    margin-bottom: 12px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gallery-heading h2 {
    margin: 0 0 15px;

    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.1;
}

.gallery-heading p {
    margin: 0;

    font-size: 17px;
    line-height: 1.7;
}


/* ==========================================
   FILTER BUTTONS
========================================== */

.gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;

    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 45px;
}

.filter-btn {
    padding: 12px 20px;

    border: 1px solid #dddddd;
    border-radius: 50px;

    background: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}


/* ==========================================
   PHOTO GRID
========================================== */

.photo-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 24px;
}


/* ==========================================
   PHOTO CARD
========================================== */

.photo-card {
    background: #ffffff;

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.07);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;

    animation: galleryFadeIn 0.4s ease;
}

.photo-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.12);
}


/* ==========================================
   IMAGE
========================================== */

.photo-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #eeeeee;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform 0.5s ease;
}

.photo-card:hover img {
    transform: scale(1.06);
}


/* ==========================================
   VIEW PHOTO BUTTON
========================================== */

.view-photo {
    position: absolute;

    right: 15px;
    bottom: 15px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    font-size: 25px;

    cursor: pointer;

    opacity: 0;

    transform: translateY(10px);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.photo-card:hover .view-photo {
    opacity: 1;

    transform: translateY(0);
}


/* ==========================================
   PHOTO INFORMATION
========================================== */

.photo-info {
    padding: 20px;
}

.photo-category {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.photo-info h3 {
    margin: 0 0 8px;

    font-size: 20px;
}

.photo-info p {
    margin: 0;

    font-size: 14px;

    line-height: 1.6;
}


/* ==========================================
   FILTER ANIMATION
========================================== */

.photo-card.hidden {
    display: none;
}

@keyframes galleryFadeIn {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ==========================================
   LIGHTBOX
========================================== */

.gallery-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;
}

.gallery-lightbox.active {
    display: flex;
}


/* Dark background */

.lightbox-overlay {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.9);
}


/* Lightbox content */

.lightbox-content {
    position: relative;

    z-index: 2;

    max-width: 1000px;

    width: 100%;

    max-height: 90vh;

    display: flex;

    flex-direction: column;

    align-items: center;
}


/* Image */

.lightbox-content img {
    max-width: 100%;

    max-height: 70vh;

    object-fit: contain;

    border-radius: 5px;
}


/* Close button */

.lightbox-close {
    position: absolute;

    right: 0;

    top: -45px;

    width: 40px;
    height: 40px;

    border: none;

    background: transparent;

    color: white;

    font-size: 35px;

    cursor: pointer;
}


/* Caption */

.lightbox-caption {
    width: 100%;

    max-width: 750px;

    margin-top: 20px;

    text-align: center;

    color: white;
}

.lightbox-caption span {
    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 2px;
}

.lightbox-caption h3 {
    margin: 8px 0;

    font-size: 25px;
}

.lightbox-caption p {
    margin: 0;

    font-size: 15px;

    line-height: 1.6;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1000px) {

    .photo-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 700px) {

    .activities-gallery {
        padding: 60px 15px;
    }

    .photo-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 15px;
    }

    .photo-info {
        padding: 15px;
    }

    .photo-info h3 {
        font-size: 17px;
    }

    .photo-info p {
        font-size: 13px;
    }

    .gallery-filters {
        justify-content: flex-start;

        overflow-x: auto;

        flex-wrap: nowrap;

        padding-bottom: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
    }

}


/* ==========================================
   SMALL PHONES
========================================== */

@media (max-width: 480px) {

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .gallery-heading h2 {
        font-size: 36px;
    }

}

nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    padding: 10px 0;
}

nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    background-color: #e31837;

    transform: translateX(-50%);

    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}