/* ==========================================================
   PRIMORDE — CSS DA GALERIA
   Estilos da galeria principal e das páginas de categoria
   ========================================================== */


/* ==========================================================
   ÁREA GERAL
   ========================================================== */

.gallery-page {
    padding-bottom: 3rem;
}

.gallery-content {
    width: min(100% - 2rem, 1200px);
    margin-inline: auto;
}

.gallery-section-title {
    margin-top: 2.5rem;
}

.gallery-intro {
    margin-bottom: 1.25rem;
}

.gallery-divider {
    border-top: 2px solid #ddd;
    margin: 3rem 0;
}

.gallery-contact {
    margin-top: 2.5rem;
}


/* ==========================================================
   GRUPOS
   ========================================================== */

.g-group {
    margin: 2rem 0 3rem;
}


/* ==========================================================
   GRADE DE FOTOS
   ========================================================== */

.g-preview-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 220px), 1fr)
    );
    gap: clamp(.65rem, 1.5vw, 1rem);
    align-items: stretch;
}


/* ==========================================================
   FOTOS DA GALERIA
   Bordas retas, sem arredondamento
   ========================================================== */

.g-photo-link {
    display: block;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 0; /* Remove bordas arredondadas */
    background: #f5f5f5;
}

.g-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.g-photo-link:hover .g-photo,
.g-photo-link:focus-visible .g-photo {
    transform: scale(1.035);
}


/* ==========================================================
   BOTÕES DA GALERIA
   Bordas retas, sem arredondamento
   ========================================================== */

.g-load-more,
.g-category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 1.2rem 0 1.5rem;
    padding: .8rem 1.25rem;
    border: 1px solid #222;
    border-radius: 0; /* Remove bordas arredondadas */
    background: black;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}

.g-load-more:hover,
.g-category-link:hover {
    background: #444;
    transform: translateY(-1px);
}

.g-load-more:focus-visible,
.g-category-link:focus-visible,
.g-accordion:focus-visible {
    outline: 3px solid #d69b28;
    outline-offset: 3px;
}

.g-load-more[hidden] {
    display: none !important;
}


/* ==========================================================
   LISTA DE CATEGORIAS
   Cartões com bordas retas
   ========================================================== */

.g-category-list {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 260px), 1fr)
    );
    gap: .75rem;
    margin-top: 1rem;
}

.g-category-card {
    border: 1px solid #dedede;
    border-radius: 0; /* Remove bordas arredondadas */
    background: #fff;
    overflow: hidden;
}

.g-category-heading {
    margin: 0;
    font-size: 1rem;
}


/* ==========================================================
   ACORDEÃO
   ========================================================== */

.g-accordion {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 0;
    border-radius: 0; /* Mantém os cantos retos */
    background: #f7f7f7;
    color: #161616;
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.g-accordion[aria-expanded="true"] {
    background: #ededed;
}

.g-chevron {
    font-size: 1.35rem;
    line-height: 1;
}

.g-accordion-panel {
    padding: .2rem 1.1rem 1rem;
}

.g-accordion-panel p {
    margin: .7rem 0;
    font-size: .95rem;
    line-height: 1.5;
}

.g-accordion-panel .g-category-link {
    margin: .2rem 0 0;
}


/* ==========================================================
   CAMINHO DE NAVEGAÇÃO
   ========================================================== */

.g-breadcrumb {
    margin: 1rem 0 1.5rem;
    font-size: .95rem;
    color: #555;
}

.g-breadcrumb a {
    color: inherit;
}


/* ==========================================================
   DESCRIÇÃO DA CATEGORIA
   ========================================================== */

.g-category-description {
    margin: 0 0 1.5rem;
}


/* ==========================================================
   MENSAGEM SEM FOTOS
   ========================================================== */

.g-empty-message {
    margin: 1.5rem 0;
    color: #555;
}


/* ==========================================================
   AJUSTES EXCLUSIVOS DA PÁGINA DE CATEGORIA
   A classe gallery-category-page é aplicada no HTML.
   ========================================================== */

.gallery-category-page {
    width: 100%;
    padding-top: 0;
    padding-bottom: 4vw;
    background: #fff;
    color: #050505;
}


/* Margens alinhadas ao conteúdo da página principal */

.gallery-category-page .gallery-content {
    width: 88%;
    max-width: none;
    margin-left: 6%;
    margin-right: 6%;
}


/* Navegação */

.gallery-category-page .g-breadcrumb {
    margin-top: 2vw;
    margin-bottom: 1.5vw;
    font-size: .95rem;
    color: #555;
}


/* Texto de apresentação */

.gallery-category-page .g-category-description {
    color: #333;
    font-size: clamp(14px, 1.4vw, 22px);
    line-height: 1.42;
    font-weight: 400;
    letter-spacing: .025em;
    text-align: justify;
    margin: 0 0 2vw 0;
}


/* ==========================================================
   GRADE DE FOTOS DA CATEGORIA
   ========================================================== */

.gallery-category-page .g-category-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.65rem, 1.5vw, 1rem);
    align-items: start;
    width: 100%;
    margin-top: 2vw;
}


/* Cartões das fotos: bordas retas */

.gallery-category-page .g-photo-link {
    display: block;
    width: 100%;
    overflow: hidden;
    background: black;
    border-radius: 0; /* Remove bordas arredondadas */
}


/* Imagens da categoria */

.gallery-category-page .g-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0; /* Remove bordas arredondadas */
    transition: transform .25s ease;
}


/* ==========================================================
   BOTÃO VER MAIS
   Bordas retas
   ========================================================== */

