/* ==========================================================================
   Cases — estilos do template de página de Case (piloto).
   Namespace .case- (mesmo padrão de conhecimento.css/.conh- e servicos.css/.svc-).
   Reaproveita as variáveis de tema já definidas em css/style.css (--primary,
   --dark, --light etc.) -- não redefine paleta própria.
   ========================================================================== */

.case-breadcrumb {
    padding: 14px 0;
    font-size: 13px;
}

.case-breadcrumb ol {
    margin: 0;
}

/* ---- Hero ---- */
.case-hero {
    position: relative;
    padding: 64px 0 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2135 100%);
    color: #fff;
    overflow: hidden;
}

.case-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--case-hero-img);
    background-size: cover;
    background-position: center;
    opacity: .18;
    z-index: 0;
}

.case-hero .container {
    position: relative;
    z-index: 1;
}

.case-hero-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 18px;
}

.case-hero h1 {
    color: #fff;
    font-weight: 700;
    font-size: 2.35rem;
    line-height: 1.18;
    margin-bottom: 14px;
    max-width: 820px;
}

.case-hero-sub {
    color: rgba(255, 255, 255, .86);
    font-size: 1.08rem;
    max-width: 680px;
    margin-bottom: 28px;
}

.case-quickfacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    overflow: hidden;
}

.case-quickfact {
    flex: 1 1 200px;
    padding: 16px 20px;
    border-right: 1px solid rgba(255, 255, 255, .16);
}

.case-quickfact:last-child {
    border-right: none;
}

.case-quickfact dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 4px;
}

.case-quickfact dd {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* ---- Logo do cliente no Hero ---- */
.case-hero-client {
    display: inline-flex;
    align-items: center;
    margin-top: 22px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 6px;
}

.case-hero-client img {
    height: 36px;
    width: auto;
    display: block;
}

@media (min-width: 992px) {
    .case-hero-client {
        position: absolute;
        top: 28px;
        right: 15px;
        margin-top: 0;
    }

    .case-hero-client img {
        height: 42px;
    }
}

/* ---- Seções gerais ---- */
.case-section {
    padding: 56px 0;
    border-bottom: 1px solid #eef0f2;
}

.case-section:last-of-type {
    border-bottom: none;
}

.case-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 22px;
}

.case-section-title small {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.case-lede {
    font-size: 1.05rem;
    color: #4a4a4a;
    line-height: 1.75;
}

.case-bg-light {
    background: var(--light);
}

/* ---- Overview ---- */
.case-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 22px;
}

.case-overview-item dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8a8a8a;
    margin-bottom: 4px;
}

.case-overview-item dd {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* ---- Timeline (CaseTimeline) ---- */
.case-timeline {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.case-timeline-item {
    position: relative;
    padding: 0 0 30px 26px;
    border-left: 2px solid #dde1e5;
}

.case-timeline-item:last-child {
    padding-bottom: 0;
}

.case-timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #dde1e5;
}

.case-timeline-year {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.case-timeline-label {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    color: var(--dark);
}

.case-timeline-detail {
    display: block;
    margin-top: 4px;
    font-size: 13.5px;
    color: #6a6a6a;
}

@media (min-width: 768px) {
    .case-timeline {
        flex-direction: row;
    }

    .case-timeline-item {
        flex: 1;
        padding: 26px 24px 0 0;
        border-left: none;
        border-top: 2px solid #dde1e5;
    }

    .case-timeline-item::before {
        left: 0;
        top: -7px;
    }

    .case-timeline-item:last-child {
        padding-right: 0;
    }
}

/* ---- Serviços executados ---- */
.case-services {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.case-service-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #e3e7eb;
    border-radius: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

.case-service-chip:hover,
.case-service-chip:focus-visible {
    border-color: var(--primary);
    transform: translateY(-1px);
    color: var(--primary);
    text-decoration: none;
}

.case-service-chip i {
    color: var(--primary);
}

.case-service-chip .case-service-note {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: #8a8a8a;
}

/* ---- Engenharia em números ---- */
.case-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: #e3e7eb;
    border: 1px solid #e3e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.case-metric {
    background: #fff;
    padding: 24px 20px;
    text-align: left;
}

.case-metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.case-metric-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-left: 2px;
}

.case-metric-label {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6a6a6a;
}

/* ---- Galeria técnica ---- */
.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.case-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.case-gallery-item img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.case-gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #fff;
    background: linear-gradient(0deg, rgba(15, 33, 53, .82) 0%, rgba(15, 33, 53, 0) 100%);
}

