/* ============================================================
   main.css — APTIAF · Associação de Protecção à Terceira Idade
   António Ferreira Vila Cova (IPSS)
   Design: institucional, quente, acessível.
   Tipografia: Fraunces (títulos) + Inter (texto)
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* ── Cor da marca (TEMÁTICA) ─────────────────────────────
       Nunca usar hex da marca fora deste bloco: tudo deriva de
       --brand-*. O tema escolhe-se no backoffice → Definições →
       Aparência (atributo data-tema no <html>). */
    --brand-base: #A82B26;
    --brand:      var(--brand-base);
    --brand-700:  color-mix(in oklab, var(--brand-base) 80%, black);
    --brand-900:  color-mix(in oklab, var(--brand-base) 56%, black);
    --brand-950:  color-mix(in oklab, var(--brand-base) 24%, black);
    --brand-50:   color-mix(in oklab, var(--brand-base) 8%, white);
    --brand-100:  color-mix(in oklab, var(--brand-base) 16%, white);

    /* Acento dourado (independente do tema) */
    --gold:       #B97C2A;
    --gold-700:   #8F5E1C;
    --gold-50:    #F8EFDF;
    --gold-200:   #F7D9A6;   /* destaque sobre fundos escuros da marca */

    /* Texto sobre fundos da marca */
    --on-brand:       #FFFFFF;
    --on-brand-soft:  #F4E7E2;

    /* Neutros quentes */
    --ink:        #2A211F;
    --ink-soft:   #4A3F3B;
    --muted:      #6E615C;
    --sand:       #FBF7F2;
    --sand-200:   #F3ECE3;
    --surface:    #FFFFFF;
    --line:       #ECE2D7;
    --line-strong:#DDCFC0;
    --night:      #221B19;

    /* Semântica (não muda com o tema) */
    --danger:      #B23B3B;
    --danger-700:  #8E2A2A;
    --danger-50:   #FDF1F0;
    --danger-line: #E7C9C6;
    --ok:          #2E7D3A;
    --ok-700:      #1F5B2C;
    --ok-50:       #EAF6EC;
    --ok-line:     #BFE3C6;

    /* Tipografia — escala única */
    --fs-xs:   12px;   /* etiquetas em maiúsculas, tags */
    --fs-sm:   14px;   /* metadados, legendas, rodapé */
    --fs-base: 16px;   /* UI, cartões, formulários */
    --fs-body: 17px;   /* texto corrido */
    --fs-lg:   18px;   /* lead / subtítulos */
    --fs-xl:   21px;   /* títulos de cartão */
    --fs-2xl:  24px;
    --fs-3xl:  28px;
    --fs-4xl:  34px;
    --fs-5xl:  40px;
    --fs-lead:    clamp(17px, 2vw, 20px);
    --fs-h3:      clamp(26px, 3.4vw, 36px);
    --fs-h2:      clamp(28px, 3.8vw, 40px);
    --fs-h1:      clamp(30px, 4.6vw, 46px);
    --fs-display: clamp(34px, 5.4vw, 58px);

    /* Espaçamento — escala 4/8 */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
    --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 48px; --sp-10: 64px;

    /* Forma */
    --r:      16px;
    --r-sm:   11px;
    --r-pill: 999px;
    --shadow-sm: 0 2px 8px -3px rgba(70,40,30,.18);
    --shadow:    0 10px 30px -12px rgba(70,40,30,.22);
    --shadow-lg: 0 24px 50px -18px rgba(70,40,30,.30);

    --font:      'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;

    --container: 1160px;
}

/* ── Temas predefinidos (valores afinados à mão) ── */
:root:not([data-tema]), :root[data-tema="institucional"] {
    --brand: #A82B26; --brand-700: #861F1B; --brand-900: #5E1411; --brand-950: #280807;
    --brand-50: #FBEDEC; --brand-100: #F6DDDB;
}
:root[data-tema="mar"] {
    --brand: #1F5F73; --brand-700: #174A5A; --brand-900: #0F3240; --brand-950: #06161C;
    --brand-50: #E8F1F3; --brand-100: #D2E4E9;
}
:root[data-tema="pinho"] {
    --brand: #2F6B4A; --brand-700: #245339; --brand-900: #173826; --brand-950: #09170F;
    --brand-50: #EAF3EE; --brand-100: #D5E7DC;
}
:root[data-tema="ameixa"] {
    --brand: #7A2E4F; --brand-700: #60233E; --brand-900: #42172A; --brand-950: #1C0911;
    --brand-50: #F6ECF0; --brand-100: #EDD9E2;
}
/* data-tema="personalizado": usa as derivações color-mix de --brand-base (definido inline no <html>) */


html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

body {
    font-family: var(--font);
    font-size: var(--fs-body);
    color: var(--ink);
    background: var(--surface);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }

img { max-width: 100%; display: block; }

/* Tamanho-base de ícones inline (selectores específicos abaixo sobrepõem) */
svg { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.16em; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--ink);
    font-optical-sizing: auto;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--brand-100); color: var(--brand-900); }

/* ── Container ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.container--narrow { max-width: 860px; }

/* ── Topbar ── */
.topbar {
    background: var(--brand-900);
    color: var(--on-brand-soft);
    font-size: var(--fs-sm);
    padding: var(--sp-2) 0;
}
.topbar__inner { display: flex; gap: var(--sp-4); justify-content: space-between; align-items: center; flex-wrap: wrap; }
.topbar__contacts { display: inline-flex; gap: var(--sp-5); align-items: center; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: var(--sp-2); }
.topbar__news { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--on-brand); max-width: 60vw; text-align: right; }
.topbar__news:hover { color: var(--on-brand); }
.topbar__news-icon { display: inline-flex; flex-shrink: 0; }
.topbar__news svg { width: 17px; height: 17px; opacity: 1; }
.topbar__news-content { display: flex; min-width: 0; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.topbar__news-label { color: var(--on-brand-soft); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.topbar__news-title { overflow: hidden; max-width: 520px; color: var(--on-brand); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.topbar__news:hover .topbar__news-title { text-decoration: underline; }
.topbar__inner a { color: var(--on-brand-soft); }
.topbar__inner a:hover { color: var(--on-brand); }
.topbar svg { width: 15px; height: 15px; opacity: .85; }

/* ── Header ── */
.site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: var(--sp-4);
}
.site-logo { display: flex; align-items: center; gap: var(--sp-3); }
.site-logo__img { height: 50px; width: auto; }
.mobile-doc-news { display: none; }
.mobile-doc-news__popup { display: none; }
.mobile-doc-news__close { display: none; }

/* Nav */
.site-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 15px;
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: var(--r-pill);
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link:focus, .nav-link.is-active {
    background: var(--brand-50); color: var(--brand-700);
}
.nav-link svg { width: 15px; height: 15px; }
.nav-link--cta {
    background: var(--brand);
    color: var(--on-brand) !important;
    padding: 10px var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.nav-link--cta:hover { background: var(--brand-700); }

/* Dropdown */
.nav-item--dropdown { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow);
    min-width: 240px;
    list-style: none;
    padding: var(--sp-2);
    z-index: 200;
}
.dropdown::before {
    content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px;
}
.dropdown li a {
    display: block;
    padding: 10px 14px;
    font-size: var(--fs-base);
    color: var(--ink-soft);
    border-radius: 8px;
    transition: background .12s, color .12s;
}
.dropdown li a:hover { background: var(--brand-50); color: var(--brand-700); }
.dropdown__divider { border-top: 1px solid var(--line); margin: 6px var(--sp-1); }
.nav-item--dropdown:hover .dropdown,
.nav-item--dropdown:focus-within .dropdown { display: block; }

/* Hamburger */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: var(--sp-2);
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Botões ── */
.btn {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: 14px 28px;
    border-radius: var(--r-pill);
    font-family: var(--font);
    font-weight: 600; font-size: var(--fs-base);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .15s, background .15s, box-shadow .15s, border-color .15s, color .15s;
    text-decoration: none;
    line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-700); color: var(--on-brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--white { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }
.btn--white:hover { background: var(--surface); color: var(--brand-900); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }
.btn--ghost-light { background: rgba(255,255,255,.12); color: var(--on-brand); border-color: rgba(255,255,255,.45); backdrop-filter: blur(4px); }
.btn--ghost-light:hover { background: rgba(255,255,255,.22); color: var(--on-brand); }

/* ── HERO Homepage (foto + scrim) ── */
.hero {
    position: relative;
    color: var(--on-brand);
    overflow: hidden;
    background: var(--brand-900);
}
.hero__bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    z-index: 0;
}
.hero__scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--brand-900) 92%, transparent) 0%, color-mix(in srgb, var(--brand-900) 78%, transparent) 42%, color-mix(in srgb, var(--brand-900) 30%, transparent) 78%, color-mix(in srgb, var(--brand-900) 12%, transparent) 100%),
        linear-gradient(180deg, color-mix(in srgb, var(--brand-950) 20%, transparent), color-mix(in srgb, var(--brand-950) 45%, transparent));
}
.hero__inner {
    position: relative; z-index: 2;
    padding: 92px 0 96px;
}
.hero__badge {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    color: var(--on-brand);
    font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    padding: 7px var(--sp-4); border-radius: var(--r-pill);
    margin-bottom: 22px;
    backdrop-filter: blur(4px);
}
.hero__badge svg { width: 14px; height: 14px; }
.hero__title { font-size: var(--fs-display); font-weight: 600; line-height: 1.04; color: var(--on-brand); }
.hero__title em { font-style: italic; color: var(--gold-200); }
.hero__sub { font-size: var(--fs-lead); color: rgba(255,255,255,.92); margin: 22px 0 34px; line-height: 1.6; }
.hero__btns { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ── HERO de página interna (faixa fotográfica) ── */
.page-hero {
    position: relative;
    color: var(--on-brand);
    overflow: hidden;
    background: var(--brand-900);
    min-height: 320px;
    display: flex;
    align-items: center;
}
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: 0; }
.page-hero--contactos .page-hero__bg { object-position: center center; }
.page-hero--documents .page-hero__bg { object-position: center center; }
.page-hero__scrim {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand-900) 90%, transparent) 0%, color-mix(in srgb, var(--brand-900) 72%, transparent) 55%, color-mix(in srgb, var(--brand-900) 45%, transparent) 100%);
}
.page-hero--plain { background: linear-gradient(120deg, var(--brand) 0%, var(--brand-900) 100%); }
.page-hero--dark { background: var(--night); }
.page-hero--dark .page-hero__scrim { background: linear-gradient(90deg, rgba(28,24,22,.90) 0%, rgba(28,24,22,.72) 55%, rgba(28,24,22,.42) 100%); }
.page-hero__inner { position: relative; z-index: 2; width: 100%; padding-top: 68px; padding-bottom: 60px; }
.page-hero__breadcrumb { font-size: var(--fs-sm); color: rgba(255,255,255,.82); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); }
.page-hero__breadcrumb a { color: rgba(255,255,255,.82); }
.page-hero__breadcrumb svg { width: 15px; height: 15px; }
.page-hero__breadcrumb a:hover { color: var(--on-brand); }
.page-hero__title { font-size: var(--fs-h1); color: var(--on-brand); }
.page-hero__sub { margin-top: var(--sp-3); font-size: var(--fs-lg); color: rgba(255,255,255,.9); }

