/* ABOUTME: Styles for the content bank's sign-in page and home page, taken from David's v7 prototype. */
/* ABOUTME: White with PSOE red accents; Outfit 900 stands in for Geomanist Ultra until the web licence exists. */
:root {
  --rojo: #E20025;
  --rojo-osc: #BD181B;
  --rojo-claro: #FDECEF;
  --txt2: #6E6B68;
  --negro: #151515;
  --fondo: #FFFFFF;
  --linea: #E8E5E1;
  --f-head: "Geomanist Ultra", "Outfit", system-ui, sans-serif;
  --f-ui: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sombra: var(--rojo-osc);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fondo); color: var(--negro);
  font-family: var(--f-ui); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--negro); outline-offset: 2px; }
.top :focus-visible, .acceso .lado :focus-visible { outline-color: #fff; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--negro); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.saltar:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- claim with the 55º solid shadow ---------- */
.claim {
  --long: 0.010em 0.015em 0 var(--sombra),0.021em 0.029em 0 var(--sombra),0.031em 0.044em 0 var(--sombra),0.041em 0.059em 0 var(--sombra),0.052em 0.074em 0 var(--sombra),0.062em 0.088em 0 var(--sombra),0.072em 0.103em 0 var(--sombra),0.083em 0.118em 0 var(--sombra),0.093em 0.133em 0 var(--sombra),0.103em 0.147em 0 var(--sombra),0.114em 0.162em 0 var(--sombra),0.124em 0.177em 0 var(--sombra),0.134em 0.192em 0 var(--sombra),0.145em 0.206em 0 var(--sombra),0.155em 0.221em 0 var(--sombra),0.165em 0.236em 0 var(--sombra),0.176em 0.251em 0 var(--sombra),0.186em 0.265em 0 var(--sombra),0.196em 0.280em 0 var(--sombra),0.206em 0.295em 0 var(--sombra),0.217em 0.310em 0 var(--sombra),0.227em 0.324em 0 var(--sombra),0.237em 0.339em 0 var(--sombra),0.248em 0.354em 0 var(--sombra),0.258em 0.369em 0 var(--sombra),0.268em 0.383em 0 var(--sombra),0.279em 0.398em 0 var(--sombra),0.289em 0.413em 0 var(--sombra),0.299em 0.428em 0 var(--sombra),0.310em 0.442em 0 var(--sombra),0.320em 0.457em 0 var(--sombra),0.330em 0.472em 0 var(--sombra),0.341em 0.487em 0 var(--sombra),0.351em 0.501em 0 var(--sombra),0.361em 0.516em 0 var(--sombra),0.372em 0.531em 0 var(--sombra),0.382em 0.546em 0 var(--sombra),0.392em 0.560em 0 var(--sombra),0.403em 0.575em 0 var(--sombra),0.413em 0.590em 0 var(--sombra),0.423em 0.605em 0 var(--sombra),0.434em 0.619em 0 var(--sombra),0.444em 0.634em 0 var(--sombra),0.454em 0.649em 0 var(--sombra),0.465em 0.664em 0 var(--sombra),0.475em 0.678em 0 var(--sombra),0.485em 0.693em 0 var(--sombra),0.496em 0.708em 0 var(--sombra),0.506em 0.722em 0 var(--sombra),0.516em 0.737em 0 var(--sombra),0.527em 0.752em 0 var(--sombra),0.537em 0.767em 0 var(--sombra),0.547em 0.781em 0 var(--sombra),0.558em 0.796em 0 var(--sombra),0.568em 0.811em 0 var(--sombra);
  font-family: var(--f-head); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em;
  line-height: .9; margin: 0; color: #fff; text-shadow: var(--long);
}
.claim .peq { display: block; font-size: .42em; line-height: 1; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--rojo); color: #fff; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo .sub { font-weight: 600; font-size: .9rem; border-left: 1px solid rgba(255,255,255,.45); padding-left: 12px; }
.salir { margin-left: auto; display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; min-height: 44px; }
.salir:hover { background: rgba(255,255,255,.12); }
.salir svg { width: 20px; height: 20px; }

/* ---------- page ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.pag-h { border-bottom: 1px solid var(--linea); }
.pag-h .wrap { padding-top: 28px; padding-bottom: 24px; }
.pag-h h1 { font-family: var(--f-head); font-weight: 900; text-transform: uppercase; color: var(--rojo); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; margin: 0; }
.pag-h p { margin: 10px 0 0; max-width: 68ch; color: var(--txt2); }
.contenido { padding-top: 24px; }

/* ---------- foldable help texts under the page title ---------- */
.ayudas { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.ayuda summary { cursor: pointer; font-weight: 700; color: var(--rojo); min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
.ayuda summary::-webkit-details-marker { display: none; }
.ayuda summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; font-size: .9rem; line-height: 1; }
.ayuda[open] summary::before { content: "−"; }
.ayuda[open] { flex-basis: 100%; background: var(--fondo2, #F6F5F3); border-radius: 12px; padding: 4px 16px 12px; }
.ayuda ol, .ayuda ul { margin: 4px 0 8px; padding-left: 1.3em; max-width: 68ch; }
.ayuda li { margin: 4px 0; }
.ayuda p { margin: 6px 0 0; }
/* Marks a text as not final yet; remove the span from index.html once the final text is in. */
.borrador { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A5A00; background: #FFF1CC; border: 1px solid #E8C870; border-radius: 4px; padding: 1px 6px; }
.embed { width: 100%; height: 900px; }
.embed iframe { border: 0; width: 100%; height: 100%; }

/* ---------- "Tema del día": red panel with the topic and its featured posts ---------- */
.destacado { background: var(--rojo); color: #fff; }
.destacado-in { max-width: 1240px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.destacado .claim { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
.destacado-fecha { margin: 14px 0 0; font-size: .85rem; font-weight: 600; opacity: .9; }
.destacado-t { font-family: var(--f-head); font-weight: 900; text-transform: uppercase; font-size: 1.6rem; line-height: 1.05; margin: 14px 0 0; }
.destacado-t .borrador { vertical-align: middle; }
.destacado-m { margin: 10px 0 0; font-size: 1.05rem; max-width: 42ch; }
.destacado-embed { background: #fff; border-radius: 12px; overflow: hidden; height: 600px; }
.destacado-embed iframe { border: 0; width: 100%; height: 100%; }

/* ---------- filter bar ---------- */
/* Each group has its own colour (its tone in filter-options.js): territory red, theme rose,
   platforms black, formats teal. */
.filtros { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; --tono: var(--rojo); }
.filtros-cab { display: flex; align-items: center; gap: 8px; }
.quitar { margin-left: auto; }
.quitar[hidden] { display: none; }
.quitar::before { content: "✕"; margin-right: 6px; font-size: .8em; }
.ocultar { display: inline-flex; align-items: center; gap: 8px; color: var(--negro); }
.ocultar svg { width: 16px; height: 16px; }
.ocultar:hover { border-color: var(--negro); }
.ocultar .n { background: var(--rojo); color: #fff; border-radius: 999px; min-width: 20px; padding: 0 6px; line-height: 20px; font-size: .78rem; text-align: center; }
.ocultar .n:empty { display: none; }
.filtros .grupos { display: flex; flex-direction: column; gap: inherit; }
.filtros .grupos[hidden] { display: none; }
.filtros .grupo { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--linea); border-left: 4px solid var(--tono); border-radius: 12px; padding: 10px 12px; }
.filtros .grupo[data-tone="negro"] { --tono: var(--negro); }
.filtros .grupo[data-tone="verde"] { --tono: #0F6E6E; }
.filtros .grupo[data-tone="rosa"] { --tono: #C0306B; }
/* The group title is the button that folds the group; the arrow points right when folded. */
.filtros .grupo-t { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; min-height: 44px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tono); flex: none; width: 150px; text-align: left; }
.filtros .grupo-t svg { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.filtros .grupo-t[aria-expanded="false"] svg { transform: rotate(-90deg); }
.filtros .grupo-t .n { background: var(--tono); color: #fff; border-radius: 999px; min-width: 20px; padding: 0 6px; line-height: 20px; text-align: center; letter-spacing: 0; }
.filtros .grupo-t .n:empty { display: none; }
.filtros .chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.filtros .chips[hidden] { display: none; }
.chip { border: 1.5px solid var(--linea); background: #fff; border-radius: 999px; padding: 6px 14px; min-height: 44px; font-weight: 600; font-size: .92rem; }
/* In a group, a chip's text takes the group colour and its outline a lighter shade of it (full colour on hover);
   once chosen it fills with that colour and the text turns white. */
.filtros .grupo .chip:not([aria-pressed="true"]) { color: var(--tono); border-color: color-mix(in srgb, var(--tono) 35%, #fff); }
.filtros .grupo .chip:not([aria-pressed="true"]):hover { border-color: var(--tono); }
.chip:hover { border-color: var(--tono, var(--rojo)); }
.chip[aria-pressed="true"] { background: var(--tono, var(--rojo)); border-color: var(--tono, var(--rojo)); color: #fff; }

/* ---------- sign-in ---------- */
.acceso { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.acceso .lado { background: var(--rojo); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.acceso .lado .claim { font-size: clamp(3rem, 7vw, 6rem); }
.acceso .lado p { max-width: 42ch; font-size: 1.02rem; margin: 0; opacity: .95; }
.acceso .form-l { padding: 48px; display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }
.acceso h2.t { font-size: 1.8rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.acceso .intro { color: var(--txt2); margin: 0 0 24px; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo label { font-weight: 600; font-size: .88rem; }
.campo input { border: 1px solid #D9D5D0; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 1rem; }
.campo input:focus { border-color: var(--rojo); outline: none; box-shadow: 0 0 0 3px var(--rojo-claro); }
.error { color: var(--rojo); font-weight: 600; font-size: .88rem; min-height: 1.2em; margin-bottom: 8px; }
.btn { border: 1.5px solid var(--rojo); background: var(--rojo); color: #fff; font-weight: 600; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; width: 100%; padding: 12px; font-size: 1rem; }
.btn:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }

/* ---------- footer ---------- */
.pie-pag { border-top: 1px solid var(--linea); margin-top: 48px; }
.pie-pag .wrap { padding-top: 22px; padding-bottom: 26px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--txt2); }
.pie-pag .logo { color: var(--rojo); }

@media (max-width: 820px) {
  .destacado-in { grid-template-columns: 1fr; gap: 20px; padding: 24px 16px; }
  .logo .sub { display: none; }
  .acceso { grid-template-columns: 1fr; }
  .acceso .lado { padding: 28px; min-height: 240px; gap: 24px; }
  .acceso .form-l { padding: 28px 22px 40px; }
}
@media (max-width: 520px) {
  .top-in { gap: 10px; padding: 0 16px; }
  .wrap { padding: 0 16px; }
  .embed { height: 80vh; }
  .pag-h .wrap { padding-top: 20px; padding-bottom: 16px; }
  .contenido { padding-top: 16px; }
  .filtros { gap: 8px; margin-bottom: 12px; }
  .filtros .grupo { flex-direction: column; gap: 0; padding: 0 10px; border-radius: 10px; }
  .filtros .grupo-t { width: 100%; }
  .filtros .chips:not([hidden]) { margin-bottom: 10px; }
}
