/*
Theme Name:   Hello Elementor Child
Description:  Tema filho do Hello Elementor - HPB Engenharia
Template:     hello-elementor
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

body,
.site-main,
.page-content {
    font-family: "Montserrat", sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", sans-serif;
}

/* Negrito mais suave no conteúdo dos posts */
.page-content strong,
.page-content b {
    font-weight: 500;
}

/* ===== Banner do post com overlay e título ===== */
.hpb-post-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 60vh;
    min-height: 380px;
    overflow: hidden;
    background: #1a1a1a;
}
.hpb-post-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Overlay: mais escuro no topo (menu) e embaixo (título) */
.hpb-post-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.30);
}
.hpb-post-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px; /* mesma largura do conteúdo */
    margin: 0 auto;
	padding: 0 2% 10%;
}
.hpb-post-hero .entry-title {
    color: #fff;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
	font-weight: 600;
    line-height: 1.15;
}

/* Post sem imagem: faixa escura só com o título */
.hpb-post-hero--sem-imagem {
    height: auto;
    min-height: 0;
    padding-top: 160px;
}

/* Espaço entre o banner, o texto e o footer */
.single-post .site-main {
    padding-top: 80px;
    padding-bottom: 100px;
}

@media (max-width: 767px) {
    .single-post .site-main {
        padding-top: 48px;
        padding-bottom: 64px;
    }
}

/* Telefone do header em branco */
#masthead a[href^="tel:"],
#masthead a[href^="tel:"]:hover,
#masthead a[href^="tel:"]:visited {
    color: #fff;
}

/* Cards do Post Grid com a mesma altura */
.eael-grid-post .eael-entry-title,
.eael-grid-post-holder h2 {
    min-height: 2.5em;
    line-height: 1.25;
    margin-bottom: 0;
}

/* ===== Post de Novidades ===== */
.hpb-novidade .site-main {
    padding-top: 150px;   /* espaço para o header fixo */
    padding-bottom: 100px;
}
.hpb-novidade-box {
    max-width: 940px;
    margin: 0 auto;
    padding: 60px 100px;
    border: 1px solid #e5e5e5;
    background: #fff;
}
.hpb-novidade-meta {
    font-size: 14px;
    color: #555;
}
.hpb-novidade-meta span { margin: 0 6px; }
.hpb-novidade-titulo {
    color: #004D70;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 600;
    line-height: 1.2;
    margin: 16px 0;
}

/* Posts recentes */
.hpb-recentes {
    max-width: 940px;
    margin: 60px auto 0;
}
.hpb-recentes-topo {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 24px;
}
.hpb-recentes-topo h2 { font-size: 1.1rem; margin: 0 0 10px; }
.hpb-recentes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.hpb-recente {
    border: 1px solid #e5e5e5;
    color: #222;
    text-decoration: none;
}
.hpb-recente img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.hpb-recente h3 {
    font-size: 1rem;
    line-height: 1.35;
    padding: 14px 16px;
    margin: 0;
}
.hpb-recente:hover h3 { color: #004D70; }

@media (max-width: 767px) {
    .hpb-novidade-box { padding: 32px 20px; border: 0; }
    .hpb-recentes { padding: 0 20px; }
    .hpb-recentes-grid { grid-template-columns: 1fr; }
}

/* ===== Arquivo de categorias (Novidades e demais) ===== */
.hpb-arquivo-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 380px;
    background: #1a1a1a center / cover no-repeat;
}
.hpb-arquivo-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
}
.hpb-arquivo-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1060px; /* mesma largura da lista de cards */
    margin: 0 auto;
    padding: 0 20px 48px;
}
.hpb-arquivo-titulo {
    color: #fff;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 600;
    line-height: 1.15;
}