/* ── Secções ── */
.section { padding: 92px 0; }
.section--sand { background: var(--sand); }
.section--sand-200 { background: var(--sand-200); }
.section--brand {
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-900) 100%);
    color: var(--on-brand);
}
.section--ink { background: var(--night); color: var(--on-brand-soft); }
.section--tight { padding: var(--sp-10) 0; }
.section__header { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section__header--left { max-width: none; margin-left: 0; text-align: left; }
.section__tag {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    color: var(--brand); font-size: var(--fs-sm); font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px;
}
.section__tag::before { content: ''; width: 26px; height: 2px; background: var(--gold); display: inline-block; border-radius: 2px; }
.section--brand .section__tag, .section--ink .section__tag { color: var(--gold-200); }
.section--brand .section__tag::before { background: rgba(255,255,255,.6); }
.section__title { font-size: var(--fs-h2); }
.section--brand .section__title, .section--ink .section__title { color: var(--on-brand); }
.section__sub { color: var(--muted); margin-top: 14px; font-size: var(--fs-lg); }
.section--brand .section__sub { color: rgba(255,255,255,.88); }

/* ── Cards de valências ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-6); }
.card {
    background: var(--surface);
    border-radius: var(--r);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: var(--sp-7) 30px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card__icon {
    width: 56px; height: 56px;
    background: var(--brand-50);
    color: var(--brand);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--sp-5);
}
.card__icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.card--gold .card__icon { background: var(--gold-50); color: var(--gold-700); }
.card__title { font-size: var(--fs-xl); margin-bottom: 9px; }
.card__text { font-size: var(--fs-base); color: var(--muted); line-height: 1.65; }
.card__link { margin-top: var(--sp-4); display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; font-size: var(--fs-base); }
.card__link svg { width: 16px; height: 16px; transition: transform .15s; }
.card:hover .card__link svg { transform: translateX(3px); }

/* ── Sobre (homepage) ── */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--sp-10); align-items: center; }
.about-text h2 { font-size: var(--fs-h3); margin-bottom: 18px; }
.about-text p { color: var(--ink-soft); margin-bottom: var(--sp-4); line-height: 1.75; font-size: var(--fs-body); }
.about-media { position: relative; }
.about-media__img { border-radius: var(--r); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-media__badge {
    position: absolute; left: -24px; bottom: -24px;
    background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
    padding: 18px 22px; border: 1px solid var(--line);
    display: flex; align-items: center; gap: var(--sp-3);
}
.about-media__badge .num { font-family: var(--font-head); font-size: var(--fs-5xl); font-weight: 600; color: var(--brand); line-height: 1; }
.about-media__badge .lbl { font-size: var(--fs-sm); color: var(--muted); line-height: 1.3; max-width: 120px; }

.about-stats { display: flex; gap: var(--sp-5); margin-top: 30px; flex-wrap: wrap; }
.stat {
    flex: 1; min-width: 120px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 18px var(--sp-5);
}
.stat__num { font-family: var(--font-head); font-size: var(--fs-4xl); font-weight: 600; color: var(--brand); line-height: 1; }
.stat__label { font-size: var(--fs-sm); color: var(--muted); margin-top: 6px; }

/* ── Documentos / Lista de PDFs ── */
.doc-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.doc-item {
    display: flex; align-items: center; gap: var(--sp-4);
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .18s, border-color .18s, transform .18s;
}
.doc-item:hover { box-shadow: var(--shadow); border-color: var(--brand-100); transform: translateY(-2px); }
.doc-item__file {
    flex-shrink: 0; width: 46px; height: 46px;
    background: var(--brand-50); color: var(--brand);
    border-radius: 11px; display: flex; align-items: center; justify-content: center;
}
.doc-item__file svg { width: 24px; height: 24px; }
.doc-item__info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.doc-item__title { font-weight: 600; font-size: var(--fs-base); color: var(--ink); font-family: var(--font); }
.doc-item__meta { font-size: var(--fs-sm); color: var(--muted); display: inline-flex; align-items: center; gap: var(--sp-2); }
.doc-item__tag {
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 3px 9px; border-radius: var(--r-pill);
    background: var(--gold-50); color: var(--gold-700);
}
.doc-item__tag--conta { background: var(--brand-50); color: var(--brand-700); }
.doc-item__btn {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: var(--sp-2);
    background: var(--surface); color: var(--brand-700);
    border: 1.5px solid var(--line-strong);
    padding: 9px var(--sp-4); border-radius: var(--r-pill);
    font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.doc-item__btn svg { width: 16px; height: 16px; }
.doc-item__btn:hover { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.doc-empty {
    padding: 56px var(--sp-6); text-align: center; color: var(--muted);
    background: var(--sand); border: 1px dashed var(--line-strong); border-radius: var(--r);
}
.doc-empty svg { width: 40px; height: 40px; color: var(--line-strong); margin: 0 auto var(--sp-3); }


/* ── Página de conteúdo (texto) ── */
.content-page { padding: 80px 0; }
.content-prose { max-width: 760px; margin: 0 auto; font-size: var(--fs-lg); }
.content-prose h2 { font-size: var(--fs-3xl); margin: var(--sp-8) 0 14px; color: var(--ink); }
.content-prose h2:first-child { margin-top: 0; }
.content-prose h3 { font-size: var(--fs-xl); margin: 28px 0 10px; color: var(--brand-700); }
.content-prose p { color: var(--ink-soft); line-height: 1.8; margin-bottom: 18px; }
.content-prose ul, .content-prose ol { margin: 0 0 var(--sp-5) 22px; }
.content-prose li { margin-bottom: 10px; color: var(--ink-soft); line-height: 1.7; }
.content-prose ul li::marker { color: var(--gold); }
.content-prose strong { color: var(--ink); }

/* Blocos do editor de páginas */
.page-builder-content { max-width: 1120px; }
.page-block { margin: 0 0 28px; padding: 34px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.page-block > :first-child { margin-top: 0; }
.page-block > :last-child { margin-bottom: 0; }
.page-block__eyebrow { margin-bottom: var(--sp-2) !important; color: var(--brand-700) !important; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.page-block__lead { font-size: var(--fs-xl); line-height: 1.65 !important; }
.page-block--hero { padding: clamp(38px, 7vw, 76px); color: var(--on-brand); background: linear-gradient(130deg, var(--brand-900), var(--brand-700)); text-align: center; }
.page-block--hero h2 { max-width: 760px; margin: 0 auto 18px; color: var(--on-brand); font-size: var(--fs-display); }
.page-block--hero p { max-width: 680px; margin-right: auto; margin-left: auto; color: rgba(255,255,255,.84); }
.page-block--hero .page-block__eyebrow { color: var(--on-brand) !important; opacity: .72; }
.page-block__button { display: inline-flex; padding: var(--sp-3) var(--sp-5); border-radius: 9px; color: var(--on-brand) !important; background: var(--brand); font-size: var(--fs-base); font-weight: 750; text-decoration: none; }
.page-block--hero .page-block__button { color: var(--brand-900) !important; background: var(--surface); }
.page-block--columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); padding: 0; background: transparent; box-shadow: none; }
.page-block--columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-block--columns > div { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.page-block--columns h3 { margin-top: 0; }
.page-block--media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sp-7); }
.page-block--media figure { margin: 0; }
.page-block--media img { width: 100%; aspect-ratio: 4/3; border-radius: 12px; object-fit: cover; }
.page-block--media figcaption { margin-top: 7px; color: var(--ink-soft); font-size: var(--fs-xs); }
.page-block--cta { padding: 42px; border: 0; color: var(--on-brand); background: var(--brand-900); text-align: center; }
.page-block--cta h2 { color: var(--on-brand); }
.page-block--cta p { color: rgba(255,255,255,.82); }
.contact-page-intro { max-width: 1120px; margin: 0 auto 34px; }
@media (max-width: 768px) {
    .page-block { padding: var(--sp-6) var(--sp-5); }
    .page-block--hero { padding: 42px 22px; }
    .page-block--columns, .page-block--columns-3, .page-block--media { grid-template-columns: 1fr; }
    .page-block--columns { padding: 0; }
}
.content-prose blockquote {
    border-left: 4px solid var(--gold); background: var(--gold-50);
    padding: var(--sp-4) 22px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 22px 0;
    font-family: var(--font-head); font-size: var(--fs-xl); font-style: italic; color: var(--ink-soft);
}

/* Timeline (história) */
.timeline { max-width: 760px; margin: 0 auto; position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.timeline__item { position: relative; padding-bottom: 30px; }
.timeline__item::before { content: ''; position: absolute; left: -34px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--brand-100); }
.timeline__year { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 600; color: var(--brand-700); }
.timeline__text { color: var(--ink-soft); margin-top: var(--sp-1); }

/* ── Valências (página detalhada) ── */
.valencia { display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-5); padding: 34px 0; border-bottom: 1px solid var(--line); }
.valencia:last-child { border-bottom: none; }
.valencia__icon { width: 64px; height: 64px; background: var(--brand-50); color: var(--brand); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.valencia__icon svg { width: 32px; height: 32px; stroke-width: 1.6; }
.valencia__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-1); }
.valencia__age { display: inline-block; font-size: var(--fs-sm); font-weight: 600; color: var(--gold-700); background: var(--gold-50); padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); margin-bottom: var(--sp-3); }
.valencia__body p { color: var(--ink-soft); margin-bottom: var(--sp-3); line-height: 1.7; }
.valencia__body ul { margin: 0 0 var(--sp-2) var(--sp-5); }
.valencia__body li { color: var(--ink-soft); margin-bottom: 7px; }
.valencia__body li::marker { color: var(--gold); }
.valencia__lead { font-weight: 600; color: var(--ink) !important; margin-top: var(--sp-1); }
.valencia__list { margin: var(--sp-1) 0 var(--sp-2) var(--sp-5); }
.valencia__sub { margin-top: 18px; padding-top: var(--sp-1); }
.valencia__subtitle { font-family: var(--font-display, var(--font)); font-size: var(--fs-body); color: var(--brand-700); margin: 10px 0 6px; }

