/* [cfp_historico] — texto da história, primeira logomarca, linha do tempo em fotos e projetos de pesquisa; a foto ampliada é a mesma da galeria. */
.cfph { --h-titulo: #2a4b7c; --h-linha: #c9d6e6; --h-ponto: #0d8f84; --h-sutil: #5b6b7d; max-width: 1080px; margin: 0 auto; font-family: 'Inter', 'Segoe UI', Roboto, sans-serif; color: var(--cfp-tinta); }
html.ceclimar-dark-mode .cfph { --h-titulo: #8fb4e8; --h-linha: #33465e; --h-ponto: #3cc7b8; --h-sutil: #9fb0c3; }
.cfph *, .cfph *::before, .cfph *::after { box-sizing: border-box; }
.cfph.cfph h2, .cfph.cfph h3, .cfph.cfph p, .cfph.cfph figure, .cfph.cfph ol { margin: 0; padding: 0; }

.cfph.cfph .cfph-titulo { margin: 8px 0 20px; text-align: center; font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.25 'Inter', sans-serif; letter-spacing: 0.01em; text-transform: uppercase; color: var(--h-titulo); }
.cfph.cfph h3 { margin: 0 0 18px; font: 600 clamp(1.15rem, 1.9vw, 1.4rem)/1.3 'Inter', sans-serif; color: var(--h-titulo); }

/* índice */
.cfph-indice { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 40px; }
.cfph.cfph .cfph-indice a { padding: 7px 16px; border: 1px solid var(--h-linha); border-radius: 999px; font: 500 0.88rem/1.2 'Inter', sans-serif; color: var(--h-titulo) !important; text-decoration: none !important; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.cfph.cfph .cfph-indice a:hover { background: var(--h-titulo); border-color: var(--h-titulo); color: #fff !important; }
html.ceclimar-dark-mode .cfph.cfph .cfph-indice a:hover { color: #0f1a26 !important; }
.cfph section { scroll-margin-top: 110px; }

/* a história */
.cfph-historia { display: flow-root; }
.cfph-historia p { margin: 0 0 1.1em !important; font-size: 1rem; line-height: 1.8; text-align: justify; hyphens: auto; }
.cfph.cfph .cfph-historia h3 { clear: both; margin-top: 36px; }
.cfph-video { margin: 0 0 32px; }
.cfph .cfph-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0 !important; border-radius: 14px; overflow: hidden; background: #000 !important; cursor: pointer; }
.cfph .cfph-play img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.25s ease, transform 0.6s ease; }
.cfph .cfph-play:hover img { opacity: 1; transform: scale(1.02); }
.cfph .cfph-play span { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); border-radius: 14px; background: #e02424; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease; }
.cfph .cfph-play span::after { content: ''; position: absolute; left: 31px; top: 16px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.cfph .cfph-play:hover span { transform: translate(-50%, -50%) scale(1.08); }
.cfph-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }
.cfph.cfph .cfph-pedra { float: right; width: min(300px, 40%); margin: 4px 0 20px 32px; }

/* fotos (miniaturas que ampliam ao clicar) */
.cfph-foto a { display: block; border-radius: 10px; overflow: hidden; background: rgba(128, 128, 128, 0.15); cursor: zoom-in; }
.cfph-foto img { display: block; width: 100%; height: auto; margin: 0 !important; border-radius: 0 !important; transition: transform 0.5s ease; }
.cfph-foto a:hover img { transform: scale(1.04); }
.cfph-foto a:focus-visible { outline: 3px solid var(--h-ponto); outline-offset: 2px; }
.cfph-foto figcaption { margin-top: 8px; font-size: 0.84rem; line-height: 1.45; color: var(--h-sutil); text-align: center; }

/* fileira de fotos com a mesma altura, cada uma na sua proporção */
.cfph-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.cfph-fotos .cfph-foto { flex: var(--r) 1 calc(var(--r) * 170px); min-width: 0; }
.cfph-fotos .cfph-foto img { aspect-ratio: var(--r); object-fit: cover; }
.cfph-fotos::after { content: ''; flex: 999 1 0; }   /* a última fileira não estica demais */

/* primeira logomarca */
.cfph-logo { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--h-linha); }
.cfph-logo-corpo { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 28px; }
.cfph-logo-corpo p { font-size: 1rem; line-height: 1.8; }
.cfph-logo-img a { background: #fff; }
.cfph-logo-img img { padding: 10px; }

/* linha do tempo */
.cfph-secao { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--h-linha); }
.cfph-intro { margin: 0 0 1em !important; font-size: 1rem; line-height: 1.8; }
.cfph.cfph .cfph-linha { position: relative; margin-top: 28px; padding-left: 34px; list-style: none; }
.cfph-linha::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--h-linha); }
.cfph-momento { position: relative; margin: 0 0 44px !important; padding: 0 !important; list-style: none !important; }
.cfph-momento::before { content: ''; position: absolute; left: -31px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--h-ponto); box-shadow: 0 0 0 4px var(--cfpp-fundo, #fff); }
html.ceclimar-dark-mode .cfph-momento::before { box-shadow: 0 0 0 4px var(--cfpp-fundo, #111a24); }
.cfph-momento p { margin: 0 0 0.5em !important; font-size: 0.98rem; line-height: 1.7; }
.cfph-momento p strong { color: var(--h-titulo); }
.cfph-momento .cfph-fotos { margin-top: 14px; }

/* foto ampliada */
.cfph-janela { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.cfph-janela::backdrop { background: rgba(4, 10, 16, 0.92); backdrop-filter: blur(6px); }
.cfph-janela[open] { display: flex; align-items: center; justify-content: center; }
.cfph-janela figure { margin: 0; max-width: calc(100vw - 150px); text-align: center; }
.cfph-janela img { display: block; max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.cfph-janela figcaption { max-width: 760px; margin: 12px auto 0; font: 500 0.95rem/1.5 'Inter', sans-serif; color: rgba(255, 255, 255, 0.85); }
.cfph-janela figcaption:empty { display: none; }
.cfph-janela button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0 !important; border-radius: 50%;
    background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; font: 400 1.4rem/1 'Inter', sans-serif; cursor: pointer; }
.cfph-janela button:hover { background: rgba(255, 255, 255, 0.28) !important; }
.cfph-fecha { top: 18px; right: 18px; font-size: 1.8rem !important; }
.cfph-ant { left: 18px; top: 50%; transform: translateY(-50%); }
.cfph-prox { right: 18px; top: 50%; transform: translateY(-50%); }
.cfph-conta { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font: 600 0.8rem 'Inter', sans-serif; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 760px) {
    .cfph-historia p { text-align: left; }
    .cfph.cfph .cfph-pedra { float: none; width: min(260px, 80%); margin: 0 auto 24px; }
    .cfph-logo-corpo { grid-template-columns: 1fr; }
    .cfph-logo-img { width: 200px; margin: 0 auto; }
    .cfph-fotos .cfph-foto { flex-basis: calc(var(--r) * 110px); }
    .cfph.cfph .cfph-linha { padding-left: 26px; }
    .cfph-linha::before { left: 5px; }
    .cfph-momento::before { left: -26px; width: 12px; height: 12px; }
    .cfph-janela figure { max-width: calc(100vw - 24px); }
    .cfph-ant, .cfph-prox { top: auto; bottom: 12px; transform: none; }
    .cfph-conta { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { .cfph * { transition: none !important; } }
