/* =========================
   GALLERY PAGE
========================= */

.gallery-page {
    background: #f5f7fb;
    padding-bottom: 80px;
}

/* Hero */
.gallery-hero {
    min-height: 400px;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(4,15,40,.6), rgba(4,15,40,.6)),
        url('/public/assets/img/fun-dive.jpg') center / cover no-repeat;
    text-align: center;
    color: white;
    padding: 120px 20px;
}

.gallery-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.gallery-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Grid */
.gallery-grid {
    max-width: 1200px;
    margin: 50px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transform: translateY(30px);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.gallery-item:nth-child(even) {
    animation-delay: 0.15s;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Hover */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 36, 112, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-overlay span {
    color: white;
    font-size: 1.2rem;
    border: 2px solid white;
    padding: 10px 25px;
    border-radius: 30px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Animation */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;

    padding: 20px;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 95%;
    max-height: 90vh;

    border-radius: 12px;

    object-fit: contain;

    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;

    top: 20px;
    right: 30px;

    font-size: 48px;
    line-height: 1;

    color: white;

    cursor: pointer;

    z-index: 10000;

    transition: 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.gallery-item {
    position: relative;
    overflow: hidden;

    cursor: pointer;

    border-radius: 12px;
}

.gallery-item img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(0.8);
}

.gallery-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0,0,0,0.35);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;

    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: white;

    font-size: 18px;
    font-weight: 600;

    letter-spacing: 1px;

    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {

    .lightbox {
        padding: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;

        font-size: 38px;
    }

    .gallery-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.2);
    }

    .gallery-overlay span {
        font-size: 15px;
    }
}