/* ── Investimentos (cards de projeto) ── */
.invest-fact__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.invest-fact__value { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 600; color: var(--ink); margin-top: 3px; word-break: break-word; }

/* ── Contactos ── */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-6); align-items: start; }
.contact-form-card,
.contact-info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 36px; box-shadow: var(--shadow-sm); }
.contact-info-card { background: var(--sand); }
.contact-block__title { font-size: var(--fs-xl); margin-bottom: 6px; }
.contact-block__intro { color: var(--muted); font-size: var(--fs-base); margin-bottom: var(--sp-6); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.form-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }
.contact-form input,
.contact-form textarea {
    width: 100%; font: inherit; font-size: var(--fs-base); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    padding: var(--sp-3) 14px; transition: border-color .15s, box-shadow .15s;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.contact-form input.is-error,
.contact-form textarea.is-error { border-color: var(--danger); background: var(--danger-50); }
.field-error { font-size: var(--fs-xs); color: var(--danger-700); }
.contact-submit { align-self: flex-start; margin-top: var(--sp-1); }
.contact-form__note { font-size: var(--fs-xs); color: var(--muted); margin: 0; }

/* Honeypot — escondido de humanos, visível a bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Alerta de sucesso */
.contact-alert { display: flex; gap: var(--sp-3); align-items: flex-start; border-radius: var(--r-sm); padding: var(--sp-4) 18px; margin-bottom: 22px; font-size: var(--fs-base); line-height: 1.5; }
.contact-alert svg { width: 24px; height: 24px; flex-shrink: 0; }
.contact-alert--ok { background: var(--ok-50); border: 1px solid var(--ok-line); color: var(--ok-700); }
.contact-alert--ok svg { color: var(--ok); }
.contact-alert--err { background: var(--danger-50); border: 1px solid var(--danger-line); color: var(--danger-700); }
.contact-alert--err svg { color: var(--danger); }

/* Info */
.contact-item { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.contact-item:last-child { margin-bottom: 0; }
.contact-item__icon { flex-shrink: 0; width: 42px; height: 42px; background: var(--brand-50); color: var(--brand); border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.contact-item__icon svg { width: 21px; height: 21px; }
.contact-item__label { font-size: var(--fs-sm); color: var(--muted); }
.contact-item__value { font-size: var(--fs-base); color: var(--ink); font-weight: 500; line-height: 1.5; }
.contact-item__value a { color: var(--ink); }
.contact-item__value a:hover { color: var(--brand); }

/* Mapa */
.contact-map { margin-top: 28px; }
.contact-map iframe { width: 100%; height: 380px; border-radius: var(--r); border: 1px solid var(--line); display: block; }

/* ── CTA band ── */
.cta-band { text-align: center; }
.cta-band__title { font-size: var(--fs-h2); color: var(--on-brand); max-width: 700px; margin: 0 auto 14px; }
.cta-band__sub { color: rgba(255,255,255,.9); font-size: var(--fs-lg); max-width: 560px; margin: 0 auto 30px; }
.cta-band__btns { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ── Faixa de documentos recentes (home) ── */
.docs-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.docs-col h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.docs-col h3 svg { width: 22px; height: 22px; color: var(--brand); }

/* ── Footer ── */
.funding {
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 26px 0;
}
.funding__inner { display: flex; align-items: center; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; }
.funding img { height: 38px; width: auto; opacity: .9; filter: saturate(.9); }
.funding__note { width: 100%; text-align: center; font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }

.site-footer { background: var(--sand-200); color: var(--ink-soft); padding: var(--sp-10) 0 0; border-top: 1px solid var(--line-strong); }
.site-footer__grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.4fr; gap: var(--sp-8); padding-bottom: 44px; }
.footer-logo { height: 54px; width: auto; margin-bottom: var(--sp-4); }
.footer-about { font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-soft); }
.footer-title { font-family: var(--font); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: var(--fs-sm); color: var(--ink-soft); }
.footer-links a:hover { color: var(--brand-700); }
.footer-address { font-size: var(--fs-sm); line-height: 1.9; font-style: normal; color: var(--ink-soft); }
.footer-address a { color: var(--brand); }
.footer-address a:hover { color: var(--brand-700); }
.footer-bottom { border-top: 1px solid var(--line-strong); padding: var(--sp-5) 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.footer-bottom p { font-size: var(--fs-sm); color: var(--muted); }
.footer-bottom a { color: var(--brand); }
.footer-bottom a:hover { color: var(--brand-700); }

/* ── Utilitários ── */
.text-center { text-align: center; }
.mt-40 { margin-top: var(--sp-8); }
.center-btn { display: flex; justify-content: center; margin-top: 44px; }

/* ── Responsive ── */
@media (max-width: 980px) {
    .about-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
    .about-media { max-width: 460px; margin: 0 auto; }
    .contact-layout { grid-template-columns: 1fr; gap: var(--sp-5); }
    .contact-info-card { order: -1; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form-card, .contact-info-card { padding: var(--sp-6); }
    .contact-submit { align-self: stretch; justify-content: center; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .docs-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { font-size: var(--fs-base); }
    .topbar { display: none; }
    .mobile-doc-news { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: auto; color: var(--brand-700); border-radius: 50%; background: var(--brand-50); }
    .mobile-doc-news__bell { display: inline-flex; }
    .mobile-doc-news__bell svg { width: 20px; height: 20px; }
    .mobile-doc-news__popup { position: absolute; display: flex; flex-direction: column; gap: 2px; z-index: 220; top: calc(100% + 12px); right: -52px; width: min(270px, calc(100vw - 32px)); padding: var(--sp-3) 38px var(--sp-3) 14px; color: var(--on-brand); background: var(--brand-900); border-radius: 10px; box-shadow: var(--shadow); font-size: var(--fs-xs); line-height: 1.35; opacity: 0; visibility: hidden; transform: translateY(-5px); pointer-events: auto; cursor: pointer; }
    .mobile-doc-news__close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--on-brand); font: inherit; font-size: var(--fs-lg); line-height: 1; cursor: pointer; }
    .mobile-doc-news.is-dismissed .mobile-doc-news__popup { display: none; }
    .mobile-doc-news__popup::before { content: ''; position: absolute; right: 61px; top: -6px; width: 12px; height: 12px; background: var(--brand-900); transform: rotate(45deg); }
    .mobile-doc-news__popup strong { color: var(--on-brand); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; }
    .mobile-doc-news__title { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .mobile-doc-news:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; }
    .mobile-doc-news:hover .mobile-doc-news__popup,
    .mobile-doc-news:focus .mobile-doc-news__popup { opacity: 1; visibility: visible; transform: translateY(0); }
    .mobile-doc-news:hover .mobile-doc-news__title { text-decoration: underline; }
    .nav-toggle { display: flex; }
    .site-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow);
        padding: 10px 0; max-height: 80vh; overflow-y: auto;
    }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-link { border-radius: 0; padding: 14px var(--sp-6); font-size: var(--fs-base); display: flex; width: 100%; justify-content: center; text-align: center; }
    .nav-link--cta { margin: var(--sp-2) var(--sp-6); border-radius: var(--r-pill); justify-content: center; }
    .dropdown { display: block; position: static; border: none; box-shadow: none; background: var(--sand); border-radius: 0; padding: 0; }
    .dropdown li a { padding: 11px var(--sp-6); text-align: center; }
    .hero__inner { padding: var(--sp-10) 0; }
    .site-header__inner { padding-top: 11px; padding-bottom: 11px; }
    .site-logo__img { height: 38px; }
    .hero__badge { font-size: var(--fs-xs); letter-spacing: .05em; padding: 7px 13px; }
    .hero__btns { width: 100%; }
    .hero__btns .btn { flex: 1 1 100%; justify-content: center; }
    .section { padding: 60px 0; }
    .about-media__badge { left: 12px; bottom: -20px; }
    .valencia { grid-template-columns: 52px 1fr; gap: var(--sp-4); }
    .valencia__icon { width: 52px; height: 52px; }
    .about-stats { gap: var(--sp-3); }
    .about-stats .stat { flex: 1 1 calc(50% - 6px); min-width: 0; }
    .doc-item { flex-wrap: wrap; }
    .doc-item__btn { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
    .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
    .funding__inner { gap: var(--sp-6); }
    .funding img { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .btn:hover, .card:hover, .doc-item:hover { transform: none; }
}

/* ── Rodapé: social + área reservada ── */
.footer-social { margin-top: var(--sp-4); }
.footer-social__link { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--brand-700); opacity: 1; }
.footer-social__link svg { width: 18px; height: 18px; }
.footer-social__link:hover { color: var(--brand-900); }
.footer-reserved { color: inherit; opacity: .85; text-decoration: underline; }
.footer-reserved:hover { opacity: 1; }

/* ── Texto rico (intro de documentos) ── */
.rich-text p { margin: 0 0 14px; }
.rich-text ul, .rich-text ol { margin: 0 0 14px 22px; }
.rich-text li { margin-bottom: 6px; }
.rich-text a { color: var(--brand-700); text-decoration: underline; }
.rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 { margin: 18px 0 var(--sp-2); font-family: var(--font-display, var(--font)); }
.rich-text img { max-width: 100%; height: auto; border-radius: 10px; margin: var(--sp-2) 0; }
.rich-text figure { margin: 14px 0; }
.rich-text figcaption { font-size: var(--fs-sm); color: var(--ink-soft); margin-top: 6px; }
.rich-text blockquote { border-left: 3px solid var(--brand); padding: var(--sp-1) 0 var(--sp-1) var(--sp-4); margin: 14px 0; color: var(--ink-soft); font-style: italic; }
.rich-text hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: var(--fs-sm); }
.rich-text th, .rich-text td { border: 1px solid var(--line-strong); padding: var(--sp-2) 11px; text-align: left; vertical-align: top; }
.rich-text th { background: var(--sand-200); font-weight: 600; }
.rich-text iframe { max-width: 100%; border: 0; border-radius: 10px; margin: 10px 0; aspect-ratio: 16/9; width: 100%; }
.rich-text .table-wrap, .rich-text figure.table { overflow-x: auto; }

/* ── Selects no estilo dos inputs ── */
.contact-form select {
    width: 100%; font: inherit; font-size: var(--fs-base); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    padding: var(--sp-3) 14px; transition: border-color .15s, box-shadow .15s;
}
.contact-form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }

