/* [cfp_extensao] — página de Extensão: abertura, projetos (com janela de detalhes), quiz e cartões do ceclimar-header. */
.cfpx { --x-titulo: #2a4b7c; --x-cartao: #fff; --x-borda: rgba(14, 42, 63, 0.09); --x-sombra: 0 1px 2px rgba(14, 42, 63, 0.05), 0 8px 24px rgba(14, 42, 63, 0.07);
    --x-agua: var(--cfp-agua, #0d8f84); --x-coral: var(--cfp-coral, #e0705f); --x-suave: var(--cfp-suave, #5f6b75);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif; color: var(--cfp-tinta, #16222c); }
html.ceclimar-dark-mode .cfpx { --x-titulo: #8fb4e8; --x-cartao: #1b232c; --x-borda: rgba(255, 255, 255, 0.08); --x-sombra: 0 8px 24px rgba(0, 0, 0, 0.3); --x-agua: #3cc7b8; }
.cfpx *, .cfpx *::before, .cfpx *::after { box-sizing: border-box; }
.cfpx.cfpx h2, .cfpx.cfpx h3, .cfpx.cfpx p, .cfpx.cfpx ul { margin: 0; padding: 0; }
.cfpx.cfpx ul { list-style: none; }
.cfpx.cfpx ul > li { margin: 0; padding: 0; list-style: none; }

.cfpx.cfpx .cfpx-abertura { max-width: 820px; margin: 0 auto 26px; font-size: clamp(1.02rem, 1.6vw, 1.15rem); line-height: 1.75; text-align: center; }
.cfpx-indice { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 44px; }
.cfpx.cfpx .cfpx-indice a { padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--x-borda); font: 500 0.88rem/1.2 'Inter', sans-serif; color: var(--x-titulo) !important; text-decoration: none !important; transition: background 0.2s ease, color 0.2s ease; }
.cfpx.cfpx .cfpx-indice a:hover { background: var(--x-titulo); color: #fff !important; }
html.ceclimar-dark-mode .cfpx.cfpx .cfpx-indice a:hover { color: #0f1a26 !important; }

.cfpx-secao { margin-bottom: 64px; scroll-margin-top: 110px; }
.cfpx.cfpx .cfpx-h2 { margin-bottom: 20px; font: 700 clamp(1.3rem, 2.2vw, 1.6rem)/1.25 'Inter', sans-serif; color: var(--x-titulo); text-transform: none; letter-spacing: -0.01em; }

/* projetos */
.cfpx.cfpx .cfpx-projetos { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.cfpx .cfpx-projeto { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 20px !important; overflow: hidden;
    background: var(--x-cartao) !important; color: inherit !important; box-shadow: var(--x-sombra), inset 0 0 0 1px var(--x-borda); text-align: left; font: inherit !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease; white-space: normal !important; overflow-wrap: anywhere; }
.cfpx .cfpx-projeto:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(14, 42, 63, 0.06), 0 18px 40px rgba(14, 42, 63, 0.13); }
.cfpx .cfpx-projeto:focus-visible { outline: 3px solid var(--x-agua) !important; outline-offset: 3px; }
.cfpx-capa { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #0d8f84, #2a4b7c); }
.cfpx-capa.so-logo { display: grid; place-items: center; background: #fff; box-shadow: inset 0 -1px 0 var(--x-borda); }
.cfpx-capa.so-logo img { width: 72% !important; height: 84% !important; object-fit: contain !important; }
.cfpx-projeto:hover .cfpx-capa.so-logo img { transform: scale(1.04); }
.cfpx-capa img { display: block; width: 100%; height: 100%; margin: 0 !important; object-fit: cover; border-radius: 0 !important; transition: transform 0.6s ease; }
.cfpx-projeto:hover .cfpx-capa img { transform: scale(1.05); }
.cfpx-selo { position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #16222c; font: 700 0.68rem/1.2 'Inter', sans-serif; letter-spacing: 0.07em; text-transform: uppercase; }
.cfpx-projeto .cfpx-logo { position: relative; align-self: flex-end; width: 64px; height: 64px; margin: -32px 16px -18px 0; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(14, 42, 63, 0.16); }
.cfpx-logo img { display: block; width: 100%; height: 100%; margin: 0 !important; object-fit: contain; border-radius: 0 !important; }
.cfpx-corpo { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.cfpx-titulo { font: 700 1.08rem/1.3 'Inter', sans-serif; color: var(--x-titulo); }
.cfpx-resumo { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.92rem; line-height: 1.55; color: var(--x-suave); }
.cfpx-mais { margin-top: auto; padding-top: 6px; font: 700 0.9rem 'Inter', sans-serif; color: var(--x-coral); }

/* janela do projeto */
.cfpx-janela { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; border-radius: 24px; overflow: auto; background: var(--x-cartao); color: var(--cfp-tinta, #16222c); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.cfpx-janela::backdrop { background: rgba(6, 14, 22, 0.6); backdrop-filter: blur(5px); }
.cfpx-janela[open] { animation: cfpx-entra 0.25s ease; }
@keyframes cfpx-entra { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.cfpx .cfpx-fecha { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(0, 0, 0, 0.45) !important; color: #fff !important; font: 400 1.6rem/1 'Inter', sans-serif !important; cursor: pointer; }
.cfpx .cfpx-fecha:hover { background: rgba(0, 0, 0, 0.65) !important; }
.cfpx-j-capa { aspect-ratio: 16 / 8; background: linear-gradient(135deg, #0d8f84, #2a4b7c); }
.cfpx-j-capa img { display: block; width: 100%; height: 100%; margin: 0 !important; object-fit: cover; border-radius: 0 !important; }
.cfpx-j-capa:has(img:not([src])) { aspect-ratio: auto; height: 64px; }
.cfpx-j-corpo { padding: 0 28px 28px; }
.cfpx-j-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: -36px 0 14px; }
.cfpx-j-logo { width: 84px; height: 84px; padding: 8px; border-radius: 20px; background: #fff; object-fit: contain; box-shadow: 0 6px 18px rgba(14, 42, 63, 0.18); }
.cfpx-j-logo:not([src]) { visibility: hidden; }
.cfpx-j-selo { padding: 5px 12px; border-radius: 999px; background: rgba(13, 143, 132, 0.1); color: var(--x-agua); font: 700 0.7rem/1.2 'Inter', sans-serif; letter-spacing: 0.07em; text-transform: uppercase; }
.cfpx-j-selo:empty { display: none; }
.cfpx.cfpx .cfpx-janela h3 { margin-bottom: 12px; font: 700 1.45rem/1.25 'Inter', sans-serif; color: var(--x-titulo); }
.cfpx-j-resumo { font-size: 1rem; line-height: 1.75; white-space: pre-line; }
.cfpx-j-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px !important; }
.cfpx.cfpx .cfpx-j-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font: 600 0.95rem 'Inter', sans-serif; text-decoration: none !important; transition: filter 0.2s ease, transform 0.2s ease; }
.cfpx.cfpx .cfpx-j-links a:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cfpx.cfpx .cfpx-j-site { background: var(--x-coral); color: #fff !important; }
.cfpx.cfpx .cfpx-j-insta { background: rgba(128, 128, 128, 0.12); color: inherit !important; }
.cfpx-j-insta svg { width: 18px; height: 18px; }
.cfpx-j-links a[hidden] { display: none !important; }

/* quiz e cartões do ceclimar-header */
.cfpx-quiz { border-radius: 24px; overflow: hidden; }
.cfpx-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: start; }
.cfpx-trio > div { min-width: 0; }


@media (max-width: 900px) {
    .cfpx-trio { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
    .cfpx.cfpx .cfpx-vazio { display: none; }
}
@media (max-width: 560px) {
    .cfpx.cfpx .cfpx-abertura { text-align: left; }
    .cfpx-indice { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
    .cfpx-indice::-webkit-scrollbar { display: none; }
    .cfpx.cfpx .cfpx-indice a { flex: none; white-space: nowrap; }
    .cfpx-j-corpo { padding: 0 20px 22px; }
}
@media (prefers-reduced-motion: reduce) { .cfpx *, .cfpx-janela { transition: none !important; animation: none !important; } }
