/* Em debate: a lista das sessões (o próximo debate, os realizados, os últimos vídeos) e a página de cada sessão
   (programa, oradores, vídeos, fotografias, comunicações). Rosa, a cor da secção. */

/* O que se esconde (os dias sem JavaScript, os vídeos e as fotografias a mais) esconde-se mesmo com display próprio. */
.programa [hidden], .videos > [hidden], .galeria > [hidden] { display: none; }

.deb-hero { --brilho: rgba(210, 74, 136, .3); }
.deb-eyebrow { color: #f08ab8; margin-top: 26px; }
.deb-hero h1 { margin-top: 12px; }
.kpi--deb .n { color: #f08ab8; }

.deb-titulo { display: flex; align-items: center; gap: 12px; font-size: 26px; color: var(--navy); }
.deb-titulo::before { content: ''; width: 5px; height: 26px; border-radius: 3px; background: var(--debate); flex: none; }
.deb-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 22px; }
.deb-cab .deb-titulo { margin: 0; }
.deb-cab > small { color: var(--muted); font-size: 13px; margin-right: auto; }
.deb-bloco { margin-top: 44px; }
.deb-bloco > .deb-titulo { margin-bottom: 22px; }
.deb-filtrado { color: var(--muted); font-size: 14px; }
.deb-filtrado a { margin-left: 10px; color: var(--blue); font-weight: 600; }

/* ── Filtros ───────────────────────────────────────────────── */
.deb-filtros { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 200px) auto; gap: 18px; align-items: center; padding: 16px 18px; }
.deb-filtros.js { grid-template-columns: auto minmax(0, 1fr) minmax(150px, 200px); }
.deb-estado a { display: inline-flex; gap: 8px; align-items: center; }
.deb-estado a em { font-style: normal; font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: rgba(13, 43, 78, .08); }
.deb-estado a.on { background: var(--debate); }
.deb-estado a.on em { background: rgba(255, 255, 255, .25); }
.deb-tipos { display: flex; flex-wrap: wrap; gap: 8px; }
.deb-tipos a { font-family: 'Rubik'; font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 9px 14px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.deb-tipos a:hover { color: var(--navy); }
.deb-tipos a.on { background: #fbe6ef; color: var(--debate); }

/* ── Próximo debate ────────────────────────────────────────── */
.deb-proximo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.deb-proximo__img { position: relative; display: block; min-height: 320px; background: #e9eef5 center / cover no-repeat; }
.deb-data { position: absolute; top: 18px; left: 18px; background: #fff; border-radius: 14px; padding: 10px 14px; text-align: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.deb-data b { display: block; font-family: 'Rubik'; font-size: 30px; line-height: 1; color: var(--debate); }
.deb-data small { display: block; margin-top: 6px; font-family: 'Rubik'; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.deb-proximo__texto { padding: 32px 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.deb-proximo h3 { font-size: 28px; line-height: 1.2; color: var(--navy); }
.deb-proximo h3 a:hover { color: var(--debate); }
.deb-proximo p { color: var(--muted); line-height: 1.65; }
.deb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.deb-chips .chip { font-size: 11px; }
.chip.deb { background: var(--debate); color: #fff; }
.chip.abertas { background: #fdf0d8; color: #b8740f; }
.chip.escuro { background: rgba(255, 255, 255, .14); color: #fff; }
.deb-factos { list-style: none; display: grid; gap: 8px; color: var(--ink); font-size: 14px; }
.deb-factos li { display: flex; align-items: center; gap: 10px; }
.deb-factos svg { width: 17px; height: 17px; stroke: var(--debate); flex: none; }
.deb-com { display: flex; align-items: center; gap: 12px; }
.deb-caras { display: flex; flex: none; }
.deb-caras > * { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; object-fit: cover; display: grid; place-items: center; font-family: 'Rubik'; font-weight: 700; font-size: 11px; color: #fff; }
.deb-caras > :first-child { margin-left: 0; }
.deb-com small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.deb-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.deb-btn { background: var(--debate); }
.deb-btn--linha { background: transparent; color: var(--debate); box-shadow: inset 0 0 0 1.5px var(--debate); }

/* ── Cartões das sessões ───────────────────────────────────── */
.sessoes { list-style: none; gap: 24px; }
.sessoes > li { display: flex; }
.sessao { width: 100%; }
.sessao .media .chip { position: absolute; top: 14px; left: 14px; background: var(--debate); color: #fff; font-size: 10.5px; }
.sessao__num { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.sessao__num > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(10, 31, 57, .78); color: #fff; font-family: 'Rubik'; font-weight: 600; font-size: 11.5px; }
.sessao__num svg { width: 13px; height: 13px; stroke: currentColor; }
.sessao .body { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.sessao h3 { font-size: 16.5px; }
.sessao .meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.card.sessao > a:hover h3 { color: var(--debate); }

/* ── Reveja as intervenções ────────────────────────────────── */
.deb-videos { background: #33404f; color: #fff; padding: 56px 0; }
.deb-videos .container { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.deb-videos .eyebrow { color: #aab8c8; }
.deb-videos h2 { font-size: 28px; margin: 12px 0 10px; }
.deb-videos p { color: #c9d3de; margin-bottom: 22px; }
.deb-videos ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.deb-videos li a { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; background: #1f2a36 center / cover no-repeat; overflow: hidden; }
.deb-videos li a:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; transition: transform .15s; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.play svg { width: 18px; height: 18px; fill: var(--navy); stroke: none; margin-left: 2px; }

/* ── A página da sessão: o topo ────────────────────────────── */
.deb-capa { position: relative; color: #fff; background: #0d2b4e center / cover no-repeat; }
.deb-capa::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 31, 57, .96) 0%, rgba(13, 43, 78, .88) 45%, rgba(118, 38, 88, .62) 100%); }
.deb-capa .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 40px; align-items: end; padding-top: 34px; padding-bottom: 56px; }
.deb-capa__texto { display: grid; gap: 16px; justify-items: start; }
.deb-capa h1 { font-size: 46px; line-height: 1.1; max-width: 860px; }
.deb-factos--claro { color: #e6edf6; }
.deb-factos--claro svg { stroke: #f08ab8; }
.deb-ancoras { display: flex; flex-wrap: wrap; gap: 8px; }
.deb-ancoras a { padding: 8px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); font-family: 'Rubik'; font-weight: 600; font-size: 13px; }
.deb-ancoras a:hover { background: rgba(255, 255, 255, .12); }
.deb-capa .kpi { background: rgba(255, 255, 255, .1); backdrop-filter: blur(4px); text-align: center; }

.deb-pagina { padding-bottom: 90px; }
.deb-intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; padding-top: 44px; }
.deb-intro__principal { min-width: 0; }
/* O programa logo a seguir ao texto, na mesma coluna. */
.deb-intro__principal > .deb-sec { margin-top: 40px; }
.deb-intro__texto { font-size: 16.5px; line-height: 1.75; color: var(--ink); display: grid; gap: 14px; }
.deb-intro__texto a, .deb-texto a { color: var(--blue); text-decoration: underline; }
/* A coluna da direita (a ficha e a caixa Partilhar) acompanha o texto e o programa ao descer a página. */
.deb-lado { display: grid; gap: 16px; position: sticky; top: 20px; }
.deb-ficha { background: var(--bg); border-radius: 16px; padding: 20px 22px; display: grid; gap: 12px; font-size: 13.5px; }
.deb-ficha dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.deb-ficha dd { color: var(--navy); font-weight: 600; margin-top: 2px; }
.deb-sec { margin-top: 56px; scroll-margin-top: 20px; }
.deb-sec > .deb-titulo { margin-bottom: 22px; }
.deb-texto { color: var(--muted); line-height: 1.7; margin: -8px 0 22px; max-width: 820px; display: grid; gap: 10px; }

/* ── Programa ──────────────────────────────────────────────── */
.programa { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 10px 30px 26px; }
.programa__dias { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 -30px 6px; padding: 0 30px; }
.programa__dias button { border: 0; background: none; cursor: pointer; padding: 16px 14px 14px; font-family: 'Rubik'; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.programa__dias button:hover { color: var(--navy); }
.programa__dias button[aria-selected=true] { color: var(--debate); border-bottom-color: var(--debate); }
.programa__nome { font-size: 15px; color: var(--debate); margin: 22px 0 4px; }
.programa.js .programa__nome { display: none; }
.linha { list-style: none; }
.linha > li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 26px; padding: 18px 0; position: relative; }
.linha > li + li { border-top: 1px dashed var(--line); }
.linha > li::before { content: ''; position: absolute; left: 112px; top: 24px; width: 9px; height: 9px; border-radius: 50%; background: var(--debate); box-shadow: 0 0 0 4px #fbe6ef; }
.linha__hora { font-family: 'Rubik'; font-weight: 700; color: var(--navy); text-align: right; padding-top: 1px; }
.linha b { display: block; font-family: 'Rubik'; font-size: 15.5px; color: var(--navy); line-height: 1.4; padding-left: 22px; }
.linha small { display: block; color: var(--muted); padding-left: 22px; margin-top: 3px; }
.linha__oradores { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 22px; margin-top: 10px; }
.linha__oradores li { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.programa__html table { width: 100%; border-collapse: collapse; }
.programa__html th, .programa__html td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.programa__html h2, .programa__html h3, .programa__html h4 { color: var(--debate); font-size: 16px; margin: 20px 0 6px; }

/* ── Oradores ──────────────────────────────────────────────── */
.oradores { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.oradores > li { background: #fff; border-radius: 16px; box-shadow: var(--shadow); text-align: center; }
.oradores > li, .oradores a { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 22px 14px 20px; }
.oradores a { padding: 0; width: 100%; }
.oradores a:hover b { color: var(--debate); }
.oradores img, .oradores .ini { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.oradores .ini { display: grid; place-items: center; font-family: 'Rubik'; font-weight: 700; font-size: 19px; color: #fff; }
.oradores b { font-family: 'Rubik'; font-size: 14px; color: var(--navy); line-height: 1.3; }
.oradores small { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Vídeos ────────────────────────────────────────────────── */
.videos { list-style: none; }
.video { display: flex; flex-direction: column; }
.video__img { position: relative; display: block; aspect-ratio: 16 / 9; background: #1f2a36 center / cover no-repeat; }
.video__img:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.video__img--a-ver iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__dur { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 600; }
.video .body { padding: 16px 18px 18px; }
.video__orador { font-family: 'Rubik'; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--debate); margin-bottom: 6px; }
.video h3 { font-size: 14.5px; }
.deb-mais { margin: 26px auto 0; display: flex; width: max-content; color: var(--debate); box-shadow: inset 0 0 0 1.5px var(--debate); cursor: pointer; border: 0; }

/* ── Fotografias ───────────────────────────────────────────── */
.galeria { list-style: none; display: grid; gap: 12px; grid-template-columns: 1.6fr 1fr 1fr; grid-auto-rows: 200px; }
.galeria > li:first-child { grid-row: span 2; }
.galeria--1 { grid-template-columns: 1fr; grid-auto-rows: 420px; }
.galeria--1 > li:first-child, .galeria--2 > li:first-child { grid-row: auto; }
.galeria--2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 320px; }
.galeria--3 { grid-template-columns: 1.6fr 1fr; }
.galeria a { position: relative; display: block; height: 100%; border-radius: 16px; overflow: hidden; background: #e9eef5; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.galeria a:hover img { transform: scale(1.04); }
.galeria__mais { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 31, 57, .62); color: #fff; font-family: 'Rubik'; font-weight: 700; font-size: 18px; }
.lightbox { margin: auto; border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); overflow: visible; }
.lightbox::backdrop { background: rgba(6, 18, 34, .92); }
.lightbox figure { display: grid; gap: 12px; justify-items: center; }
.lightbox img { width: min(1200px, 88vw); height: auto; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.lightbox figcaption { color: #c9d6e6; font-size: 13.5px; }
.lightbox__fechar { position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; cursor: pointer; }
.lightbox__seta { position: fixed; top: 50%; left: 18px; transform: translateY(-50%) rotate(180deg); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); display: grid; place-items: center; cursor: pointer; }
.lightbox__seta--seg { left: auto; right: 18px; transform: translateY(-50%); }
.lightbox__seta svg { width: 20px; height: 20px; stroke: #fff; }

/* ── Comunicações e publicações ────────────────────────────── */
/* Os PDF das comunicações primeiro e, por baixo, as publicações associadas, cada uma na largura toda. */
.comunicacoes--2 { display: grid; gap: 20px; }
.docs-lista { list-style: none; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 8px 24px; }
.docs-lista li { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.docs-lista li + li { border-top: 1px solid var(--line); }
.docs-lista__tipo { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #fdecee; color: #d2553f; font-family: 'Rubik'; font-weight: 700; font-size: 11px; }
.docs-lista__nome { flex: 1; min-width: 0; }
.docs-lista__nome b { display: block; font-family: 'Rubik'; font-size: 14.5px; color: var(--navy); line-height: 1.35; }
.docs-lista__nome small { color: var(--muted); font-size: 12.5px; }
.docs-lista a { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 13px; }
.docs-lista a svg { width: 15px; height: 15px; stroke: currentColor; }
.deb-pubs { background: linear-gradient(150deg, #7651c4, #5b3aa6); color: #fff; border-radius: 20px; padding: 22px; }
.deb-pubs h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #d9ccf5; margin-bottom: 14px; }
.deb-pubs ul { list-style: none; display: grid; gap: 12px; }
.deb-pubs a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .1); }
.deb-pubs a:hover { background: rgba(255, 255, 255, .18); }
.deb-pubs .cv { flex: none; width: 52px; height: 68px; border-radius: 6px; background: #fff center / contain no-repeat; }
.deb-pubs b { display: block; font-family: 'Rubik'; font-size: 14px; line-height: 1.35; }
.deb-pubs small { color: #d9ccf5; font-size: 12px; }
.deb-todas { display: inline-flex; align-items: center; gap: 6px; color: var(--debate); font-weight: 600; font-size: 14px; }
.deb-todas svg { width: 15px; height: 15px; stroke: currentColor; }

/* ── Ecrãs mais pequenos ─────────────────────────────────────── */
@media (max-width: 1100px) {
    .deb-filtros, .deb-filtros.js { grid-template-columns: 1fr; }
    .deb-capa .container { grid-template-columns: 1fr; }
    .deb-intro { grid-template-columns: 1fr; gap: 28px; }
    .deb-lado { position: static; }
    .oradores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .deb-videos .container { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .deb-proximo { grid-template-columns: 1fr; }
    .deb-proximo__img { min-height: 220px; }
    .deb-proximo__texto { padding: 24px 22px; }
    .deb-proximo h3 { font-size: 22px; }
    .deb-capa h1 { font-size: 32px; }
    .deb-capa .kpis { grid-template-columns: repeat(3, 1fr); }
    .programa { padding: 6px 18px 18px; }
    .programa__dias { margin: 0 -18px 6px; padding: 0 18px; }
    .linha > li { grid-template-columns: 1fr; gap: 6px; }
    .linha > li::before { display: none; }
    .linha__hora { text-align: left; color: var(--debate); }
    .linha b, .linha small, .linha__oradores { padding-left: 0; }
    .oradores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .galeria, .galeria--3 { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
    .galeria > li:first-child { grid-column: span 2; grid-row: auto; }
    .galeria--1, .galeria--2 { grid-template-columns: 1fr; grid-auto-rows: 220px; }
    .galeria--1 > li:first-child, .galeria--2 > li:first-child { grid-column: auto; }
    .comunicacoes--2 { grid-template-columns: 1fr; }
    .docs-lista { padding: 4px 16px; }
    .docs-lista li { flex-wrap: wrap; }
    .deb-videos ul { grid-template-columns: 1fr 1fr; }
    .deb-videos li:nth-child(3) { display: none; }
}