/* ── Área reservada (portal) ── */
.portal-login { max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 34px 30px; box-shadow: var(--shadow-sm); text-align: center; }
.portal-login__icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.portal-login__icon svg { width: 26px; height: 26px; }
.portal-login .contact-form { text-align: left; margin-top: 18px; }
.portal-login .btn { width: auto; min-width: 176px; justify-content: center; margin: 18px auto 0; }

.portal-console-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.portal-console-head h2 { margin: 3px 0 2px; font-family: var(--font); font-size: var(--fs-h3); letter-spacing: 0; }
.portal-console-head p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.portal-kicker { display: block; margin-bottom: var(--sp-1); color: var(--brand-700); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); color: var(--muted); font-size: var(--fs-sm); flex-wrap: wrap; }
.portal-bar__act { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; }
.portal-back { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--brand-700); }
.portal-back svg { width: 16px; height: 16px; transform: rotate(180deg); }

.portal-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: var(--sp-5); align-items: stretch; }
.portal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--sp-6); box-shadow: var(--shadow-sm); max-width: 820px; }
.portal-layout .portal-card { max-width: none; }
.portal-card--list { position: sticky; top: 18px; align-self: stretch; }
.portal-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; }
.portal-card__head--archive { margin-bottom: var(--sp-4); }
.portal-card--list .portal-card__head h2 { font-family: var(--font); font-size: var(--fs-2xl); letter-spacing: 0; }
.portal-card--list .form-hint { font-size: var(--fs-sm); line-height: 1.5; margin: 0; }

.portal-compose { padding: 0; overflow: hidden; }
.portal-compose__summary { list-style: none; cursor: pointer; padding: 22px var(--sp-6); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.portal-compose__summary::-webkit-details-marker { display: none; }
.portal-compose__summary strong { display: block; color: var(--ink); font-size: var(--fs-xl); line-height: 1.2; }
.portal-compose__summary small { display: block; margin-top: var(--sp-1); color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.portal-compose__summary::after { content: '⌄'; color: var(--muted); transition: transform .15s ease; }
.portal-compose[open] .portal-compose__summary::after { transform: rotate(180deg); }
.portal-compose .contact-form { padding: var(--sp-6); }
.portal-doc-edit { margin-bottom: var(--sp-2); }

.portal-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,.42fr); gap: var(--sp-3); margin-bottom: 14px; }
.portal-toolbar input,
.portal-toolbar select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); padding: 10px var(--sp-3); min-height: 40px; }
.portal-toolbar input:focus,
.portal-toolbar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }

