/* ==========================================================================
   Gallery Page
   ========================================================================== */

/* Gallery Hero */
.gallery-hero {
    background: linear-gradient(135deg, var(--color-petrol) 0%, var(--color-sage) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    color: var(--color-cream);
}

.gallery-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--color-cream);
}

.gallery-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--color-mist);
    font-weight: 300;
}

/* Gallery Filters */
.gallery-filters {
    background-color: white;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-mist);
    position: sticky;
    top: 100px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gallery-filters .container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 2rem;
    border: 2px solid var(--color-petrol);
    background-color: white;
    color: var(--color-petrol);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-ochre);
    border-color: var(--color-ochre);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(223, 165, 117, 0.3);
}

/* Gallery Grid */
.gallery-grid-section {
    padding: 4rem 0;
    background-color: var(--color-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    background-color: white;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 61, 76, 0.85) 0%, rgba(72, 117, 120, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    font-size: 3rem;
    color: var(--color-cream);
}

/* Empty State */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-sage);
    font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 61, 76, 0.98);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1.5rem;
    color: var(--color-cream);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--color-cream);
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
    font-size: 4rem;
    line-height: 1;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-ochre);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .gallery-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .gallery-image {
        height: 300px;
    }

    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.5rem;
    }

    .lightbox-close {
        font-size: 3rem;
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-hero {
        padding: 4rem 0 3rem;
    }

    .gallery-title {
        font-size: 2.5rem;
    }
}