/* ==========================================================================
   ESTILOS ESPECÍFICOS DA GALERIA (galeria/style.css)
   ========================================================================== */

/* 1. HERO / CABEÇALHO DA PÁGINA */
.gallery-hero {
    position: relative;
    width: 100%;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('imagens/hero-galeria.jpg') no-repeat center center / cover;
    margin-top: 80px; /* Compensa a altura do header fixo */
    text-align: center;
    color: #ffffff;
    padding: 60px 20px;
}

.gallery-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.gallery-hero .hero-subtitle {
    display: block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary, #d4af37);
    margin-bottom: 10px;
    font-weight: 600;
}

.gallery-hero .hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.gallery-hero .hero-description {
    font-size: 1.1rem;
    color: #e0e0e0;
    font-weight: 300;
    margin: 0 auto;
}

/* 2. FILTROS */
.section-title-center {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    color: var(--color-text-dark, #333333);
    border: 2px solid var(--color-primary, #1b4332);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-primary, #1b4332);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
}

/* 3. GRID DE IMAGENS E HOVER */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    background-color: #f0f0f0;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 67, 50, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-hover span {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateY(15px);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-item-hover {
    opacity: 1;
}

.gallery-item:hover .gallery-item-hover span {
    transform: translateY(0);
}

.gallery-item.hide {
    display: none;
}

/* 4. MODAL LIGHTBOX */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

#lightboxCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s ease;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--color-secondary, #d4af37);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 5. RESPONSIVIDADE */
@media (max-width: 768px) {
    .gallery-hero {
        min-height: 30vh;
        margin-top: 70px;
    }

    .gallery-hero .hero-title {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 15px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}