.portal-doclist { display: flex; flex-direction: column; gap: var(--sp-3); }
.portal-year { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.portal-doclist__year { list-style: none; font-family: var(--font); font-weight: 800; color: var(--brand-700); font-size: var(--fs-base); margin: 0; padding: var(--sp-3) 14px; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-3); background: var(--sand); }
.portal-doclist__year small { justify-self: end; font-family: var(--font); font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.portal-doclist__year::-webkit-details-marker { display: none; }
.portal-doclist__year::after { content: '⌄'; color: var(--muted); transition: transform .15s ease; font-size: var(--fs-base); }
.portal-year[open] .portal-doclist__year::after { transform: rotate(180deg); }
.portal-year__docs { padding: 10px; display: flex; flex-direction: column; gap: var(--sp-2); }
.portal-doclist__item { display: flex; flex-direction: column; gap: var(--sp-3); padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.portal-doclist__item[hidden], .portal-year[hidden] { display: none !important; }
.portal-doclist__info { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); min-width: 0; }
.portal-doclist__info .doc-item__tag { align-self: flex-start; max-width: 100%; white-space: normal; line-height: 1.2; padding: 5px 9px; font-size: var(--fs-xs); border-radius: 999px; }
.portal-doclist__info strong { display: block; width: 100%; font-family: var(--font); font-size: var(--fs-base); font-weight: 800; line-height: 1.34; color: var(--ink); overflow-wrap: normal; word-break: normal; hyphens: none; }
.portal-doclist__meta { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); line-height: 1.35; color: var(--ink-soft); flex-wrap: wrap; }
.portal-doclist__meta svg { width: 14px; height: 14px; color: var(--brand); }
.portal-doclist__act { display: flex; flex-direction: row; align-items: center; gap: var(--sp-2); width: 100%; flex-wrap: wrap; }
.portal-doclist__act .btn { justify-content: center; padding: var(--sp-2) 13px; font-size: var(--fs-sm); min-height: 38px; min-width: 104px; width: auto; border-radius: 999px; }
.portal-doclist__act .portal-view { min-width: 86px; }
.portal-doclist__act .btn svg { width: 15px; height: 15px; color: currentColor; }
.portal-doclist__act .portal-del { border-color: var(--danger-line); background: var(--danger-50); color: var(--danger) !important; white-space: nowrap; }
.portal-doclist__act .portal-del:hover { border-color: var(--danger); background: var(--danger-50); color: var(--danger-700) !important; }

.portal-anexos { list-style: none; padding: 0; margin: 0 0 18px; }
.portal-anexos svg { width: 16px; height: 16px; }
.anexo-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 14px 0; border-bottom: 1px solid var(--line); }
.anexo-item__ord { display: flex; flex-direction: column; gap: 4px; padding-top: var(--sp-1); }
.anexo-move { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-soft); background: var(--surface); }
.anexo-move:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }
.anexo-move.is-off { opacity: .3; pointer-events: none; }
.anexo-move svg { width: 15px; height: 15px; color: currentColor; }
.anexo-item__edit { flex: 1; min-width: 0; }
.anexo-item__row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.anexo-item__label { flex: 1; min-width: 180px; padding: 9px var(--sp-3); border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: var(--fs-sm); }
.anexo-item__label:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.anexo-item__row .btn svg { color: currentColor; }
.anexo-item__replace { display: inline-flex; align-items: center; gap: var(--sp-2); margin-top: 9px; font-size: var(--fs-sm); color: var(--ink-soft); }
.anexo-item__replace svg { width: 15px; height: 15px; color: var(--brand); }
.anexo-item__replace input[type=file] { font-size: var(--fs-xs); }
.portal-del { color: var(--danger) !important; font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: var(--sp-2); }
.portal-del svg { transform: none; }
.portal-add-anexo { display: flex; gap: var(--sp-3); align-items: flex-end; flex-wrap: wrap; padding: 18px; background: var(--sand); border-radius: var(--r-sm); }
.portal-add-anexo .form-field { flex: 1; min-width: 200px; margin: 0; }
.anexo-row { display: flex; gap: var(--sp-3); margin-bottom: 10px; }
.anexo-row input[type="text"] { flex: 1; min-width: 0; }
.anexo-row input { font: inherit; font-size: var(--fs-base); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px var(--sp-3); background: var(--surface); }
#addAnexoRow { margin-top: var(--sp-1); }

@media (max-width: 1080px) {
    .portal-layout { grid-template-columns: 1fr; }
    .portal-card--list { position: static; }
}
@media (max-width: 768px) {
    .portal-console-head { align-items: flex-start; flex-direction: column; }
    .portal-bar__act { width: 100%; justify-content: flex-start; }
    .portal-card { padding: 18px; }
    .portal-compose { padding: 0; }
    .portal-compose__summary { padding: 18px; }
    .portal-compose .contact-form { padding: 18px; }
    .portal-toolbar { grid-template-columns: 1fr; }
    .portal-doclist__act .btn { flex: 1 1 0; min-width: 0; }
    .portal-doclist__act .portal-view { flex: 0 0 auto; min-width: 82px; }
    .anexo-row { flex-direction: column; gap: var(--sp-2); }
}
@media (max-width: 420px) {
    .portal-doclist__act { display: grid; grid-template-columns: 1fr 1fr; }
    .portal-doclist__act .portal-view { grid-column: 1 / -1; }
}