/* ---- Localização ---- */
.case-location-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: var(--light);
    border: 1px solid #e3e7eb;
    border-radius: 8px;
    padding: 22px 26px;
}

.case-location-text strong {
    display: block;
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 4px;
}

.case-location-text span {
    color: #6a6a6a;
    font-size: 14px;
}

/* ---- Figura de mapa (georreferenciamento) ---- */
.case-map-title {
    margin: 30px 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.case-map-intro {
    font-size: 14.5px;
    margin-bottom: 0;
}

.case-map-figure {
    margin: 16px 0 0;
}

.case-map-figure img {
    display: block;
    width: 100%;
    border: 1px solid #e3e7eb;
    border-radius: 8px;
}

.case-map-figure figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #6a6a6a;
}

/* ---- Na imprensa ---- */
.case-press-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-press-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e3e7eb;
    border-radius: 8px;
}

.case-press-source {
    flex: none;
    min-width: 190px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--primary);
}

.case-press-item a {
    color: var(--dark);
    text-decoration: none;
}

.case-press-item a:hover,
.case-press-item a:focus-visible {
    color: var(--primary);
    text-decoration: underline;
}

.case-press-item i {
    font-size: 11px;
    color: #9a9a9a;
}

/* ---- Da investigação à infraestrutura (CaseEvolution) ---- */
.case-pending-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 18px;
    background: #fdf8ee;
    border: 1px dashed #d9c48a;
    border-radius: 8px;
    font-size: 13.5px;
    color: #6a5a30;
}

.case-pending-note i {
    margin-top: 2px;
    color: #b4913c;
}

.case-evolution-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.case-evolution-frame {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    border: 1px solid #e3e7eb;
}

.case-evolution-frame img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.case-evolution-frame figcaption {
    padding: 10px 14px;
    font-size: 13px;
    color: #4a4a4a;
    background: #fff;
}

.case-evolution-year {
    display: block;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.case-evolution-detail {
    margin: 20px 0 0;
}

.case-evolution-detail img {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e3e7eb;
}

.case-evolution-detail figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: #6a6a6a;
}

.case-signature {
    margin: 30px 0 0;
    padding-top: 22px;
    border-top: 1px solid #eef0f2;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark);
}

/* ---- CTA ---- */
.case-cta {
    background: var(--primary);
    color: #fff;
    padding: 44px 0;
    text-align: center;
}

.case-cta h2 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.case-cta p {
    color: rgba(255, 255, 255, .82);
    max-width: 560px;
    margin: 0 auto 22px;
}

.case-cta .btn {
    margin: 0 6px;
}

@media (max-width: 767.98px) {
    .case-hero { padding: 44px 0 32px; }
    .case-hero h1 { font-size: 1.65rem; }
    .case-quickfact { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.16); }
    .case-quickfact:last-child { border-bottom: none; }
    .case-section { padding: 40px 0; }
}

/* ==========================================================================
   Hub de Cases (/cases/) -- destaque + grid de cards + filtros por segmento.
   Mesmo namespace .case-, prefixo .case-hub- pra não colidir com o
   template de página de case individual acima.
   ========================================================================== */
.case-hub-intro {
    padding: 48px 0 8px;
}

.case-hub-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.case-hub-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.case-hub-subtitle {
    font-size: 1.05rem;
    color: #6a6a6a;
    line-height: 1.65;
}

/* ---- Filtros por segmento ---- */
.case-hub-filters {
    padding: 24px 0 8px;
}

.case-hub-filters-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin: 0;
    list-style: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.case-hub-filter {
    flex: none;
    padding: 8px 16px;
    border: 1px solid #dde1e5;
    border-radius: 20px;
    background: #fff;
    color: #4a4a4a;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.case-hub-filter:hover,
.case-hub-filter:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
}

