
/* ==========================================
   SGA RESORT PHOTO GALLERY
========================================== */

.sga-photo-gallery {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 25px 6% 45px;
    background: #ffffff;
}

/* ==========================================
   FILTER TABS
========================================== */

.gallery-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.gallery-filter-btn {
    min-width: 150px;
    min-height: 52px;
    padding: 10px 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: none;
    border-radius: 50px;

    background: #f3f4f3;
    color: #171717;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-btn i {
    font-size: 17px;
}

.gallery-filter-btn:hover {
    background: #e7f2eb;
    color: #168b58;
    transform: translateY(-2px);
}

.gallery-filter-btn.active {
    background: #188c5a;
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(24, 140, 90, 0.20);
}

.gallery-filter-btn.active:hover {
    background: #11784b;
    color: #ffffff;
}

/* ==========================================
   PHOTO GRID - 3 IMAGES PER ROW
========================================== */

.gallery-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

/* PHOTO CARD */

.gallery-photo-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #f1f3f1;

    opacity: 1;
    transform: translateY(0);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.gallery-photo-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
}

.gallery-photo-card.gallery-hiding {
    opacity: 0;
    transform: translateY(12px);
}

.gallery-photo-card.gallery-hidden {
    display: none;
}

/* IMAGE */

.gallery-photo-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    background: #edf0ed;
}

.gallery-photo-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.gallery-photo-card:hover .gallery-photo-image img {
    transform: scale(1.04);
}

/* ==========================================
   EXPAND BUTTON
========================================== */

.gallery-expand-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #ffffff;
    color: #188c5a;

    font-size: 19px;

    cursor: pointer;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    transition: all 0.3s ease;
}

.gallery-expand-btn:hover {
    background: #188c5a;
    color: #ffffff;
    transform: scale(1.08);
}

/* ==========================================
   EMPTY MESSAGE
========================================== */

.gallery-empty-message {
    padding: 60px 20px;
    text-align: center;
    color: #8a958e;
}

.gallery-empty-message i {
    font-size: 42px;
    color: #188c5a;
}

.gallery-empty-message p {
    margin-top: 12px;
    font-size: 15px;
}

/* ==========================================
   FULLSCREEN LIGHTBOX
========================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 35px;

    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox-content {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-direction: column;
    gap: 15px;
}

.gallery-lightbox-content img {
    max-width: 85%;
    max-height: 85vh;

    object-fit: contain;
    border-radius: 8px;

    animation: galleryZoomIn 0.3s ease;
}

@keyframes galleryZoomIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   LIGHTBOX CLOSE BUTTON
========================================== */

.gallery-lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.15);
    color: #ffffff;

    font-size: 23px;
    cursor: pointer;

    transition: all 0.25s ease;
}

/* ==========================================
   LIGHTBOX NAVIGATION
========================================== */

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.15);
    color: #ffffff;

    font-size: 18px;
    cursor: pointer;

    transition: all 0.25s ease;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-close:hover {
    background: #188c5a;
}

.gallery-lightbox-prev {
    left: 30px;
}

.gallery-lightbox-next {
    right: 30px;
}

/* COUNTER */

.gallery-lightbox-counter {
    color: #ffffff;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ==========================================
   LARGE DESKTOP
========================================== */

@media (min-width: 1500px) {

    .gallery-photo-image {
        height: 340px;
    }

    .gallery-photo-grid {
        gap: 24px;
    }
}

/* ==========================================
   TABLET RESPONSIVE - 2 IMAGES
========================================== */

@media (max-width: 992px) {

    .sga-photo-gallery {
        padding: 25px 4%;
    }

    .gallery-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .gallery-photo-image {
        height: 270px;
    }

    .gallery-filter-tabs {
        gap: 12px;
        margin-bottom: 25px;
    }

    .gallery-filter-btn {
        min-width: 135px;
        min-height: 48px;
        padding: 10px 17px;
        font-size: 14px;
    }

    .gallery-expand-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* ==========================================
   MOBILE RESPONSIVE - 1 IMAGE
========================================== */

@media (max-width: 600px) {

    .sga-photo-gallery {
        padding: 20px 15px 35px;
    }

    .gallery-filter-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 22px;
    }

    .gallery-filter-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 9px 8px;
        gap: 7px;
        font-size: 13px;
    }

    .gallery-filter-btn i {
        font-size: 15px;
    }

    .gallery-photo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-photo-card {
        border-radius: 15px;
    }

    .gallery-photo-image {
        height: 260px;
    }

    .gallery-expand-btn {
        width: 44px;
        height: 44px;
        right: 12px;
        bottom: 12px;
        font-size: 16px;
    }

    .gallery-lightbox {
        padding: 12px;
    }

    .gallery-lightbox-content img {
        max-width: 100%;
        max-height: 78vh;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}



/* =========================================
   SGA RESORT - PHOTO GALLERY
========================================= */

.sga-photo-gallery {
    width: 100%;
    padding: 85px 5%;
    background: #f4f7f1;
    overflow: hidden;
}

.photo-gallery-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Heading */

.photo-gallery-heading {
    text-align: center;
    margin-bottom: 38px;
}

.photo-gallery-subtitle {
    display: inline-block;
    color: #789653;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.photo-gallery-heading h2 {
    color: #203b2b;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
}

.photo-gallery-heading h2 span {
    color: #88a85e;
}

.photo-gallery-heading p {
    max-width: 650px;
    margin: 0 auto;
    color: #747d72;
    font-size: 15px;
    line-height: 1.7;
}

/* Category Filter Buttons */

.photo-gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 38px;
}

.photo-filter-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 110px;
    padding: 11px 23px;
    border: 1px solid #dce6d5;
    border-radius: 30px;
    background: #ffffff;
    color: #3d5740;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s ease;
}