/* ── Área reservada: edição de documento refinada ── */
.portal-edit-section {
    padding: var(--sp-6);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.portal-edit-section + .portal-edit-section {
    margin-top: 26px;
}
.portal-edit-section--attachments {
    background: var(--sand);
}
.portal-edit-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.portal-edit-section__head h3 {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-2xl);
    letter-spacing: 0;
}
.portal-edit-section__head span {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}
.portal-edit-section .form-hint {
    margin-bottom: var(--sp-4);
}
.portal-card > h3 {
    font-family: var(--font);
    font-size: var(--fs-xl);
    letter-spacing: 0;
    margin-bottom: 14px;
}
.portal-doc-edit .form-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(150px, .46fr);
    gap: var(--sp-4);
    align-items: start;
}
.portal-doc-edit .form-field,
.portal-add-anexo .form-field {
    min-width: 0;
    align-self: start;
}
.portal-doc-edit input,
.portal-doc-edit select {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 14px;
    font-size: var(--fs-body);
    line-height: 52px;
}
.portal-doc-edit textarea {
    min-height: 130px;
}
.portal-doc-edit > .form-field {
    width: 100%;
}
.portal-doc-edit > .form-field input,
.portal-doc-edit > .form-field textarea {
    width: 100%;
}
.portal-add-anexo {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
    gap: var(--sp-4);
    align-items: end;
    padding: 22px;
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.portal-add-anexo .form-field {
    margin: 0;
}
.portal-add-anexo input[type="text"],
.portal-add-anexo input[type="file"] {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 14px;
    line-height: 52px;
}
.portal-add-anexo .btn {
    height: 52px;
    min-height: 52px;
    padding-inline: var(--sp-6);
    white-space: nowrap;
    align-self: end;
}
@media (max-width: 980px) {
    .portal-doc-edit .form-row { grid-template-columns: 1fr 1fr; }
    .portal-doc-edit .form-row .form-field:last-child { grid-column: 1 / -1; }
    .portal-add-anexo { grid-template-columns: 1fr 1fr; }
    .portal-add-anexo .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 768px) {
    .portal-doc-edit .form-row { grid-template-columns: 1fr; }
    .portal-doc-edit .form-row .form-field:last-child { grid-column: auto; }
    .portal-doc-edit input,
    .portal-doc-edit select,
    .portal-add-anexo input[type="text"],
    .portal-add-anexo input[type="file"] { height: 48px; min-height: 48px; line-height: 48px; font-size: var(--fs-base); }
    .portal-add-anexo { grid-template-columns: 1fr; padding: 18px; }
    .portal-add-anexo .btn { width: 100%; justify-self: stretch; }
}

/* ── Notificação da top bar: sino a tocar + troca de texto com fade ── */
@keyframes bellRing {
    0%, 65%, 100% { transform: rotate(0); }
    70% { transform: rotate(14deg); }
    75% { transform: rotate(-12deg); }
    80% { transform: rotate(9deg); }
    85% { transform: rotate(-7deg); }
    90% { transform: rotate(4deg); }
    95% { transform: rotate(-2deg); }
}
@media (prefers-reduced-motion: no-preference) {
    .topbar__news svg { transform-origin: top center; animation: bellRing 4s ease-in-out infinite; }
}
.topbar__news:hover svg { animation-play-state: paused; }

@keyframes mobileNotice {
    0%, 100% { opacity: 0; visibility: hidden; transform: translateY(-5px); }
    8%, 72% { opacity: 1; visibility: visible; transform: translateY(0); }
}
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .mobile-doc-news.is-auto .mobile-doc-news__bell svg { transform-origin: top center; animation: bellRing 4s ease-in-out 2; }
    .mobile-doc-news.is-auto .mobile-doc-news__popup { animation: mobileNotice 7s .7s both; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .mobile-doc-news.is-auto .mobile-doc-news__popup { animation: mobileNotice 7s .7s both; }
}

/* ── Área reservada: anexos e baixa resolução ── */
.portal-card {
    width: 100%;
    box-sizing: border-box;
}
.portal-edit-section {
    overflow: hidden;
}
.anexo-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: var(--sp-3);
    padding: var(--sp-4) 0;
}
.anexo-item__row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    align-items: center;
    gap: var(--sp-3);
}
.anexo-item__label {
    width: 100%;
    min-width: 0;
    height: 46px;
    box-sizing: border-box;
}
.anexo-item__row .btn,
.anexo-item__row .portal-del {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.anexo-item__row .portal-del {
    border: 1px solid var(--danger-line);
    background: var(--danger-50);
    color: var(--danger) !important;
    font-weight: 800;
}
.anexo-item__replace {
    display: grid;
    grid-template-columns: auto minmax(0, max-content) minmax(180px, 1fr);
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-3);
    max-width: 100%;
}
.anexo-item__replace input[type=file] {
    max-width: 100%;
    min-width: 0;
    font-size: var(--fs-sm);
}
@media (max-width: 768px) {
    .portal-card {
        padding: var(--sp-4);
        border-radius: 12px;
    }
    .portal-edit-section {
        padding: var(--sp-4);
        border-radius: 12px;
    }
    .portal-edit-section + .portal-edit-section {
        margin-top: 18px;
    }
    .portal-edit-section__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .portal-edit-section__head h3 {
        font-size: var(--fs-xl);
    }
    .anexo-item {
        grid-template-columns: 1fr;
        gap: var(--sp-3);
        padding: var(--sp-4) 0;
    }
    .anexo-item__ord {
        flex-direction: row;
        padding-top: 0;
    }
    .anexo-move {
        width: 40px;
        height: 38px;
    }
    .anexo-item__row {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-3);
    }
    .anexo-item__label {
        grid-column: 1 / -1;
        height: 48px;
        font-size: var(--fs-base);
    }
    .anexo-item__row .btn,
    .anexo-item__row .portal-del {
        width: 100%;
        min-width: 0;
        justify-content: center;
        font-size: var(--fs-sm);
    }
    .anexo-item__row .btn:first-of-type {
        grid-column: 1 / -1;
    }
    .anexo-item__replace {
        grid-template-columns: auto 1fr;
        align-items: start;
        font-size: var(--fs-sm);
    }
    .anexo-item__replace input[type=file] {
        grid-column: 1 / -1;
        width: 100%;
        font-size: var(--fs-sm);
    }
}
@media (max-width: 420px) {
    .portal-card { padding: 14px; }
    .portal-edit-section { padding: 14px; }
    .anexo-item__row {
        grid-template-columns: 1fr;
    }
    .anexo-item__row .btn:first-of-type {
        grid-column: auto;
    }
}

/* ── Área reservada: contenção mobile geral ── */
.portal-console,
.portal-layout,
.portal-card,
.portal-edit-section,
.portal-doc-edit,
.portal-anexos,
.anexo-item__edit,
.anexo-item__row,
.portal-add-anexo {
    min-width: 0;
}
.portal-console input,
.portal-console select,
.portal-console textarea,
.portal-console button,
.portal-console .btn {
    max-width: 100%;
}
@media (max-width: 980px) {
    .portal-console {
        padding-inline: clamp(var(--sp-3), 4vw, 22px);
    }
    .portal-toolbar {
        gap: var(--sp-3);
    }
    .portal-doclist__act {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .portal-doclist__act .btn {
        width: 100%;
        min-width: 0;
    }
}
@media (max-width: 560px) {
    .portal-console-head h2,
    .portal-card__head h2 {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.05;
    }
    .portal-card__head {
        gap: var(--sp-3);
    }
    .portal-card__head .btn {
        width: 100%;
        justify-content: center;
    }
    .portal-doc-edit .form-row,
    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: var(--sp-3);
    }
    .portal-doc-edit input,
    .portal-doc-edit select,
    .portal-doc-edit textarea,
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: var(--fs-base);
    }
    .portal-doclist__act {
        grid-template-columns: 1fr;
    }
    .portal-add-anexo {
        gap: var(--sp-3);
    }
}

/* ── Área reservada: correção do campo data em mobile ── */
.portal-doc-edit input[type="date"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}
.portal-doc-edit input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.2em;
}
.portal-doc-edit input[type="date"]::-webkit-calendar-picker-indicator {
    flex: 0 0 auto;
    margin-left: var(--sp-2);
}
@media (max-width: 560px) {
    .portal-doc-edit input[type="date"] {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ── Área reservada: sem legenda de notificação mobile ── */
@media (max-width: 768px) {
    body.page-area-reservada .mobile-doc-news__popup {
        display: none !important;
        animation: none !important;
    }
}


/* ════════════════════════════════════════════════════════════
   Redesign 2026-09 — utilitários, estatísticas, valências
   ════════════════════════════════════════════════════════════ */
.text-muted { color: var(--muted); }
.mt-5 { margin-top: var(--sp-5); }
.note { margin-top: var(--sp-7); color: var(--muted); font-size: var(--fs-sm); }
.page-intro { color: var(--muted); font-size: var(--fs-lg); margin-bottom: var(--sp-6); }
.filter-pills { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-7); }
.btn--sm { padding: 10px var(--sp-5); font-size: var(--fs-base); }
.back-row { margin-bottom: var(--sp-6); }
.back-link { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; }
.doc-body { margin: 0 0 var(--sp-8); }
.doc-attach-title { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }
.portal-title { margin: var(--sp-2) 0 2px; }
.portal-title--flush { margin-top: 0; }
.section__header--compact { margin-bottom: var(--sp-8); }
a.doc-item { text-decoration: none; color: inherit; }

/* Estatísticas: números em linha, sem caixa (a caixa fica para o que é clicável) */
.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.stat, .about-stats .stat { background: none; border: 0; border-top: 2px solid var(--line-strong); border-radius: 0; padding: var(--sp-3) 0 0; min-width: 0; }
.stat__num { font-size: var(--fs-4xl); }
@media (max-width: 768px) {
    .about-stats { gap: var(--sp-3); }
    .about-stats .stat { flex: none; }
    .stat__num { font-size: var(--fs-3xl); }
    .stat__label { font-size: var(--fs-xs); line-height: 1.35; }
}

/* Valências: foto, faixa etária, "Saber mais" */
.valencia--foto { grid-template-areas: "photo photo" "icon body"; }
.valencia--foto .valencia__photo { grid-area: photo; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-2); }
.valencia--foto .valencia__icon { grid-area: icon; }
.valencia--foto .valencia__body { grid-area: body; }
.valencia__title { margin-bottom: var(--sp-2); }
.valencia__age { margin-bottom: var(--sp-3); }
.valencia__more { margin-top: var(--sp-2); border-top: 1px solid var(--line); }
.valencia__more > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-3) 0; font-weight: 600; font-size: var(--fs-base); color: var(--brand-700);
}
.valencia__more > summary::-webkit-details-marker { display: none; }
.valencia__more > summary svg { width: 18px; height: 18px; transition: transform .2s; }
.valencia__more[open] > summary svg { transform: rotate(180deg); }
.valencia__more > summary:hover span { text-decoration: underline; }
.valencia__more[open] > summary span::after { content: ' (fechar)'; font-weight: 400; color: var(--muted); }
.valencia__cta { margin: var(--sp-4) 0 0 !important; }
.back-link__icon { display: inline-flex; transform: rotate(180deg); }


/* Badge do hero em mobile: aceita 2 linhas com forma própria */
@media (max-width: 768px) {
    .hero__badge { border-radius: var(--r-sm); letter-spacing: .04em; line-height: 1.35; align-items: flex-start; }
}

