/* Estilos comunes a todas las páginas. Los colores vienen de tema.css. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--cuerpo); background: var(--bg); color: var(--texto);
  line-height: 1.5; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
svg.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.envoltorio { max-width: 1080px; margin: 0 auto; padding-left: calc(20px + env(safe-area-inset-left)); padding-right: calc(20px + env(safe-area-inset-right)); }

/* ---------- cabecera "camiseta" ---------- */
.cabecera {
  color: var(--cab-txt); background: var(--cab-bg);
  background-image: repeating-linear-gradient(90deg, var(--rayas) 0 60px, transparent 60px 120px);
  padding-top: env(safe-area-inset-top);
  border-bottom: 7px solid var(--franja); box-shadow: 0 3px 0 var(--filete);
}
.cabecera.fija { position: sticky; top: 0; z-index: 20; border-bottom-width: 5px; box-shadow: 0 2px 0 var(--filete); }
.barra-sup { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.marca img { width: 46px; height: 34px; flex-shrink: 0; }
.marca b { font-family: var(--titulos); font-weight: 700; font-size: 1.3rem; letter-spacing: .01em; white-space: nowrap; }
.marca b span { color: var(--cab-sub); }
.migas { font-family: var(--titulos); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cab-sub); white-space: nowrap; }
.migas { margin-left: 12px; padding-left: 12px; border-left: 2px solid var(--borde); line-height: 1.1; }
.acciones { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sello {
  font-family: var(--titulos); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid currentColor; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}

/* ---------- titulares ---------- */
.titular {
  font-family: var(--titulos); font-weight: 700; text-transform: uppercase; line-height: .95;
  margin: 0; letter-spacing: .005em; text-wrap: balance;
}
.titular span { color: var(--cab-sub); }
.antetitulo {
  font-family: var(--titulos); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--verde-txt); margin: 0 0 14px;
}

/* ---------- tarjetas ---------- */
.tarjeta {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; padding: 20px;
  text-decoration: none; color: var(--texto);
}
a.tarjeta { transition: transform .12s, box-shadow .12s, border-color .12s; }
a.tarjeta:hover { transform: translateY(-2px); border-color: var(--verde); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.tarjeta h2, .tarjeta h3 { font-family: var(--titulos); font-weight: 700; font-size: 1.7rem; line-height: 1; margin: 6px 0 0; }
.tarjeta p { margin: 0; color: var(--suave); font-size: .95rem; }
.tarjeta .icono {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--activo); color: var(--verde-txt);
}
.tarjeta .icono svg { width: 26px; height: 26px; stroke-width: 1.8; }
.pill {
  display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--suave); border: 1px solid var(--borde); white-space: nowrap;
}
.tarjeta.destacada { background: var(--dest-bg); color: var(--dest-txt); border-color: var(--dest-bg); box-shadow: inset 0 -5px 0 var(--franja); }
.tarjeta.destacada p { color: color-mix(in srgb, var(--dest-txt) 82%, transparent); }
.tarjeta.destacada .icono { background: color-mix(in srgb, var(--dest-txt) 12%, transparent); color: var(--dest-acento); }
.tarjeta.destacada .pill { background: var(--dest-acento); color: #0f1f15; border-color: transparent; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--borde); background: var(--panel);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--verde); }
.btn.primario { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.primario:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: .45; cursor: default; }

/* Botón "me interesa" con contador */
.voto {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  padding: 7px 12px 7px 10px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--borde); background: transparent; color: var(--suave); font-weight: 600; font-size: .9rem;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
.voto svg { width: 18px; height: 18px; }
.voto:hover { border-color: var(--verde); color: var(--verde-txt); }
.voto:active { transform: scale(.96); }
.voto[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
.voto[aria-pressed="true"] svg { fill: currentColor; }
.voto .n { font-variant-numeric: tabular-nums; min-width: 1ch; }
.tarjeta.destacada .voto { border-color: color-mix(in srgb, var(--dest-txt) 35%, transparent); color: var(--dest-txt); }
.tarjeta.destacada .voto[aria-pressed="true"] { background: var(--dest-acento); border-color: var(--dest-acento); color: #0f1f15; }

/* ---------- formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-weight: 600; font-size: .9rem; }
.campo .ayuda { font-size: .78rem; color: var(--suave); }
input[type="text"], input[type="password"], input[type="search"], textarea {
  width: 100%; font-size: 16px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--borde); background: var(--bg); color: var(--texto); -webkit-appearance: none; appearance: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--verde); outline-offset: 0; border-color: transparent; }
.mensaje { font-size: .9rem; margin: 0; min-height: 1.4em; }
.turnstile:empty { display: none; }
.mensaje.ok { color: var(--verde-txt); }
.mensaje.error { color: #d23c3c; }

/* ---------- pie ---------- */
.aviso-legal {
  margin: 40px 0 0; padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--borde);
  font-size: .9rem; color: var(--suave);
}
.aviso-legal strong { color: var(--texto); }
.pie { padding-top: 20px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); font-size: .82rem; color: var(--suave); }

@media (max-width: 560px) {
  .envoltorio { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
  .marca b { font-size: 1.15rem; }
  .sello { font-size: .75rem; padding: 2px 8px; }
  /* En páginas interiores, en móvil basta con la bandera + nombre de sección */
  .cabecera.fija .marca b { display: none; }
  .cabecera.fija .sello { display: none; }
}
