/* ============================================================
   style.css — Instituto São Paio (site oficial)
   Um único arquivo de estilo para TODAS as páginas.

   CORES: são exatamente as da logo (amostradas dos pixels):
     Azul     #1A51A1  -> cor principal (estrutura, títulos, links)
     Vermelho #EE3E41  -> ação / destaque (botão DOE, detalhes)
     Amarelo  #FFC60D  -> acento quente, usado com parcimônia
     Preto    #1A1A1A  -> texto
   A proposta é "clean": fundo claro, bastante respiro e o azul
   conduzindo tudo, com o vermelho reservado para a ação principal.
   ============================================================ */

/* ---------- RESET ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Cores da marca */
    --azul:        #1A51A1;
    --azul-escuro: #133d7a;
    --vermelho:    #EE3E41;
    --amarelo:     #FFC60D;
    --preto:       #1A1A1A;

    /* Tons de apoio (clean) */
    --fundo:       #ffffff;
    --fundo-alt:   #f5f7fb;   /* seções alternadas */
    --borda:       #e6eaf2;
    --texto:       #1f2733;
    --texto-suave: #5d6b80;

    /* Fontes */
    --display: 'League Gothic', 'Arial Narrow', sans-serif;
    --corpo:   'Montserrat', Arial, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    font-family: var(--corpo);
    color: var(--texto);
    background: var(--fundo);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }


/* ============================================================
   TIPOGRAFIA — títulos com a fonte condensada (cara de cultura)
   ============================================================ */
.section-title,
.hero-title {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.hero-title { font-size: clamp(2.6rem, 7vw, 5rem); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--azul); }

.eyebrow {
    font-family: var(--corpo);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--vermelho);
    display: inline-block;
    margin-bottom: 10px;
}
/* tracinho amarelo embaixo dos títulos de seção */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .section-title::after {
    content: "";
    display: block;
    width: 64px; height: 4px;
    background: var(--amarelo);
    border-radius: 4px;
    margin: 16px auto 0;
}
.section-sub { color: var(--texto-suave); margin-top: 14px; font-size: 1.05rem; }


/* ============================================================
   ESTRUTURA / ESPAÇAMENTO
   ============================================================ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--alt  { background: var(--fundo-alt); }
.section--blue { background: var(--azul); color: #fff; }
.section--blue .section-title { color: #fff; }
.section--blue .eyebrow { color: var(--amarelo); }
.section--blue .section-sub { color: #cfe0f5; }


/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-block;
    font-family: var(--corpo);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--azul); color: #fff; }
.btn--primary:hover { background: var(--azul-escuro); }
.btn--accent  { background: var(--vermelho); color: #fff; }
.btn--accent:hover { background: #d62f32; }
.btn--ghost   { background: transparent; color: var(--azul); border-color: var(--azul); }
.btn--ghost:hover { background: var(--azul); color: #fff; }
.btn--light   { background: #fff; color: var(--azul); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--outline-light:hover { background: #fff; color: var(--azul); }


/* ============================================================
   CABEÇALHO — fixo no topo, claro e levemente translúcido
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--borda);
    transition: padding .25s, box-shadow .25s;
}
.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(26, 81, 161, 0.10); }
.site-header.scrolled .header-inner { padding-top: 8px; padding-bottom: 8px; }

.brand { display: inline-flex; align-items: center; }
/* Logo "demarcada": fica dentro de uma moldura branca arredondada,
   com borda e leve sombra, para destacá-la do cabeçalho. */
.brand .logo {
    height: 56px;
    transition: height .25s;
    background: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--borda);
    box-shadow: 0 2px 10px rgba(26,81,161,.10);
}
.site-header.scrolled .brand .logo { height: 48px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav-link {
    text-decoration: none;
    color: var(--texto);
    font-weight: 600;
    font-size: 15px;
    padding: 4px 0;
    position: relative;
    transition: color .2s;
}
.nav-link:hover { color: var(--azul); }
/* página atual: sublinhado azul */
.nav-link.active { color: var(--azul); }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 3px;
    background: var(--amarelo);
    border-radius: 3px;
}

/* Botão hambúrguer (só aparece no celular) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    color: var(--azul);
    line-height: 1;
}


/* ============================================================
   HERO
   Home: hero claro e grande. Páginas internas: faixa azul menor.
   ============================================================ */