.photo-filter-btn:hover {
    background: #e7efdf;
    border-color: #789653;
    color: #315c3c;
    transform: translateY(-2px);
}

.photo-filter-btn.active {
    background: #315c3c;
    border-color: #315c3c;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(49, 92, 60, .20);
}

/* Gallery Grid */

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
}

.photo-gallery-item {
    width: 100%;
    min-width: 0;
    animation: photoFadeIn .4s ease both;
}

.photo-gallery-card {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
    border-radius: 16px;
    background: #e5eadf;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(32, 59, 43, .10);
    isolation: isolate;
}

.photo-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s ease;
}

.photo-gallery-card:hover img {
    transform: scale(1.10);
}

/* Image Overlay */

.photo-gallery-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    opacity: 0;
    background: linear-gradient(
        to top,
        rgba(17, 43, 26, .92) 0%,
        rgba(17, 43, 26, .35) 45%,
        transparent 100%
    );
    transition: opacity .35s ease;
}

.photo-gallery-card:hover .photo-gallery-overlay {
    opacity: 1;
}

.photo-gallery-overlay-content {
    position: relative;
    width: 100%;
    color: #ffffff;
}

.photo-gallery-category {
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 9px;
    border-radius: 30px;
    background: #8ba962;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.photo-gallery-overlay h3 {
    margin: 0;
    padding-right: 42px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.photo-gallery-view {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #315c3c;
    font-size: 14px;
}

/* Empty Gallery */

.photo-gallery-empty {
    width: 100%;
    padding: 60px 20px;
    text-align: center;
    color: #777;
}

.photo-gallery-empty i {
    display: block;
    margin-bottom: 15px;
    color: #8ba962;
    font-size: 48px;
}

.photo-gallery-empty h3 {
    margin: 0 0 8px;
    color: #315c3c;
    font-size: 23px;
    font-weight: 700;
}

.photo-gallery-empty p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* =========================================
   FULLSCREEN LIGHTBOX
========================================= */

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 55px 90px;
    background: rgba(0, 0, 0, .96);
}

.photo-lightbox.show {
    display: flex;
}

.photo-lightbox-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    text-align: center;
}

.photo-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.photo-lightbox-caption {
    margin-top: 18px;
    color: #ffffff;
    text-align: center;
}

.photo-lightbox-caption h3 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
}

.photo-lightbox-caption span {
    color: #c9c9c9;
    font-size: 13px;
}

/* Lightbox Controls */

.photo-lightbox-close,
.photo-lightbox-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background: rgba(255, 255, 255, .13);
    color: #ffffff;
    cursor: pointer;
    transition: all .3s ease;
}

.photo-lightbox-close:hover,
.photo-lightbox-nav:hover {
    background: #8ba962;
    color: #ffffff;
}

.photo-lightbox-close {
    top: 25px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 22px;
}

.photo-lightbox-nav {
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 17px;
    transform: translateY(-50%);
}

.photo-lightbox-prev {
    left: 25px;
}

.photo-lightbox-next {
    right: 25px;
}

/* Animation */

@keyframes photoFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 1100px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .photo-gallery-card {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .sga-photo-gallery {
        padding: 60px 4%;
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .photo-gallery-card {
        height: 220px;
    }

    .photo-gallery-overlay {
        padding: 14px;
        opacity: 1;
    }

    .photo-gallery-overlay h3 {
        font-size: 15px;
    }

    .photo-gallery-filters {
        gap: 8px;
    }

    .photo-filter-btn {
        min-width: auto;
        padding: 9px 17px;
        font-size: 12px;
    }

    .photo-lightbox {
        padding: 55px 15px;
    }

    .photo-lightbox-prev {
        left: 8px;
    }

    .photo-lightbox-next {
        right: 8px;
    }

    .photo-lightbox-nav {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .photo-gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .photo-gallery-card {
        height: 260px;
    }

    .photo-gallery-heading p {
        font-size: 13px;
    }

    .photo-lightbox-close {
        top: 12px;
        right: 12px;
    }
}




/* ===== SGA PHOTO FULLSCREEN VIEWER ===== */

#photoLightbox {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999999 !important;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.96) !important;
    padding: 55px 80px;
    box-sizing: border-box;
}

#photoLightbox.show {
    display: flex !important;
}

#photoLightbox .photo-lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#photoLightbox #lightboxImage {
    display: block;
    width: auto !important;
    height: auto !important;

    max-width: 90vw !important;
    max-height: 82vh !important;

    object-fit: contain !important;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}

#photoLightbox .photo-lightbox-caption {
    text-align: center;
    color: #fff;
    margin-top: 15px;
}

#photoLightbox .photo-lightbox-caption h3 {
    color: #fff;
    margin: 0 0 5px;
}

#photoLightbox .photo-lightbox-caption span {
    color: #ddd;
}

/* Close */

#photoLightbox .photo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 5;

    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;

    background: #ffffff22;
    color: white;
    font-size: 23px;
    cursor: pointer;
}

/* Navigation */

#photoLightbox .photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;

    background: #ffffff25;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#photoLightbox .photo-lightbox-prev {
    left: 20px;
}

#photoLightbox .photo-lightbox-next {
    right: 20px;
}

#photoLightbox .photo-lightbox-close:hover,
#photoLightbox .photo-lightbox-nav:hover {
    background: #789653;
}

@media(max-width: 768px) {
    #photoLightbox {
        padding: 50px 12px;
    }

    #photoLightbox #lightboxImage {
        max-width: 94vw !important;
        max-height: 78vh !important;
    }

    #photoLightbox .photo-lightbox-prev {
        left: 5px;
    }

    #photoLightbox .photo-lightbox-next {
        right: 5px;
    }
}
