/* =========================================================
   GALLERY PAGE — Filter buttons, grid cards, lightbox
========================================================= */

/* ---- Filter buttons ---- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.gallery-filter-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-navy);
    background: var(--white);
    border: 1px solid var(--border-col);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-filter-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange-dark);
}

.gallery-filter-btn.active {
    background: linear-gradient(135deg, var(--primary-navy), var(--steel-blue));
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* ---- Gallery grid cards ---- */
.gallery-card {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
    background: var(--light-bg);
    transition: var(--transition);
}

.gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 42, 74, 0.88), rgba(11, 42, 74, 0) 65%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-overlay i {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--accent-orange);
}

.gallery-card-overlay span {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--white);
}

/* ---- Lightbox ---- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(7, 28, 51, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 2000;
    padding: 20px;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-content p {
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 1rem;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--accent-orange);
    border-color: transparent;
}

.lightbox-close {
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 767.98px) {
    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

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