.hero {
    text-align: center;
    padding: 90px 24px 80px;
    max-width: 860px;
    margin: 0 auto;
}
.hero .hero-title { color: var(--azul); }
.hero-eyebrow {
    font-weight: 700; font-size: 14px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--vermelho); margin-bottom: 16px;
}
.hero-text {
    color: var(--texto-suave);
    font-size: 1.18rem;
    max-width: 640px;
    margin: 22px auto 32px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Faixa azul de topo das páginas internas */
.page-hero {
    background: var(--azul);
    color: #fff;
    text-align: center;
    padding: 70px 24px;
}
.page-hero .hero-title { color: #fff; }
.page-hero .hero-eyebrow { color: var(--amarelo); }
.page-hero p { color: #cfe0f5; max-width: 640px; margin: 16px auto 0; }


/* ============================================================
   SELO PONTO DE CULTURA (reconhecimento oficial)
   ============================================================ */
.ponto-cultura {
    background: var(--amarelo);
    color: var(--preto);
    text-align: center;
    padding: 26px 24px;
}
.ponto-cultura .selo-tag {
    font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
    font-size: 13px; color: var(--vermelho);
}
.ponto-cultura strong { font-size: clamp(1.3rem, 3vw, 1.8rem); font-family: var(--display); letter-spacing: .5px; }
.ponto-cultura p { max-width: 720px; margin: 8px auto 0; font-size: .98rem; }


/* ============================================================
   GRADES E CARDS
   ============================================================ */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 34px 28px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(26,81,161,.10); border-color: #d4ddee; }
.card-icon {
    width: 64px; height: 64px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: #fff; margin-bottom: 18px;
}
.icon-azul     { background: var(--azul); }
.icon-vermelho { background: var(--vermelho); }
.icon-amarelo  { background: var(--amarelo); color: var(--preto); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--azul); }
.card p { color: var(--texto-suave); font-size: .96rem; flex-grow: 1; }
.card .btn-vermais {
    align-self: flex-start;
    margin-top: 20px;
    background: transparent;
    color: var(--vermelho);
    border: 2px solid var(--vermelho);
    padding: 9px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--corpo);
    transition: background .2s, color .2s;
}
.card .btn-vermais:hover { background: var(--vermelho); color: #fff; }

/* Card de projeto/realização com tag de ano */
.proj-card .ano {
    display: inline-block;
    font-weight: 800; font-size: 12px; letter-spacing: 1px;
    color: var(--vermelho); margin-bottom: 8px;
}


/* ============================================================
   NÚMEROS / CONTADOR (faixa azul)
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 34px; text-align: center; }
.stat-num {
    font-family: var(--display);
    font-size: clamp(2.8rem, 7vw, 4.4rem);
    line-height: 1;
    color: var(--amarelo);
    display: block;
}
.stat-label { display: block; margin-top: 8px; color: #dbe7f7; font-weight: 600; letter-spacing: .3px; }


/* ============================================================
   MISSÃO / VISÃO / VALORES + ODS + LINHA DO TEMPO
   ============================================================ */
.mv-card { text-align: left; }
.mv-card .card-icon { margin-bottom: 16px; }

.valores-list { list-style: none; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.valores-list li {
    background: #fff; border: 1px solid var(--borda); border-radius: 50px;
    padding: 10px 22px; font-weight: 700; color: var(--azul);
}
.valores-list li i { color: var(--amarelo); margin-right: 6px; }

/* ODS — agora são imagens (ícones oficiais). Troque os arquivos
   img/ods-4.png ... img/ods-13.png pelos ícones oficiais da ONU. */
.ods-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.ods-grid .ods-item { width: 104px; }
@media (max-width: 480px) { .ods-grid .ods-item { width: 84px; } }
.ods-item { border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(26,81,161,.10); transition: transform .2s; }
.ods-item:hover { transform: translateY(-4px); }
.ods-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

/* Linha do tempo (história) */
.timeline { max-width: 760px; margin: 0 auto; }
.timeline-item { display: flex; gap: 22px; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.tl-year {
    font-family: var(--display); font-size: 1.8rem; color: var(--vermelho);
    min-width: 90px; text-align: right; line-height: 1.1;
}
.tl-body { border-left: 3px solid var(--amarelo); padding-left: 22px; }
.tl-body h3 { color: var(--azul); margin-bottom: 4px; }
.tl-body p { color: var(--texto-suave); font-size: .95rem; }


/* ============================================================
   SOBRE / BLOCO COM FOTO
   ============================================================ */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.media-row img { border-radius: 16px; box-shadow: 0 14px 34px rgba(26,81,161,.14); }
.media-row h2 { color: var(--azul); margin-bottom: 14px; }
.media-row p { color: var(--texto-suave); margin-bottom: 12px; }
.media-row strong { color: var(--texto); }


/* ============================================================
   GALERIA DE FOTOS (Espaço Panorama) — placeholders
   ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 18px; }
.photo-placeholder {
    aspect-ratio: 4/3;
    border: 2px dashed #c4d0e6;
    border-radius: 14px;
    background: var(--fundo-alt);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--texto-suave); text-align: center; padding: 16px;
    gap: 8px;
}
.photo-placeholder i { font-size: 1.8rem; color: var(--azul); }
.photo-placeholder span { font-size: .85rem; }
/* Quando colocar a foto: troque o conteúdo por <img src="img/foto.jpg" alt="..."> */


/* ============================================================
   IMPRENSA / CLIPPING
   ============================================================ */
.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.press-card {
    background: #fff; border: 1px solid var(--borda); border-radius: 14px;
    padding: 24px; transition: transform .2s, border-color .2s;
}
.press-card:hover { transform: translateY(-4px); border-color: var(--azul); }
.press-card .veiculo { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--vermelho); text-transform: uppercase; }
.press-card h3 { font-size: 1.05rem; color: var(--azul); margin: 8px 0 14px; line-height: 1.35; }
.press-card a { color: var(--azul); font-weight: 700; font-size: 14px; text-decoration: none; }
.press-card a:hover { text-decoration: underline; }


/* ============================================================
   CONTATO + FORMULÁRIO
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: start; }
.form-card, .contact-info {
    background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 30px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea {
    width: 100%; font-family: var(--corpo); font-size: 15px;
    padding: 12px 14px; border: 1px solid var(--borda); border-radius: 8px;
    background: var(--fundo-alt); color: var(--texto);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--azul); background: #fff; }
.field textarea { resize: vertical; }
.form-msg { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.form-msg.error   { background: #fdeaea; color: var(--vermelho); }
.form-msg.success { background: #eaf3ec; color: #1f8a4c; }
.btn-submit {
    width: 100%; background: var(--azul); color: #fff; border: none;
    padding: 14px; border-radius: 8px; font-weight: 700; font-size: 15px;
    cursor: pointer; font-family: var(--corpo); transition: background .2s;
}
.btn-submit:hover { background: var(--azul-escuro); }

.contact-info h3 { color: var(--azul); margin-bottom: 18px; font-size: 1.2rem; }
.contact-info ul { list-style: none; margin-bottom: 18px; }
.contact-info li { display: flex; gap: 12px; align-items: flex-start; color: var(--texto-suave); font-size: 14px; margin-bottom: 13px; }
.contact-info li i { color: var(--vermelho); width: 18px; text-align: center; margin-top: 4px; }
.map { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--borda); }
.map iframe { width: 100%; height: 100%; border: 0; }


/* ============================================================
   FAIXA DOE
   ============================================================ */
.doe-band { background: var(--vermelho); color: #fff; text-align: center; }
.doe-band .section-title { color: #fff; }
.doe-band .section-title::after { background: #fff; }
.doe-band p { max-width: 640px; margin: 0 auto 26px; color: #ffe3e3; }


/* ============================================================
   RODAPÉ
   ============================================================ */
.site-footer { background: var(--preto); color: #cdd3dc; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: .5px; }
.footer-col p, .footer-col a, .footer-col li { font-size: 14px; color: #aab2bf; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.footer-col li i { color: var(--amarelo); width: 16px; margin-top: 4px; }
.footer-col a { text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--amarelo); }
.footer-logo { background:#fff; padding:10px 14px; border-radius:10px; display:inline-block; margin-bottom:16px; }
.footer-logo img { height: 46px; }
.social { display: flex; gap: 16px; margin-top: 8px; }
.social a {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff; text-decoration: none; transition: background .2s, transform .2s;
}
.social a:hover { background: var(--azul); transform: translateY(-2px); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 40px; padding-top: 22px; text-align: center; font-size: 13px; color: #8b94a3;
}


/* ============================================================
   MODAL (Iniciativas "Ver mais")
   ============================================================ */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 30, 60, .6); backdrop-filter: blur(4px);
    padding: 20px; align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-box {
    background: #fff; border-radius: 18px; width: 100%; max-width: 540px;
    max-height: 90vh; overflow-y: auto; animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform: translateY(20px) scale(.98);} to { opacity:1; transform:none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 26px 0; }
.modal-tag { font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--vermelho); }
.modal-close { background: none; border: none; font-size: 30px; line-height: 1; color: var(--texto-suave); cursor: pointer; }
.modal-close:hover { color: var(--preto); }
.modal-body { padding: 8px 26px 22px; }
.modal-body h2 { font-family: var(--display); color: var(--azul); font-size: 2rem; margin-bottom: 10px; }
.modal-desc { color: var(--texto-suave); margin-bottom: 20px; }
.modal-sub { font-weight: 800; color: var(--azul); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--borda); }
.modal-list { list-style: none; }
.modal-list li { display: flex; gap: 10px; padding: 8px 0; color: var(--texto-suave); }
.modal-list li::before { content: "✓"; color: #1f8a4c; font-weight: 800; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 26px 26px; }


/* ============================================================
   TOAST (aviso flutuante do formulário)
   ============================================================ */
.toast {
    position: fixed; top: 90px; right: 20px; z-index: 2000;
    background: #fff; border: 1px solid var(--borda); border-left: 4px solid #1f8a4c;
    color: var(--texto); padding: 14px 20px; border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15,30,60,.18); max-width: 320px;
    animation: toastIn .3s ease;
}
@keyframes toastIn { from { transform: translateX(400px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { transform: translateX(400px); opacity: 0; } }


/* ============================================================
   ANIMAÇÃO DE ENTRADA AO ROLAR
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }


/* ============================================================
   CERTIFICADO PONTO DE CULTURA (exibição estética)
   ============================================================ */
.cert-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.cert-frame {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(26,81,161,.18);
    line-height: 0; /* remove respiro fantasma abaixo da imagem */
    transition: transform .25s;
}
.cert-frame:hover { transform: translateY(-4px) scale(1.01); }
.cert-frame img { width: 100%; border-radius: 14px; display: block; }
.cert-text .selo-tag { font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; color: var(--vermelho); }
.cert-text h2 { font-family: var(--display); color: var(--azul); font-size: clamp(1.8rem,4vw,2.6rem); margin: 6px 0 14px; }
.cert-text p { color: var(--texto-suave); margin-bottom: 10px; }
.cert-text .cert-id { font-size: 13px; color: var(--texto-suave); margin-top: 6px; }

/* ============================================================
   CARDS DE PROJETO COM FOTO (Iniciativas / Corredor / Impacto)
   ============================================================ */
.proj-card { padding: 0; overflow: hidden; }
.proj-card .proj-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--fundo-alt); }
.proj-card .proj-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; }
.proj-card .ano { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: 1px; color: var(--vermelho); margin-bottom: 8px; }
.proj-card h3 { color: var(--azul); margin-bottom: 8px; font-size: 1.2rem; }
.proj-card p { color: var(--texto-suave); font-size: .95rem; flex-grow: 1; }
.proj-link { margin-top: 16px; align-self: flex-start; color: var(--azul); font-weight: 700; font-size: 14px; text-decoration: none; }
.proj-link:hover { text-decoration: underline; }
.proj-link i { font-size: 12px; margin-left: 4px; }

/* ============================================================
   APOIADORES / PARCEIROS (grade de logos)
   ============================================================ */
.apoiadores-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 48px; row-gap: 36px; }
/* Logos soltos, no formato das próprias bordas (sem caixa, sem fundo).
   O drop-shadow segue o CONTORNO real do logo (via transparência do PNG)
   e funciona como um halo de legibilidade: no modo claro é um halo
   escuro suave (logos brancos aparecem); no modo noturno é um halo
   claro suave (logos escuros aparecem). Nenhuma borda extra é criada. */
.apoiador-box {
    background: none; border: none; padding: 0;
    height: 112px; display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 0 1px rgba(18, 30, 52, .30)) drop-shadow(0 6px 16px rgba(18, 30, 52, .18));
    transition: transform .2s, filter .2s;
}
.apoiador-box:hover { transform: translateY(-4px); filter: drop-shadow(0 0 1px rgba(18, 30, 52, .38)) drop-shadow(0 10px 22px rgba(18, 30, 52, .24)); }
.apoiador-box img { height: 100%; width: auto; max-width: 230px; object-fit: contain; }
/* No modo noturno, um "cartão" branco garante a legibilidade de
   qualquer logo (inclusive marcas escuras feitas para fundo claro). */
html[data-tema="escuro"] .apoiador-box {
    background: #fff; border-radius: 14px; padding: 10px 20px; box-sizing: border-box;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35));
}
html[data-tema="escuro"] .apoiador-box:hover {
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45));
}
@media (max-width: 520px) { .apoiador-box { height: 84px; } .apoiador-box img { max-width: 170px; } }

/* ============================================================
   PÁGINA DOE — conta bancária + QR Code
   ============================================================ */
.doe-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: start; }
.doe-card { background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 32px; }
.doe-card h3 { color: var(--azul); font-size: 1.3rem; margin-bottom: 18px; }
.dados-banco { list-style: none; }
.dados-banco li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--borda); font-size: 15px; }
.dados-banco li:last-child { border-bottom: none; }
.dados-banco .rotulo { color: var(--texto-suave); }
.dados-banco .valor { font-weight: 700; color: var(--texto); text-align: right; }
.pix-box {
    margin-top: 18px; background: var(--fundo-alt); border-radius: 10px; padding: 14px;
    display: flex; align-items: center; gap: 14px;
}
.pix-box .chave { font-weight: 700; color: var(--azul); word-break: break-all; }
.qr-card { background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 28px; text-align: center; }
.qr-card img { width: 230px; max-width: 100%; border: 1px solid var(--borda); border-radius: 12px; padding: 10px; background: #fff; }
.qr-card p { color: var(--texto-suave); font-size: 14px; margin-top: 14px; }
.qr-card .aviso { font-size: 12px; color: var(--vermelho); margin-top: 8px; }

@media (max-width: 860px) {
    .cert-row { grid-template-columns: 1fr; }
    .doe-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 860px) {
    .nav {
        position: fixed; top: 0; right: 0; height: 100vh; width: 260px;
        background: #fff; flex-direction: column; align-items: flex-start;
        padding: 90px 28px 28px; gap: 22px;
        box-shadow: -10px 0 40px rgba(15,30,60,.15);
        transform: translateX(100%); transition: transform .28s ease;
    }
    .nav.open { transform: translateX(0); }
    .nav-toggle { display: block; z-index: 300; }
    .media-row { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .timeline-item { gap: 14px; }
    .tl-year { min-width: 64px; font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .modal-box, .toast { animation: none; }
}


/* ============================================================
   PROGRAMAÇÃO DO PANORAMA (cards de espetáculo, via dados.js)
   ============================================================ */
.prog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}
.prog-card {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .2s, border-color .2s;
}
.prog-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(26,81,161,.10); border-color: #d4ddee; }
.prog-foto { position: relative; aspect-ratio: 16/10; background: var(--fundo-alt); }
.prog-foto img { width: 100%; height: 100%; object-fit: cover; }
.prog-foto.img-quebrada::before {
    content: "\f630"; /* máscara de teatro (Font Awesome) */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: var(--azul); opacity: .35;
}
.prog-data {
    position: absolute; top: 14px; left: 14px;
    background: var(--vermelho); color: #fff;
    border-radius: 10px; padding: 6px 12px;
    text-align: center; line-height: 1.05;
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.prog-data .d { display: block; font-family: var(--display); font-size: 1.7rem; }
.prog-data .m { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.prog-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex-grow: 1; gap: 8px; }
.prog-tipo {
    align-self: flex-start;
    font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--azul); background: var(--fundo-alt);
    border: 1px solid var(--borda); border-radius: 999px; padding: 3px 12px;
}
.prog-body h3 { color: var(--azul); font-size: 1.25rem; line-height: 1.25; }
.prog-meta { color: var(--texto-suave); font-size: .88rem; font-weight: 600; }
.prog-meta i { color: var(--vermelho); margin-right: 4px; }
.prog-sinopse { color: var(--texto-suave); font-size: .95rem; flex-grow: 1; }
.prog-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--borda);
}
.prog-preco { font-weight: 800; font-size: .92rem; color: var(--preto); }
.prog-preco i { color: var(--amarelo); margin-right: 5px; }
.btn--mini { padding: 9px 18px; font-size: 13px; border-radius: 8px; }
.prog-vazio {
    text-align: center; color: var(--texto-suave);
    background: var(--fundo-alt); border: 1px dashed var(--borda);
    border-radius: 16px; padding: 40px 24px; font-size: 1rem;
}
.prog-vazio i { display: block; font-size: 2rem; color: var(--azul); margin-bottom: 12px; opacity: .5; }
.prog-vazio a { color: var(--azul); font-weight: 700; }