/* Home — valências agrupadas por público (fotografia + lista clicável) */
.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-7); align-items: start; }
.audience { display: flex; flex-direction: column; gap: var(--sp-4); }
.audience__media { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.audience__media img { width: 100%; height: 100%; object-fit: cover; }
.audience__caption {
    position: absolute; inset: auto 0 0 0; padding: var(--sp-8) var(--sp-6) var(--sp-5);
    background: linear-gradient(0deg, color-mix(in srgb, var(--brand-950) 85%, transparent), transparent);
    color: var(--on-brand); display: flex; flex-direction: column; gap: 2px;
}
.audience__caption h3 { color: var(--on-brand); font-size: var(--fs-2xl); }
.audience__caption span { color: var(--gold-200); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em; }
.audience__list { list-style: none; display: flex; flex-direction: column; }
.audience__list li + li { border-top: 1px solid var(--line); }
.audience__item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: var(--sp-4); align-items: center; padding: var(--sp-4) var(--sp-2); color: var(--ink); border-radius: var(--r-sm); transition: background .15s; }
.audience__item:hover { background: var(--brand-50); color: var(--ink); }
.audience__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.audience__icon svg { width: 22px; height: 22px; }
.audience__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.audience__text strong { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 600; }
.audience__text > span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.audience__arrow { color: var(--brand); transition: transform .15s; }
.audience__item:hover .audience__arrow { transform: translateX(3px); }
@media (max-width: 980px) { .audience-grid { grid-template-columns: 1fr; gap: var(--sp-8); } }

/* Valências — chips (idades + horário) e âncoras */
.valencia { scroll-margin-top: 96px; }
.valencia__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.valencia__chips .valencia__age { margin-bottom: 0; }
.valencia__age--time { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); color: var(--brand-700); }
.valencia__age--time svg { width: 14px; height: 14px; }

/* Como inscrever */
.inscricao { margin-top: var(--sp-9); padding: var(--sp-7); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.inscricao__title { font-size: var(--fs-3xl); margin-bottom: var(--sp-5); }
.inscricao__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-7); }
.inscricao__grid > :only-child { grid-column: 1 / -1; }
.inscricao__steps { list-style: none; counter-reset: passo; display: flex; flex-direction: column; gap: var(--sp-4); }
.inscricao__steps li { counter-increment: passo; display: grid; grid-template-columns: 32px 1fr; gap: var(--sp-3); color: var(--ink-soft); }
.inscricao__steps li::before { content: counter(passo); width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: var(--fs-sm); display: flex; align-items: center; justify-content: center; }
.inscricao__docs { background: var(--sand); border-radius: var(--r-sm); padding: var(--sp-5) var(--sp-6); }
.inscricao__docs h3 { font-family: var(--font); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-3); }
.inscricao__docs ul { margin-left: var(--sp-5); color: var(--ink-soft); }
.inscricao__docs li::marker { color: var(--gold); }
.inscricao__contact { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; font-weight: 600; }
.inscricao__contact svg { color: var(--brand); }
@media (max-width: 768px) {
    .inscricao { padding: var(--sp-6) var(--sp-5); }
    .inscricao__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
}
.inscricao__contact { gap: var(--sp-2) var(--sp-6); }
.inscricao__contact a { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ── Investimentos: um projeto por linha ── */
.invest-list { display: grid; gap: var(--sp-8); }
.invest-proj { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.invest-proj:nth-child(even) .invest-proj__media { order: 2; }
.invest-proj__media { background: var(--sand); padding: var(--sp-3); display: flex; }
.invest-proj__gallery { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: var(--sp-2); width: 100%; }
.invest-proj__gallery a { display: block; overflow: hidden; border-radius: 8px; min-height: 0; }
.invest-proj__gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.invest-proj__gallery a:hover img { transform: scale(1.035); }
.invest-proj__gallery a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.invest-proj__visual { margin: 0; width: 100%; position: relative; min-height: 320px; }
.invest-proj__visual img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.invest-proj__body { padding: var(--sp-7) var(--sp-7) var(--sp-6); display: flex; flex-direction: column; }
.invest-proj__badge { align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-700); background: var(--gold-50); padding: 5px var(--sp-3); border-radius: var(--r-pill); margin-bottom: var(--sp-3); }
.invest-proj__title { font-size: var(--fs-2xl); line-height: 1.2; margin-bottom: var(--sp-3); }
.invest-proj__desc { color: var(--muted); font-size: var(--fs-base); line-height: 1.6; margin-bottom: var(--sp-5); }
.invest-proj__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: var(--sp-4); margin: 0 0 var(--sp-5); padding: var(--sp-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.invest-num { display: flex; flex-direction: column; }
.invest-num__value { order: 0; margin: 0; font-family: var(--font-head); font-size: var(--fs-2xl); font-weight: 600; color: var(--brand-700); line-height: 1.15; }
.invest-num__label { order: 1; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: var(--sp-1); }
.invest-proj__facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-6); margin: 0 0 var(--sp-5); }
.invest-fact dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.invest-fact dd { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; word-break: break-word; }
.invest-proj__logos { margin-top: auto; display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.invest-proj__logos img { height: 28px; width: auto; opacity: .9; }
@media (max-width: 980px) {
    .invest-proj { grid-template-columns: 1fr; }
    .invest-proj:nth-child(even) .invest-proj__media { order: 0; }
    .invest-proj__gallery a { aspect-ratio: 4 / 3; }
    .invest-proj__visual { min-height: 0; }
    .invest-proj__visual img { position: static; height: auto; max-height: 340px; }
}
@media (max-width: 560px) {
    .invest-proj__body { padding: var(--sp-5); }
    .invest-proj__facts { grid-template-columns: 1fr; }
    .invest-proj__title { font-size: var(--fs-xl); }
}

/* ── Lightbox (vidro desfocado) ── */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-6);
    background: color-mix(in srgb, var(--brand-950) 45%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
    opacity: 0; transition: opacity .2s ease; }
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
html.lightbox-open { overflow: hidden; }
.lightbox__fig { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); }
.lightbox__img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: 10px; box-shadow: var(--shadow-lg); background: var(--surface); }
.lightbox__cap { color: rgba(255,255,255,.9); font-size: var(--fs-sm); letter-spacing: .04em; min-height: 1.2em; }
.lightbox__btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); cursor: pointer;
    background: rgba(255,255,255,.16); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .15s ease; }
.lightbox__btn:hover { background: rgba(255,255,255,.3); }
.lightbox__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { position: absolute; top: var(--sp-4); right: var(--sp-4); }
.invest-proj__visual a { display: block; height: 100%; }
@media (max-width: 560px) {
    .lightbox { padding: var(--sp-3); gap: 0; }
    .lightbox__prev, .lightbox__next { position: absolute; bottom: var(--sp-5); }
    .lightbox__prev { left: calc(50% - 60px); }
    .lightbox__next { right: calc(50% - 60px); }
    .lightbox__img { max-height: calc(100% - 120px); }
}
.invest-num__nota { display: block; white-space: nowrap; text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* ── Documentos: destaque + arquivo por ano ── */
.filter-pills__n { font-size: var(--fs-xs); font-weight: 700; opacity: .7; margin-left: 2px; }
.doc-feature {
    display: flex; align-items: center; gap: var(--sp-5);
    padding: var(--sp-6); margin-bottom: var(--sp-8);
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand);
    border-radius: var(--r); box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.doc-feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.doc-feature__file { flex: none; width: 64px; height: 64px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.doc-feature__file svg { width: 32px; height: 32px; }
.doc-feature__info { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-width: 0; }
.doc-feature__kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.doc-feature__title { font-family: var(--font-head); font-size: var(--fs-h3); line-height: 1.2; color: var(--ink); }
.doc-feature__btn { flex: none; }
.doc-feature__btn svg { width: 16px; height: 16px; }

.doc-archive { display: flex; flex-direction: column; }
.doc-year { display: grid; grid-template-columns: 140px 1fr; gap: var(--sp-6); padding: var(--sp-6) 0; border-top: 1px solid var(--line); }
.doc-year__head { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
.doc-year__label { font-family: var(--font-head); font-size: var(--fs-h3); color: var(--ink); margin: 0; }
.doc-year__count { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--sand-200); padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.doc-year__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.doc-year__list .doc-item { box-shadow: none; }
.doc-year__list .doc-item { flex-wrap: nowrap; padding: 16px 18px; }
.doc-year__list .doc-item__meta { flex-wrap: wrap; row-gap: 4px; }
.doc-year__list .doc-item__meta > * { white-space: nowrap; }
.doc-year__list .doc-item__btn { width: 36px; height: 36px; padding: 0; gap: 0; justify-content: center; font-size: 0; flex: none; }
@media (max-width: 980px) {
    .doc-year { grid-template-columns: 1fr; gap: var(--sp-3); }
    .doc-year__head { position: static; flex-direction: row; align-items: center; justify-content: space-between; }
    .doc-year__list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .doc-feature { flex-direction: column; align-items: stretch; padding: var(--sp-5); gap: var(--sp-4); }
    .doc-feature__btn { justify-content: center; }
}
.date-inline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ── Documento: detalhe (texto + painel de anexos) ── */
.page-hero__crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-8); align-items: start; }
.doc-detail__side { grid-column: 2; grid-row: 1; position: sticky; top: 100px; }
.doc-detail__main { grid-column: 1; grid-row: 1; min-width: 0; }
.doc-detail--solo { grid-template-columns: minmax(0, 1fr); }
.doc-detail--solo .doc-detail__side { grid-column: 1; position: static; max-width: 560px; }
.doc-detail--solo .doc-detail__main { grid-row: 2; }
.doc-body { font-size: var(--fs-lg); }
.doc-body p { color: var(--ink-soft); line-height: 1.8; margin-bottom: 18px; }

.doc-panel { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: var(--sp-5); }
.doc-panel__title { font-size: var(--fs-xl); margin: 0 0 var(--sp-4); }
.doc-panel__files { display: flex; flex-direction: column; gap: var(--sp-2); }
.doc-file { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 14px; border-radius: var(--r-sm); background: var(--brand); color: var(--on-brand); text-decoration: none; transition: background .15s; }
.doc-file:hover { background: var(--brand-700); color: var(--on-brand); }
.doc-file__icon, .doc-file__go { flex: none; display: inline-flex; }
.doc-file__icon svg { width: 22px; height: 22px; }
.doc-file__go svg { width: 18px; height: 18px; }
.doc-file__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.doc-file__label { font-weight: 600; font-size: var(--fs-sm); line-height: 1.35; }
.doc-file__size { font-size: var(--fs-xs); opacity: .8; }
.doc-panel__files .doc-file + .doc-file { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.doc-panel__files .doc-file + .doc-file .doc-file__icon, .doc-panel__files .doc-file + .doc-file .doc-file__go { color: var(--brand); }
.doc-panel__files .doc-file + .doc-file:hover { background: var(--brand-50); }
.doc-panel__meta { margin: var(--sp-5) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); display: grid; gap: var(--sp-2); }
.doc-panel__meta > div { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); }
.doc-panel__meta dt { color: var(--muted); }
.doc-panel__meta dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