.case-hub-filter.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- Case em destaque ---- */
.case-hub-featured-wrap {
    padding: 28px 0 8px;
}

.case-hub-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
    border: 1px solid #e3e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.case-hub-featured-media {
    position: relative;
    min-height: 320px;
    background: #eee;
}

.case-hub-featured-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-hub-featured-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(15, 33, 53, .78);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.case-hub-featured-body {
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-hub-featured-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.28;
    margin: 8px 0 14px;
}

.case-hub-featured-title a {
    color: inherit;
    text-decoration: none;
}

.case-hub-featured-title a:hover,
.case-hub-featured-title a:focus-visible {
    color: var(--primary);
}

.case-hub-featured-summary {
    font-size: 15px;
    color: #55585e;
    line-height: 1.7;
    margin-bottom: 20px;
}

.case-hub-featured-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 0 0 22px;
    padding: 18px 0 0;
    border-top: 1px solid #eef0f2;
    list-style: none;
}

.case-hub-featured-stats li {
    font-size: 13px;
    color: var(--dark);
    font-weight: 600;
}

.case-hub-featured-stats li span {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9a9a9a;
    margin-top: 2px;
}

@media (max-width: 991.98px) {
    .case-hub-featured { grid-template-columns: 1fr; }
    .case-hub-featured-media { min-height: 220px; }
    .case-hub-featured-body { padding: 26px 24px; }
}

/* ---- Grid de cards ---- */
.case-hub-grid {
    padding: 32px 0 64px;
}

.case-hub-grid-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

.case-hub-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e3e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform .15s ease, box-shadow .15s ease;
}

.case-hub-card:hover,
.case-hub-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 33, 53, .08);
}

.case-hub-card-img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #eee;
}

.case-hub-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.case-hub-card-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.case-hub-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.case-hub-card-title a {
    color: inherit;
    text-decoration: none;
}

.case-hub-card-title a:hover,
.case-hub-card-title a:focus-visible {
    color: var(--primary);
}

.case-hub-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8a8a8a;
    margin-bottom: 12px;
}

.case-hub-card-location i {
    font-size: 10px;
    color: var(--primary);
}

.case-hub-card-summary {
    font-size: 13.5px;
    color: #6a6a6a;
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.case-hub-card-scale {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dark);
    padding-top: 12px;
    margin-bottom: 16px;
    border-top: 1px solid #eef0f2;
}

.case-hub-card-link {
    margin-top: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.case-hub-card-link i {
    margin-left: 4px;
    font-size: 11px;
}

.case-hub-card-link:hover,
.case-hub-card-link:focus-visible {
    text-decoration: underline;
}

/* ---- Estado vazio (filtro sem resultado / segmento ainda sem case) ---- */
.case-hub-empty {
    display: none;
    padding: 40px 24px;
    text-align: center;
    color: #8a8a8a;
    font-size: 14px;
    border: 1px dashed #dde1e5;
    border-radius: 8px;
}

.case-hub-empty.is-visible {
    display: block;
}

/* ---- CTA discreto de fechamento ---- */
.case-hub-cta {
    padding: 8px 0 56px;
}

.case-hub-cta-box {
    padding: 30px 34px;
    background: var(--light);
    border-radius: 10px;
    text-align: center;
}

.case-hub-cta-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.case-hub-cta-box p {
    font-size: 14px;
    color: #6a6a6a;
    max-width: 520px;
    margin: 0 auto 18px;
}

/* ---- Faixa "Já é cliente" (footer.php, global) menos dominante só nesta página ---- */
.pg-cases .cliente-strip {
    padding: 12px 0;
    border-top: 1px solid #e3e7eb;
    background: #f7f8f9;
}

.pg-cases .cliente-strip-left i {
    font-size: 1.2rem;
}

.pg-cases .cliente-strip-left h2 {
    font-size: .92rem;
}

.pg-cases .cliente-strip-left p {
    font-size: .78rem;
}

.pg-cases .btn-cliente-strip {
    padding: 8px 18px;
    font-size: .82rem;
}

@media (max-width: 767.98px) {
    .case-hub-title { font-size: 1.5rem; }
}
