/* ===================================================================
   PAGE-HERO.CSS — HR PRÉ MOLDADOS — VERSÃO 2.0
   Heroes imersivos com foto de fundo para páginas internas

   ÍNDICE:
   1.  HERO BASE
   2.  BACKGROUND FOTO + OVERLAY
   3.  CONTEÚDO (kicker, título, desc, botões)
   4.  BARRA DE STATS (base + variações por página)
   5.  FITA DE MARCA
   6.  RESPONSIVIDADE
   =================================================================== */


/* ===================================================================
   1. HERO BASE
   =================================================================== */

.ph-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 115px; /* altura do header */
}


/* ===================================================================
   2. BACKGROUND FOTO + OVERLAY
   =================================================================== */

.ph-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ph-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay escurecedor + faixa laranja vertical sutil no canto esquerdo */
.ph-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            110deg,
            rgba(12, 14, 20, 0.92) 0%,
            rgba(12, 14, 20, 0.72) 45%,
            rgba(12, 14, 20, 0.35) 100%
        );
}

/* Faixa laranja vertical — detalhe de marca */
.ph-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    z-index: 1;
}

/* Variante para fotos muito escuras (Contato - APR38 noturno) */
.ph-hero--contato .ph-bg::after {
    background:
        linear-gradient(
            110deg,
            rgba(8, 10, 16, 0.80) 0%,
            rgba(8, 10, 16, 0.55) 60%,
            rgba(8, 10, 16, 0.30) 100%
        );
}

/* Variante sem foto — fundo escuro sólido com padrão HR visível */
.ph-hero--produto {
    background: #0c0e14;
}

.ph-hero--produto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    z-index: 2;
}

.ph-hero--produto .ph-pattern-overlay {
    opacity: 0.07;
}

/* Overlay padrão da marca — textura sutil */
.ph-pattern-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: url('../img/[PATTERN] HR PRE MOLDADOS - BRANCO.png');
    background-size: 180px;
    opacity: 0.025;
    pointer-events: none;
}


/* ===================================================================
   3. CONTEÚDO
   =================================================================== */

.ph-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 3rem 0 4rem;
}

.ph-body {
    max-width: 700px;
}

/* Kicker */
.ph-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(var(--primary-rgb, 232, 129, 58), 0.12);
    border: 1px solid rgba(var(--primary-rgb, 232, 129, 58), 0.3);
    padding: 6px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
}

/* Título */
.ph-title {
    display: flex;
    flex-direction: column;
    gap: 0.02em;
    margin-bottom: 1.5rem;
}

.ph-line {
    display: block;
    font-size: clamp(2.8rem, 5.5vw, 5.5rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 0.92;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.ph-accent { color: var(--primary); }

/* Descrição */
.ph-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.68);
    max-width: 520px;
    margin-bottom: 2.25rem;
    line-height: 1.8;
}

/* Termos de linha em destaque laranja dentro da descrição do hero */
.ph-desc strong {
    color: var(--primary);
    font-weight: 700;
}

/* Botões */
.ph-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ph-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.875rem 1.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    border-radius: var(--radius-md);
    transition: all 0.22s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
}

.ph-btn-fill {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.ph-btn-fill:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(var(--primary-rgb, 232, 129, 58), 0.45);
}

.ph-btn-ghost {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.ph-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb, 232, 129, 58), 0.08);
    transform: translateY(-3px);
}


/* ===================================================================
   4. BARRA DE STATS
   =================================================================== */

.ph-stats-bar {
    background: #080a10;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ph-stats-inner {
    display: grid;
    gap: 0;
}

/* Variações de colunas */
.ph-stats-inner--4 { grid-template-columns: repeat(4, 1fr); }
.ph-stats-inner--3 { grid-template-columns: repeat(3, 1fr); }
.ph-stats-inner--2 { grid-template-columns: repeat(2, 1fr); }

