/**
 * Genting Photo Gallery Styles
 */

/* Gallery Container */
.genting-photo-gallery-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.genting-photo-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    background-color: #1a1a1a;
    padding: 0;
}

/* Main Image - Takes full height on left */
.genting-main-image {
    grid-column: 1 / 2;
    grid-row: 1 / 4;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: auto;
    min-height: 400px;
}

/* Thumbnails - Stack on right side */
.genting-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: auto;
}

.genting-thumbnail:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.genting-thumbnail:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.genting-thumbnail:nth-child(4) {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

/* Gallery Images */
.genting-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.genting-gallery-item:hover .genting-gallery-img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

/* More Overlay (+3 button) */
.genting-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.genting-more-overlay:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.genting-more-text {
    color: #ffffff;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Lightbox */
.genting-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.genting-lightbox.active {
    opacity: 1;
}

/* Lightbox Content */
.genting-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.genting-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Lightbox Counter */
.genting-lightbox-counter {
    color: #ffffff;
    font-size: 16px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

/* Close Button */
.genting-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1000000;
    line-height: 1;
}

.genting-lightbox-close:hover,
.genting-lightbox-close:focus {
    color: #ccc;
}

/* Navigation Arrows */
.genting-lightbox-prev,
.genting-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 1000000;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.genting-lightbox-prev:hover,
.genting-lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: #ccc;
}

.genting-lightbox-prev {
    left: 20px;
}

.genting-lightbox-next {
    right: 20px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .genting-photo-gallery {
        grid-template-columns: repeat(3, 32%);
        grid-template-rows: auto auto;
        gap: 2%;
    }

    .genting-main-image {
        grid-column: 1 / 4;
        grid-row: 1 / 2;
        height: 400px;
        width: 100%;
    }

    .genting-thumbnail:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        height: 150px;
    }

    .genting-thumbnail:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        height: 150px;
    }

    .genting-thumbnail:nth-child(4) {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
        height: 150px;
    }

    .genting-more-text {
        font-size: 28px;
    }

    .genting-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 35px;
    }

    .genting-lightbox-prev,
    .genting-lightbox-next {
        font-size: 30px;
        padding: 10px;
    }

    .genting-lightbox-prev {
        left: 10px;
    }

    .genting-lightbox-next {
        right: 10px;
    }

    .genting-lightbox-image {
        max-height: 70vh;
    }
}

@media screen and (max-width: 480px) {
    .genting-photo-gallery {
        grid-template-columns: repeat(3, 32%);
        gap: 2%;
    }

    .genting-main-image {
        grid-column: 1 / 4;
        height: 250px;
    }

    .genting-thumbnail {
        height: 100px !important;
    }

    .genting-more-text {
        font-size: 24px;
    }

    .genting-lightbox-counter {
        font-size: 14px;
    }
}

/* Loading Animation */
@keyframes gentingFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.genting-lightbox.active .genting-lightbox-image {
    animation: gentingFadeIn 0.3s ease;
}

/* Hide lightbox data */
.genting-gallery-data {
    display: none !important;
}

/* Accessibility */
.genting-gallery-item:focus,
.genting-lightbox-close:focus,
.genting-lightbox-prev:focus,
.genting-lightbox-next:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
