/* ==========================================================================
   GALLERY PAGE STYLES (UI/UX Optimized)
   ========================================================================== */

.gallery-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 3.5rem;
    overflow: hidden;
}

.gallery-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 31, 51, 0.85) 0%, rgba(11, 31, 51, 0.4) 60%, rgba(11, 31, 51, 0.2) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
}

.gallery-hero-title {
    font-size: 3.2rem;
    font-weight: 300;
    font-family: var(--font-heading);
    line-height: 1.15;
    margin-bottom: 0.8rem;
}

.gallery-hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 620px;
}

/* Filter Controls */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    border: 1px solid rgba(11, 31, 51, 0.15);
    background: var(--white);
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
    box-shadow: 0 4px 14px rgba(31, 167, 160, 0.35);
}

/* Main Grid */
.gallery-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

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

.gallery-card-img-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.gallery-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 31, 51, 0.85) 0%, rgba(11, 31, 51, 0.2) 60%, transparent 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

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

.gallery-card-info {
    color: var(--white);
}

.gallery-card-category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.gallery-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    font-family: var(--font-heading);
    margin-bottom: 0.3rem;
}

.gallery-card-caption {
    font-size: 0.85rem;
    opacity: 0.85;
}

.gallery-card-meta {
    padding: 1.2rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(11, 31, 51, 0.05);
}

.gallery-card-meta-text h4 {
    font-size: 1.05rem;
    color: var(--navy);
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.gallery-card-meta-text span {
    font-size: 0.8rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-card-zoom-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--off-white);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.gallery-card:hover .gallery-card-zoom-icon {
    background: var(--teal);
    color: var(--white);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 51, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 900px;
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-img-wrap {
    width: 100%;
    max-height: 550px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 550px;
    object-fit: contain;
}

.lightbox-info {
    padding: 1.5rem 2rem;
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox-info-text h3 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.lightbox-info-text p {
    color: var(--slate);
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(11, 31, 51, 0.8);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--teal);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-hero {
        min-height: 300px;
        padding-bottom: 2rem;
    }
    .gallery-hero-title {
        font-size: 2.3rem;
    }
    .gallery-full-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .lightbox-modal {
        padding: 1rem;
    }
    .lightbox-info {
        padding: 1rem 1.2rem;
    }
}