/* Item de stat numérico */
.ph-stat-item {
    min-width: 0;
    padding: 1.75rem 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.ph-stat-item:last-child { border-right: none; }

.ph-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.6s ease;
}

.ph-stat-item:hover::before { width: 100%; }

.ph-stat-num {
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.03em;
}

.ph-stat-num span { color: var(--primary); }

.ph-stat-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.5;
}

/* Item de stat com ícone (revendedores) */
.ph-stat-row-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.ph-stat-row-item:last-child { border-right: none; }

.ph-stat-icon {
    width: 42px;
    height: 42px;
    background: rgba(var(--primary-rgb, 232, 129, 58), 0.12);
    border: 1px solid rgba(var(--primary-rgb, 232, 129, 58), 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.ph-stat-row-content { display: flex; flex-direction: column; gap: 3px; }

.ph-stat-row-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.ph-stat-row-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Bloco de horários (contato) */
.ph-hours-block {
    min-width: 0;
    padding: 1.5rem 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ph-hours-block:last-child { border-right: none; }

.ph-hours-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.ph-hours-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
}

.ph-hours-row i {
    color: var(--primary);
    width: 14px;
    text-align: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.ph-hours-row strong {
    color: #fff;
    font-weight: 600;
}


/* ===================================================================
   5. FITA DE MARCA
   =================================================================== */

.ph-brand-fita {
    width: 100%;
    height: 64px;
    overflow: hidden;
    line-height: 0;
    display: block;
}

.ph-brand-fita img {
    width: 100%;
    height: 64px;
    display: block;
    object-fit: cover;
    object-position: center center;
}


/* ===================================================================
   6. RESPONSIVIDADE
   =================================================================== */

@media (max-width: 1024px) {
    .ph-hero { min-height: auto; }

    .ph-line { font-size: 2.8rem; }

    .ph-stats-inner--4 { grid-template-columns: repeat(2, 1fr); }
    .ph-stat-item:nth-child(3),
    .ph-stat-item:nth-child(4) {
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
    .ph-stat-item:nth-child(2),
    .ph-stat-item:nth-child(4) { border-right: none; }

    .ph-stats-inner--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .ph-hero { padding-top: 90px; }

    .ph-line { font-size: clamp(2rem, 8vw, 2.8rem); }
    .ph-desc { font-size: 0.92rem; }

    /* Overlay uniforme no mobile: troca gradiente horizontal por cobertura
       vertical neutra — esconde elementos visuais das bordas das fotos */
    .ph-bg::after {
        background: linear-gradient(
            180deg,
            rgba(12, 14, 20, 0.84) 0%,
            rgba(12, 14, 20, 0.76) 50%,
            rgba(12, 14, 20, 0.84) 100%
        );
    }

    /* Texto sempre legível independente da cor do fundo da foto */
    .ph-line {
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.7);
    }

    .ph-stats-inner--4,
    .ph-stats-inner--3 { grid-template-columns: 1fr 1fr; }

    .ph-stat-item { padding: 1.25rem 1rem; }

    .ph-stats-inner--3 .ph-stat-item:nth-child(3) {
        grid-column: span 2;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
}

@media (max-width: 480px) {
    .ph-content { padding: 2rem 0 2.5rem; }
    .ph-line { font-size: clamp(1.9rem, 7vw, 2.4rem); }
    .ph-kicker { font-size: 0.62rem; }

    /* Mobile pequeno: overlay ligeiramente mais denso */
    .ph-bg::after {
        background: rgba(12, 14, 20, 0.86);
    }

    .ph-actions {
        flex-direction: column;
        align-items: center;
    }

    .ph-stats-inner--4,
    .ph-stats-inner--3 { grid-template-columns: 1fr 1fr; }

    .ph-stat-num { font-size: 1.6rem; }

    .ph-stat-row-item { padding: 1rem; }

    .ph-hours-block { padding: 1rem; }

    .ph-stat-item { padding: 1.25rem 1rem; }
}

@media (min-width: 1400px) {
    .ph-line { font-size: clamp(4.5rem, 5.5vw, 6.5rem); }
    .ph-stat-item { padding: 2rem 2.5rem; }
}

@media (min-width: 2000px) {
    .ph-line { font-size: clamp(5.5rem, 6vw, 7.5rem); }
    .ph-desc { font-size: 1.15rem; }
}


/* ===================================================================
   7. HERO PRODUTO — Responsividade específica
   (ph-hero--produto: sem foto, background sólido + padrão HR)
   =================================================================== */

/* Desktop e notebooks: altura reduzida — sem foto para preencher o vazio */
@media (min-width: 1025px) {
    .ph-hero--produto { min-height: 72vh; }
}

/* Large desktop (≥ 1400px) */
@media (min-width: 1400px) {
    .ph-hero--produto { min-height: 68vh; }
}

/* Ultra-wide (≥ 2000px) */
@media (min-width: 2000px) {
    .ph-hero--produto { min-height: 60vh; }
}

/* Tablets retrato / large phones (769px – 1024px) */
/* min-height já é auto nessa faixa via regra base, só ajustar padding */
@media (max-width: 1024px) and (min-width: 769px) {
    .ph-hero--produto .ph-content { padding: 3rem 0 3.5rem; }
}

/* Tablets pequenos / large phones (≤ 768px) */
@media (max-width: 768px) {
    .ph-hero--produto .ph-content { padding: 2.5rem 0 3rem; }
}

/* Mobile médio (≤ 480px): botões full-width e centralizados */
@media (max-width: 480px) {
    .ph-hero--produto .ph-actions { align-items: stretch; }
    .ph-hero--produto .ph-btn   { justify-content: center; }
}

/* Mobile pequeno (≤ 375px) */
@media (max-width: 375px) {
    .ph-hero--produto {
        padding-top: 78px;
    }
    .ph-hero--produto .ph-content {
        padding: 1.5rem 0 2rem;
    }
    .ph-hero--produto .ph-desc {
        font-size: 0.875rem;
        margin-bottom: 1.75rem;
    }
}


/* ===================================================================
   8. FOCO DE IMAGEM POR PÁGINA — mobile
   object-position ajustado por página para exibir o ponto de
   interesse correto da foto em viewports estreitos.
   Usa !important para sobrescrever os inline styles do HTML.
   =================================================================== */

@media (max-width: 768px) {

    /* Sobre Nós (APR 35): parede com QR code à direita — foca no lado esquerdo */
    .ph-hero--sobre .ph-bg img {
        object-position: left center !important;
    }

    /* Obras (APR 42): caminhão — mantém foco vertical já definido inline */
    .ph-hero--obras .ph-bg img {
        object-position: center 65% !important;
    }

    /* Qualidade (APR 43): equipamentos — mantém foco no topo */
    .ph-hero--qualidade .ph-bg img {
        object-position: center 30% !important;
    }

    /* Revendedores (APR 37): fachada laranja com logo HR — overlay mais denso
       para garantir legibilidade do título ph-accent (laranja sobre laranja) */
    .ph-hero--revendedores .ph-bg::after {
        background: rgba(12, 14, 20, 0.88) !important;
    }
    .ph-hero--revendedores .ph-bg img {
        object-position: left 40% !important;
    }

    /* Contato (APR 38) — mantém centro */
    .ph-hero--contato .ph-bg img {
        object-position: center 50% !important;
    }

    /* Contato tem overlay específico com maior especificidade — sobrescrever no mobile */
    .ph-hero--contato .ph-bg::after {
        background: linear-gradient(
            180deg,
            rgba(8, 10, 16, 0.86) 0%,
            rgba(8, 10, 16, 0.78) 50%,
            rgba(8, 10, 16, 0.86) 100%
        ) !important;
    }
}