.hpb-arquivo-main {
    max-width: 1060px;
    margin: 0 auto;
    padding: 100px 20px;
}
.hpb-lista-novidades {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Descrição da categoria no banner */
.hpb-arquivo-descricao {
    max-width: 720px;
    margin-top: 12px;
    color: rgba(255,255,255,.9);
    font-size: 1.05rem;
    line-height: 1.6;
}
.hpb-arquivo-descricao p { margin: 0; }

@media (max-width: 767px) {
    .hpb-arquivo-descricao { font-size: .95rem; }
}

/* Card horizontal: imagem à esquerda, texto à direita */
.hpb-card-novidade {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
    border: 1px solid #e5e5e5;
    background: #fff;
    transition: box-shadow .2s;
}
.hpb-card-novidade:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
/* Imagem preenche o espaço sem definir a altura do card */
.hpb-card-novidade__img {
    position: relative;
    overflow: hidden;
}
.hpb-card-novidade__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hpb-card-novidade__txt {
    padding: 32px 36px;
}
.hpb-card-novidade h2 {
    font-family: var(--e-global-typography-primary-font-family, inherit), sans-serif;
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 12px 0;
}
.hpb-card-novidade h2 a {
    color: #1a1a1a;
    text-decoration: none;
}
/* Card inteiro clicável */
.hpb-card-novidade h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.hpb-card-novidade:hover h2 a { color: #004D70; }
/* Resumo limitado a 3 linhas */
.hpb-card-novidade p {
    color: #444;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Paginação */
.hpb-arquivo-main .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}
.hpb-arquivo-main .page-numbers {
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    color: #004D70;
    text-decoration: none;
}
.hpb-arquivo-main .page-numbers.current {
    background: #004D70;
    border-color: #004D70;
    color: #fff;
}

@media (max-width: 767px) {
    .hpb-arquivo-hero { height: 280px; }
    .hpb-arquivo-hero__inner { padding: 0 16px 32px; }
    .hpb-arquivo-main { padding: 48px 16px; }
    .hpb-card-novidade { grid-template-columns: 1fr; min-height: 0; }
    .hpb-card-novidade__img { aspect-ratio: 16 / 10; }
    .hpb-card-novidade__txt { padding: 24px 20px; }
}

/* ===== Galeria em slide ===== */
.hpb-slider {
    position: relative;
    margin: 32px 0;
}
.page-content .wp-block-gallery.hpb-slider__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin: 0 !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.hpb-slider__track::-webkit-scrollbar { display: none; }

.hpb-slider__track > figure.wp-block-image {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    aspect-ratio: 16 / 10;
    scroll-snap-align: start;
}
.hpb-slider__track > figure.wp-block-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Setas */
.hpb-slider__btn {
    position: absolute;
    top: calc(50% - 22px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background .2s;
}
.hpb-slider__btn:hover { background: #004D70; }
.hpb-slider__btn--prev { left: 12px; }
.hpb-slider__btn--next { right: 12px; }

/* Bolinhas */
.hpb-slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.hpb-slider__dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
}
.hpb-slider__dots button.ativo { background: #004D70; }

/* ===== Ampliar imagem (lightbox) ===== */
.page-content img.hpb-zoom { cursor: zoom-in; }

.hpb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
    background: rgba(0,0,0,.9);
}
.hpb-lightbox.aberto { display: flex; }

.hpb-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}

.hpb-lightbox__fechar,
.hpb-lightbox__nav {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background .2s;
}
.hpb-lightbox__fechar:hover,
.hpb-lightbox__nav:hover { background: #004D70; }

.hpb-lightbox__fechar {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
}
.hpb-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 32px;
}
.hpb-lightbox__nav--prev { left: 12px; }
.hpb-lightbox__nav--next { right: 12px; }
.hpb-lightbox.unica .hpb-lightbox__nav { display: none; }

@media (max-width: 767px) {
    .hpb-lightbox { padding: 60px 10px; }
    .hpb-lightbox__nav { width: 40px; height: 40px; font-size: 26px; }
}