/* --- Seção de Galeria --- */
.gallery-section {
    background-color: #ffffff;
    padding: 80px 0px;
    width: 100%;
}

.gallery-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cabeçalho */
.gallery-header {
    text-align: center;
    margin-bottom: 56px;
}

.gallery-header .section-title {
    font-family: 'Poppins';
    font-weight: 600;
    font-style: SemiBold;
    font-size: clamp(30px, 2vw, 39px);
    line-height: 130%;
    letter-spacing: -1%;
    text-align: center;
    color: #242322;

    max-width: 350px;
    margin: 0 auto;
}

/* --- Mosaico Masonry de Alta Performance --- */
.gallery-grid-masonry {
    /* Define o número de colunas padrão para desktop */
    column-count: 4;
    /* Espaçamento idêntico entre as colunas */
    column-gap: 16px;
    width: 100%;
    margin-top: 32px;
}

/* Elemento Individual (Card da Foto) */
.gallery-item {
    /* Impede que a imagem seja cortada ou dividida entre duas colunas */
    break-inside: avoid;
    display: block;
    margin-bottom: 16px;
    /* Espaçamento vertical entre as fotos */
    background-color: #f3f4f6;
    border-radius: 4px;
    /* Arredondamento suave igual ao da imagem */
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efeito sutil ao passar o mouse */
.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* --- Responsividade Sem Scripts --- */

/* Telas Médias / Tablets */
@media (max-width: 1024px) {
    .gallery-grid-masonry {
        column-count: 3;
        column-gap: 12px;
    }

    .gallery-item {
        margin-bottom: 12px;
    }

    .gallery-header .section-title {
        font-size: 30px;
    }
}

/* Telas Pequenas / Mobile */
@media (max-width: 640px) {
    .gallery-grid-masonry {
        column-count: 2;
        /* Mantém em duas colunas no celular para melhor visualização */
        column-gap: 8px;
    }

    .gallery-item {
        margin-bottom: 8px;
    }

    .gallery-header .section-title {
        font-size: 26px;
    }
}

/*filtro*/

.gallery-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.gallery-filter a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 0 20px;

    background: #fff;
    border: 1px solid #0000001A;
    border-radius: 999px;

    font-family: 'Geist';
    font-weight: 600;
    font-size: 18px;
    line-height: 160%;
    color: #666361;
    text-decoration: none;
    transition: .25s ease;
}



.gallery-filter a.active {
    background: #EC7E11;
    border-color: #EC7E11;
    color: #fff;
}

.gallery-filter a:first-child {
    position: relative;
    margin-right: 16px;
}

.gallery-filter a:first-child::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    width: 1px;
    height: 38px;
    background: #e5e5e5;
    transform: translateY(-50%);
}

.gallery-filter-mobile {
    display: none;
}

@media (max-width:768px) {

    /* Esconde o menu de pílulas no celular */
    .gallery-filter {
        display: none;
    }

    /* Mostra o filtro Select moderno */
    .gallery-filter-mobile {
        display: block;
        margin-bottom: 32px;
    }

    .filter-select-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #E5E5E5;
        border-radius: 8px;
        height: 52px;
        transition: border-color 0.2s;
    }

    .filter-select-wrapper:focus-within {
        border-color: #EC7E11;
    }

    .filter-icon {
        position: absolute;
        left: 16px;
        color: #EC7E11;
        /* Ícone de funil laranja */
        pointer-events: none;
    }

    .chevron-icon {
        position: absolute;
        right: 16px;
        color: #737373;
        pointer-events: none;
    }

    /* Estilização nativa e limpa para SEO/Acessibilidade */
    .filter-select-wrapper select {
        width: 100%;
        height: 100%;
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        border: none;
        padding: 0 48px;
        /* Espaço para os ícones */
        font-family: 'Geist', sans-serif;
        font-weight: 600;
        font-size: 16px;
        color: #242322;
        cursor: pointer;
        outline: none;
    }
}

/* --- Lightbox Customizado (Vanilla JS) --- */
#lt-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#lt-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lt-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.lt-lightbox-img {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lt-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    transition: color 0.2s;
}

.lt-lightbox-close:hover {
    color: #EC7E11;
    /* Cor laranja do tema */
}

/* --- Navegação do Lightbox (Setas) --- */
.lt-lightbox-prev,
.lt-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 3;
    padding: 20px;
    transition: color 0.2s, transform 0.2s;
    user-select: none;
}

.lt-lightbox-prev:hover,
.lt-lightbox-next:hover {
    color: #EC7E11;
    /* Cor laranja do tema */
    transform: translateY(-50%) scale(1.1);
}

.lt-lightbox-prev {
    left: 2vw;
}

.lt-lightbox-next {
    right: 2vw;
}

/* Evita que a imagem atrapalhe o clique das setas em telas pequenas */
.lt-lightbox-img {
    user-select: none;
}

/* Esconder setas em telas muito pequenas se não couberem bem, ou deixá-las menores */
@media (max-width: 768px) {

    .lt-lightbox-prev,
    .lt-lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
}