.doc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.doc-nav__link { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.doc-nav__link:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.doc-nav__link--next { text-align: right; align-items: flex-end; grid-column: 2; }
.doc-nav__dir { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.doc-nav__dir svg { width: 14px; height: 14px; }
.doc-nav__title { font-weight: 600; color: var(--ink); line-height: 1.35; }
@media (max-width: 980px) {
    .doc-detail { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
    .doc-detail__side { grid-column: 1; position: static; }
    .doc-detail__main { grid-row: 2; }
}
@media (max-width: 560px) {
    .doc-nav { grid-template-columns: 1fr; }
    .doc-nav__link--next { grid-column: 1; }
}

/* ── Aviso de cookies ── */
.cookie-bar {
    position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 520px;
    display: flex; flex-direction: column; gap: var(--sp-4);
    padding: var(--sp-5); background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--r);
    box-shadow: var(--shadow);
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-soft); }
.cookie-bar__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-3); }
.footer-cookies { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar p a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* ── Área reservada: formulários inline, anexos, publicado, palavra-passe ── */
.portal-inline { display: contents; }
button.anexo-move { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
button.anexo-move:disabled { cursor: default; }
button.portal-del { cursor: pointer; font: inherit; }
.anexo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-3); align-items: center; }
.anexo-row input { width: 100%; box-sizing: border-box; }
.portal-compose .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .75fr); }
.portal-add-anexo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.portal-published { align-items: center; flex-wrap: wrap; }
.portal-published__txt { flex: 1 1 260px; }
.portal-published__act { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pw-field { position: relative; }
.pw-field input { width: 100%; padding-right: 96px; box-sizing: border-box; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px 10px; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--brand-700); cursor: pointer; }
.pw-toggle:hover { background: var(--brand-50); }
@media (max-width: 980px) { .portal-add-anexo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) {
    .anexo-row, .portal-compose .form-row, .portal-add-anexo { grid-template-columns: 1fr; }
    .anexo-row { margin-bottom: var(--sp-4); }
}
/* Área reservada: o cartão de edição usa a largura do contentor (etiquetas de anexos legíveis em desktop) */
.portal-card { max-width: none; }
.anexo-item__row { grid-template-columns: minmax(280px, 1fr) auto auto auto; }

/* ── Área reservada: lista a toda a largura + botão para novo documento ── */
.portal-new-cta { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-5);
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 14px;
    box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.portal-new-cta:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.portal-new-cta__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.portal-new-cta__icon svg { width: 22px; height: 22px; }
.portal-new-cta__txt { flex: 1; min-width: 0; }
.portal-new-cta__txt strong { display: block; font-size: var(--fs-lg, 1.125rem); }
.portal-new-cta__txt small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.portal-list-full .portal-card--list { position: static; }
.portal-list-full .portal-doclist__item { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.portal-list-full .portal-doclist__act { width: auto; flex: none; flex-wrap: nowrap; }
.portal-new .portal-title { margin: var(--sp-1) 0 var(--sp-1); }
.portal-new > .form-hint { margin: 0 0 var(--sp-5); }
.portal-new .anexo-row { margin-bottom: var(--sp-3); }
.portal-new .anexo-row input[type="text"], .portal-new .anexo-row input[type="file"] { height: 52px; }
@media (max-width: 760px) {
    .portal-new-cta { flex-wrap: wrap; padding: var(--sp-4); }
    .portal-new-cta .btn { width: 100%; justify-content: center; }
    .portal-list-full .portal-doclist__item { flex-direction: column; align-items: stretch; }
    .portal-list-full .portal-doclist__act { flex-wrap: wrap; }
}

.contact-form__note a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* Selos de financiamento no telemóvel: uma só linha, larguras proporcionais ao formato de cada logótipo (mesma altura) */
@media (max-width: 768px) {
    .funding__inner { flex-wrap: wrap; gap: 10px; }
    .funding__note { flex: 0 0 100%; }
    .funding__inner img { height: auto; min-width: 0; }
    .funding__inner img:nth-of-type(1) { flex: 3.38 1 0; }
    .funding__inner img:nth-of-type(2) { flex: 10.1 1 0; }
    .funding__inner img:nth-of-type(3) { flex: 2.91 1 0; }
}

/* ── Contactos: formulário + bloco "Fale connosco" (cada dado uma vez, cada linha é a acção) ── */
.contact-layout .contact-info-card { position: sticky; top: 100px; }
.contact-links { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.contact-link { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-sm); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
.contact-link:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); color: var(--ink); }
.contact-link__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.contact-link__icon svg { width: 19px; height: 19px; }
.contact-link__txt { flex: 1; min-width: 0; }
.contact-link__txt small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.contact-link__txt strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-link__go { flex: none; color: var(--muted); display: inline-flex; }
.contact-link__go svg { width: 18px; height: 18px; }
.contact-link:hover .contact-link__go { color: var(--brand); }
.contact-place { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.contact-place__addr { display: flex; gap: var(--sp-2); align-items: flex-start; font-weight: 500; line-height: 1.5; margin-bottom: var(--sp-3); }
.contact-place__addr svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand); }
.contact-place iframe { display: block; width: 100%; height: 220px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.contact-place__btn { width: 100%; justify-content: center; margin-top: var(--sp-3); }
.contact-extra { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-3); }
.contact-extra__row { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5; }
.contact-extra__row svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--brand); }
.contact-extra__row strong { color: var(--ink); }
.contact-extra__row a { color: var(--brand-700); font-weight: 600; }
.contact-form select { width: 100%; }
.contact-form .field-error[hidden] { display: none; }
.contact-form__note a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }
.contact-submit:disabled { opacity: .7; cursor: progress; transform: none; }
.contact-form-card { scroll-margin-top: 110px; }
.contact-done { text-align: center; padding: var(--sp-6) 0; }
.contact-done__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-50); color: var(--ok); margin-bottom: var(--sp-4); }
.contact-done__icon svg { width: 30px; height: 30px; }
.contact-done p { color: var(--ink-soft); margin: 0 auto var(--sp-3); max-width: 46ch; }
.contact-done__alt a { color: var(--brand-700); font-weight: 600; }
@media (max-width: 980px) { .contact-layout .contact-info-card { position: static; } }