.gallery-category-page .g-load-more {
    display: inline-flex;
    margin: 2vw 0;
    padding: .85rem 1.5rem;
    background: #111;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0; /* Remove bordas arredondadas */
}

.gallery-category-page .g-load-more:hover {
    background: #333;
}


/* ==========================================================
   LINK PARA VOLTAR
   Bordas retas
   ========================================================== */

.gallery-category-page .gallery-contact {
    margin-top: 2vw;
    margin-bottom: 2vw;
}

.gallery-category-page .g-category-link {
    display: inline-flex;
    width: auto;
    margin: 0;
    padding: .85rem 1.3rem;
    border-radius: 0; /* Remove bordas arredondadas */
}


/* ==========================================================
   MENSAGEM DE CATEGORIA VAZIA
   ========================================================== */

.gallery-category-page .g-empty-message {
    color: #555;
    font-size: 1rem;
    margin: 2vw 0;
}


/* ==========================================================
   TÍTULOS DA PÁGINA DE CATEGORIA
   ========================================================== */

.gallery-category-page .titulo_servicos {
    margin: 2vw 0;
}

.titulo_galeria {
    color: #050505;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(28px, 3.5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -.025em;
    text-align: left;
    margin: 2vw 0;
}


/* ==========================================================
   TABLETS
   ========================================================== */

@media (max-width: 1000px) {

    .gallery-category-page .g-category-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* ==========================================================
   CELULARES
   ========================================================== */

@media (max-width: 600px) {

    .gallery-content {
        width: min(100% - 1.25rem, 1200px);
    }

    .g-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }

    .g-category-list {
        grid-template-columns: 1fr;
    }

    .g-load-more,
    .g-category-link {
        width: 100%;
    }


    /* Margens laterais da página de categoria */

    .gallery-category-page .gallery-content {
        width: 94%;
        margin-left: 3%;
        margin-right: 3%;
    }

    .gallery-category-page .g-breadcrumb {
        margin-top: 4vw;
        margin-bottom: 4vw;
    }

    .gallery-category-page .titulo_servicos {
        font-size: clamp(25px, 7vw, 36px);
        line-height: 1.08;
        margin: 4vw 0 3vw;
    }

    .gallery-category-page .g-category-description {
        font-size: 15px;
        line-height: 1.5;
        text-align: left;
        margin-bottom: 5vw;
    }

    .gallery-category-page .g-category-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
        margin-top: 4vw;
    }

    .gallery-category-page .g-photo {
        aspect-ratio: 3 / 4;
    }

    .gallery-category-page .g-load-more,
    .gallery-category-page .g-category-link {
        width: 100%;
        margin-top: 4vw;
        margin-bottom: 3vw;
    }

    .gallery-category-page .gallery-contact {
        margin-top: 4vw;
    }

}


/* ==========================================================
   ACESSIBILIDADE — MOVIMENTO REDUZIDO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .g-photo,
    .g-load-more,
    .g-category-link {
        transition: none;
    }

}


/* ==========================================================
   CORREÇÃO: REMOVER CANTOS ARREDONDADOS DA GALERIA
   ========================================================== */

.gallery-category-page *,
.gallery-page *,
.g-photo,
.g-photo-link,
.g-photo img,
.g-category-card,
.g-category-link,
.g-accordion,
.g-load-more,
button {
    border-radius: 0 !important;
}


/* ==========================================================
   GALERIA UNIFICADA — LOTES ALEATÓRIOS E CONTADORES
   ========================================================== */
.gallery-page .gallery-content {
    width: min(88%, 1440px);
    margin-inline: auto;
}
.gallery-page .titulo_servicos {
    margin: 2rem 0 1.5rem;
}
.gallery-page .gallery-content > p {
    line-height: 1.65;
    margin: 0 0 1rem;
}
.gallery-page .g-group {
    margin: 2.5rem 0;
}
.gallery-page .g-remaining {
    margin: .5rem 0 1rem;
    font-weight: 700;
    color: #333;
}
.gallery-page .g-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: clamp(.6rem, 1.3vw, 1rem);
}
.gallery-page .g-photo-link {
    display: block;
    overflow: hidden;
    background: #f3f3f3;
    border: 1px solid #e2e2e2;
}
.gallery-page .g-photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    height: auto;
    background: #f3f3f3;
    transition: transform .25s ease;
}
.gallery-page .g-photo-link:hover .g-photo {
    transform: scale(1.035);
}
.gallery-page .g-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: .7rem;
    margin-top: 1rem;
}
.gallery-page .g-category-card {
    display: block;
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid #dedede;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.gallery-page .g-category-card:hover:not(:disabled) {
    background: #f7f7f7;
    border-color: #b88a2b;
    transform: translateY(-1px);
}
.gallery-page .g-category-card:focus-visible {
    outline: 3px solid #d69b28;
    outline-offset: 3px;
}
.gallery-page .g-category-card:disabled {
    opacity: .55;
    cursor: default;
}
.gallery-page .g-category-heading {
    margin: 0 0 .35rem;
    font-size: 1rem;
}
.gallery-page .g-category-count {
    margin: 0;
    color: #555;
    font-size: .9rem;
}
.gallery-page .g-load-more:disabled {
    opacity: .55;
    cursor: default;
}
@media (max-width: 600px) {
    .gallery-page .gallery-content {
        width: 94%;
    }
    .gallery-page .g-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }
    .gallery-page .g-category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* AJUSTES FINAIS DA GALERIA UNIFICADA */
.gallery-page.section_servicos .gallery-content > h1.titulo_servicos {
    margin: 2rem 0 1.5rem !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

/* As fotos originais do catálogo têm proporção vertical 900 x 1200. */
.gallery-page .g-preview-grid .g-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center;
}