/* ============================================================
   GALERIA DINÂMICA + LIGHTBOX
   ============================================================ */
.gal-item {
    position: relative; border: 1px solid var(--borda); border-radius: 14px;
    overflow: hidden; padding: 0; cursor: zoom-in; background: var(--fundo-alt);
    aspect-ratio: 4/3; width: 100%;
    transition: transform .18s ease, box-shadow .2s;
}
.gal-item:hover, .gal-item:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(26,81,161,.14); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item.img-quebrada::before {
    content: "\f030"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--azul); opacity: .35;
}
.gal-legenda {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(10,20,40,.78));
    color: #fff; font-family: var(--corpo); font-size: 12.5px; font-weight: 600;
    padding: 26px 12px 10px; text-align: left;
}
.lightbox {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,16,30,.88);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .25s ease;
    padding: 24px;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: min(1000px, 94vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { color: #cfe0f5; font-size: 14px; margin-top: 12px; }
.lightbox-fechar {
    position: absolute; top: 18px; right: 22px;
    background: none; border: none; color: #fff; font-size: 2.4rem;
    cursor: pointer; line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
    .prog-card, .gal-item, .lightbox { transition: none; }
}


/* ---- PROGRAMAÇÃO: divisor de mês (Agosto · 2026) ---- */
.prog-mes {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--azul);
    display: flex; align-items: baseline; gap: 10px;
    margin: 42px 0 20px;
}
.prog-mes:first-child { margin-top: 0; }
.prog-mes em { font-style: normal; color: var(--texto-suave); font-size: .62em; }
.prog-mes::after {
    content: ""; flex: 1; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--amarelo), transparent);
    transform: translateY(-6px);
}
.prog-grid + .prog-mes { margin-top: 48px; }
.prog-bilheteria { font-size: 12.5px; font-weight: 700; color: var(--texto-suave); }
.prog-bilheteria::before { content: "\f3ff"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--azul); margin-right: 6px; opacity:.6; }


