/**
 * DELMAT Engenharia & Tecnologia
 * Redesign da pagina "Sobre / Nossa Historia" (empresa.php)
 *
 * Harmoniza a pagina institucional com a home e as landings de Projetos.
 * Reaproveita os primitivos de projetos-eletricos.css (.pe-hero, .pe-divider,
 * .pe-section, .pe-cards-4, .pe-card, .pe-tiles, .pe-steps, .pe-obra-cards) e
 * adiciona aqui apenas o que e proprio desta pagina: a faixa de numeros
 * grande, o grid de "Nossa Historia" (texto + foto grande), o grid de 5 cards
 * de "Por que a DELMAT e diferente" e a secao de sustentabilidade azul com
 * foto de fundo.
 *
 * Namespace: .sb-* (sobre). Herda as CSS vars de projetos-eletricos.css;
 * redefine localmente como fallback.
 */

:root {
    --pe-primary: #00349A;
    --pe-primary-dark: #002B7F;
    --pe-blue-vivid: #1D4ED8;
    --pe-ink: #0F172A;
    --pe-text: #334155;
    --pe-muted: #475569;
    --pe-soft: #F1F3F8;
    --pe-border: #E2E8F0;
    --pe-radius: 20px;
}

/* ===================================================================
   3. FAIXA DE NUMEROS GRANDE (trust bar institucional)
   =================================================================== */
.sb-stats {
    background: var(--pe-soft);
    padding: 56px 0;
}

.sb-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
}

.sb-stat {
    text-align: center;
    padding: 12px 24px;
    position: relative;
}

/* Separadores sutis entre os indicadores */
.sb-stat:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 64px;
    background: var(--pe-border);
}

.sb-stat__num {
    display: block;
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: var(--pe-primary);
    letter-spacing: -0.02em;
}

.sb-stat__label {
    display: block;
    margin-top: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--pe-muted);
}

/* ===================================================================
   4. NOSSA HISTORIA (texto + foto grande, 2 colunas)
   =================================================================== */
.sb-historia__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: center;
}

.sb-historia__title {
    font-size: 36px;
    font-weight: 700;
    color: var(--pe-ink);
    margin-bottom: 24px;
}

.sb-historia__lead {
    font-size: 19px;
    line-height: 1.65;
    color: var(--pe-text);
    margin-bottom: 18px;
}

.sb-historia__text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--pe-text);
    margin-bottom: 18px;
}

.sb-historia__text:last-child {
    margin-bottom: 0;
}

.sb-historia__img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(0, 52, 154, 0.18);
}

/* ===================================================================
   8. POR QUE A DELMAT E DIFERENTE (5 cards uniformes)
   =================================================================== */
.sb-grid-5 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Botoes preservados (ex-CTA de "Por que escolher") */
.sb-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

/* ===================================================================
   10. SUSTENTABILIDADE (azul escuro + foto de fundo + overlay)
   =================================================================== */
.sb-esg {
    position: relative;
    padding: 88px 0;
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
    overflow: hidden;
}

.sb-esg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 52, 154, 0.92) 0%, rgba(0, 23, 70, 0.86) 100%);
}

.sb-esg__inner {
    position: relative;
    z-index: 1;
}

.sb-esg__title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.sb-esg__lead {
    max-width: 820px;
    margin: 0 auto 48px;
    text-align: center;
    font-size: 18px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
}

.sb-esg__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sb-esg__card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--pe-radius);
    padding: 28px 26px;
    backdrop-filter: blur(6px);
}

.sb-esg__card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
}

.sb-esg__card-title i {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

.sb-esg__card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sb-esg__card li {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
}

.sb-esg__cta {
    text-align: center;
    margin-top: 48px;
    position: relative;
    z-index: 1;
}

/* Cabecalho de subsecao (H3) reaproveitado em "Como trabalhamos" */
.sb-subhead {
    text-align: center;
    margin: 48px auto 28px;
    max-width: 720px;
}

.sb-subhead:first-of-type {
    margin-top: 8px;
}

.sb-subhead__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--pe-ink);
}

.sb-subhead__sub {
    margin-top: 10px;
    font-size: 16px;
    color: var(--pe-muted);
    line-height: 1.55;
}

/* ===================================================================
   RESPONSIVO
   =================================================================== */
@media (max-width: 1024px) {
    .sb-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 0;
    }

    /* Remove o separador da 2a coluna; mantem so o do meio das linhas */
    .sb-stat:nth-child(2)::after {
        display: none;
    }

    .sb-grid-5,
    .sb-esg__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sb-stats__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .sb-stat::after {
        display: none !important;
    }

    .sb-stat__num {
        font-size: 52px;
    }

    .sb-historia__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sb-historia__img {
        max-height: 320px;
    }

    .sb-historia__title {
        font-size: 28px;
    }

    .sb-grid-5,
    .sb-esg__grid {
        grid-template-columns: 1fr;
    }

    .sb-esg {
        padding: 64px 0;
    }

    .sb-esg__title {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-historia__img {
        transition: none;
    }
}