/* ============================================================
   MODO NOTURNO 🌙
   Ativado pelo botão no cabeçalho (lua/sol). A escolha fica
   salva no navegador do visitante e, na primeira visita, segue
   a preferência do sistema (claro/escuro).
   Paleta derivada do próprio azul da marca: fundos em azul-noite
   profundo, com o amarelo e o vermelho ganhando ainda mais brilho.
   ============================================================ */
html[data-tema="escuro"] {
    --fundo:       #0d1626;
    --fundo-alt:   #111d31;
    --borda:       #26374f;
    --texto:       #e9eef7;
    --texto-suave: #9fb0c8;
    color-scheme: dark;
}

/* Superfícies (cartões, formulários, modais) */
html[data-tema="escuro"] .card,
html[data-tema="escuro"] .prog-card,
html[data-tema="escuro"] .press-card,
html[data-tema="escuro"] .form-card,
html[data-tema="escuro"] .contact-info,
html[data-tema="escuro"] .doe-card,
html[data-tema="escuro"] .qr-card,
html[data-tema="escuro"] .modal-box,
html[data-tema="escuro"] .toast,
html[data-tema="escuro"] .valores-list li,
html[data-tema="escuro"] .tl-body {
    background: #15233b;
    border-color: var(--borda);
}
html[data-tema="escuro"] .card:hover,
html[data-tema="escuro"] .prog-card:hover { border-color: #35507a; box-shadow: 0 16px 36px rgba(0,0,0,.45); }

/* Cabeçalho */
html[data-tema="escuro"] .site-header { background: rgba(13, 22, 38, 0.86); }
html[data-tema="escuro"] .site-header.scrolled { box-shadow: 0 6px 22px rgba(0,0,0,.45); }
@media (max-width: 900px) {
    html[data-tema="escuro"] .nav { background: #101c30; }
}

/* Títulos e acentos azuis ganham um azul-claro legível no escuro */
html[data-tema="escuro"] .section-title,
html[data-tema="escuro"] .hero .hero-title,
html[data-tema="escuro"] .card h3,
html[data-tema="escuro"] .prog-body h3,
html[data-tema="escuro"] .prog-mes,
html[data-tema="escuro"] .press-card h3,
html[data-tema="escuro"] .press-card a,
html[data-tema="escuro"] .doe-card h3,
html[data-tema="escuro"] .qr-card h3,
html[data-tema="escuro"] .valores-list li,
html[data-tema="escuro"] .prog-tipo,
html[data-tema="escuro"] .contact-info a,
html[data-tema="escuro"] .nav-link.active,
html[data-tema="escuro"] .modal-body h2 {
    color: #8ab4f8;
}
html[data-tema="escuro"] .nav-link:hover { color: #8ab4f8; }
html[data-tema="escuro"] .btn--ghost { color: #8ab4f8; border-color: #8ab4f8; }
html[data-tema="escuro"] .btn--ghost:hover { background: #8ab4f8; color: #0d1626; }

/* Faixas coloridas: um azul mais profundo, coerente com a noite */
html[data-tema="escuro"] .section--blue { background: #132b52; }
html[data-tema="escuro"] .page-hero { background: linear-gradient(160deg, #163360, #0f2140); }

/* Formulário */
html[data-tema="escuro"] .field input,
html[data-tema="escuro"] .field textarea { background: #101c30; }
html[data-tema="escuro"] .field input:focus,
html[data-tema="escuro"] .field textarea:focus { background: #15233b; border-color: #8ab4f8; }
html[data-tema="escuro"] .form-msg.error   { background: rgba(238,62,65,.14); }
html[data-tema="escuro"] .form-msg.success { background: rgba(31,138,76,.16); color: #6fd39b; }

/* Peças que PERMANECEM claras de propósito (legibilidade da marca) */
html[data-tema="escuro"] .qr-card img,
html[data-tema="escuro"] .brand .logo,
html[data-tema="escuro"] .footer-logo { background: #fff; }

/* Divisores e detalhes */
html[data-tema="escuro"] .prog-foot { border-top-color: #26374f; }
html[data-tema="escuro"] .prog-preco { color: var(--texto); }
html[data-tema="escuro"] .prog-vazio { background: #111d31; }
html[data-tema="escuro"] .photo-placeholder { background: #111d31; color: var(--texto-suave); }
html[data-tema="escuro"] .photo-placeholder i { color: #8ab4f8; }
html[data-tema="escuro"] .ods-item { box-shadow: 0 4px 12px rgba(0,0,0,.4); }
html[data-tema="escuro"] .cert-frame { box-shadow: 0 16px 40px rgba(0,0,0,.5); }

/* ---- Botão lua/sol no cabeçalho ---- */
.tema-toggle {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--borda);
    background: var(--fundo-alt);
    color: var(--azul);
    font-size: 15px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .2s ease, background .2s, color .2s;
}
.tema-toggle:hover { transform: rotate(18deg) scale(1.08); }
html[data-tema="escuro"] .tema-toggle { color: var(--amarelo); background: #15233b; }
@media (prefers-reduced-motion: reduce) { .tema-toggle:hover { transform: none; } }


/* ============================================================
   PÁGINA: BIBLIOTECA A CASA AMARELA (biblioteca.html)
   ADMIN • Este bloco estiliza a página da biblioteca e o banner
   da página inicial. Os TEXTOS (selo, horário, aviso, destaque)
   são editados no painel admin.html, aba "Biblioteca".
   Cor extra da identidade da Casa Amarela: azul-royal #2B3A9E.
   ============================================================ */

/* Logos lado a lado no topo da página */
.bib-logos-hero {
    display: flex; justify-content: center; align-items: center;
    gap: 18px; margin-top: 30px;
}
.bib-logos-hero img {
    width: 84px; height: 84px; object-fit: contain;
    background: #fff; border-radius: 20px; padding: 8px;
    box-shadow: 0 10px 26px rgba(10, 25, 60, .25);
}

/* Moldura em arco (remete ao galpão do Panorama e às artes do Instagram) */
.arco-frame {
    border: 6px solid var(--amarelo);
    border-radius: 46% 46% 18px 18px / 26% 26% 18px 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(26, 81, 161, .18);
}
.arco-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
.arco-legenda { margin-top: 14px; font-size: 14px; color: var(--texto-suave); text-align: center; }
.arco-legenda i { color: var(--vermelho); margin-right: 6px; }

/* Trio de logos: Ciclos + São Paio = Casa Amarela */
.trio-logos { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
.trio-box {
    width: 150px; height: 150px;
    background: #fff; border: 1px solid var(--borda); border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 30, 60, .08);
    transition: transform .18s ease;
}
.trio-box:hover { transform: translateY(-4px); }
.trio-box img { max-height: 100%; object-fit: contain; }
.trio-mais { font-family: var(--display); font-size: 2.4rem; color: var(--amarelo); line-height: 1; }

/* Quadro da homenagem ao Oton São Paio */
.oton-frame {
    max-width: 380px; margin: 0 auto;
    border: 6px solid var(--amarelo); border-radius: 18px;
    overflow: hidden; background: #0d1b3d;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .35);
}
.oton-frame img { width: 100%; display: block; }
.oton-fallback {
    aspect-ratio: 718 / 622;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--amarelo); gap: 8px;
}
.oton-fallback span {
    font-family: var(--display); font-size: 2.6rem; line-height: 1;
    text-transform: uppercase; letter-spacing: 1px;
}
.oton-fallback small { color: #cfe0f5; letter-spacing: 3px; }

/* Vídeos da campanha */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
    justify-content: center; gap: 30px;
}
.video-card {
    background: #fff; border: 1px solid var(--borda); border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(26, 81, 161, .10);
}
.video-card video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #0d1b3d; }
.video-card figcaption {
    padding: 14px 18px; font-size: 14px; font-weight: 600; color: var(--azul);
    border-top: 3px solid var(--amarelo);
}

/* Chamada da biblioteca na página inicial */
.bib-banner { background: linear-gradient(135deg, #2B3A9E 0%, var(--azul) 100%); color: #fff; }
.bib-banner .container {
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: 26px;
}
.bib-banner img {
    width: 92px; height: 92px; object-fit: contain;
    background: #fff; border-radius: 20px; padding: 8px;
}
.bib-banner .selo-tag {
    display: inline-block; background: var(--amarelo); color: #1A1A1A;
    font-weight: 800; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
    padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.bib-banner h2 {
    font-family: var(--display); font-weight: 400; text-transform: uppercase;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.05; letter-spacing: .5px; color: #fff;
}
.bib-banner p { color: #cfe0f5; margin-top: 8px; max-width: 620px; }

@media (max-width: 860px) {
    .bib-logos-hero img { width: 68px; height: 68px; }
    .trio-box { width: 118px; height: 118px; padding: 14px; }
    .bib-banner .container { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ---- Modo noturno da página da biblioteca ---- */
/* Os quadros de logo (trio-box) ficam sempre com fundo branco, de propósito:
   as marcas (Ciclos, São Paio) são pretas/coloridas para fundo claro e
   ficariam invisíveis num fundo escuro. */
html[data-tema="escuro"] .video-card { background: #15233b; border-color: var(--borda); }
html[data-tema="escuro"] .video-card figcaption { color: #8ab4f8; }
html[data-tema="escuro"] .bib-banner { background: linear-gradient(135deg, #1c2a6e 0%, #132b52 100%); }
html[data-tema="escuro"] .arco-legenda { color: var(--texto-suave); }
