:root {
  --verde: #0a7d3b;
  --verde-osc: #065c2b;
  --amarillo: #fcd116;
  --dorado: #e2a712;
  --rojo: #ce1126;
  --negro: #0d0d0d;
  --gris: #f4f3ee;
  --texto: #1c1c1c;
  --radio: 14px;
  --sombra: 0 6px 24px rgb(0 0 0 / .10);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto);
  background: #fff;
  line-height: 1.65;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde-osc); }
a:hover { color: var(--rojo); }
h1, h2, h3 { line-height: 1.15; font-weight: 800; margin: 0 0 .6em; letter-spacing: -.01em; }
.contenedor { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.saltar { position: absolute; left: -999px; background: var(--amarillo); color: #000; padding: .5rem 1rem; z-index: 99; }
.saltar:focus { left: 0; }

/* Franja tricolor */
.tricolor { display: flex; height: 6px; }
.tricolor i { flex: 1; }
.tricolor i:nth-child(1) { background: var(--verde); }
.tricolor i:nth-child(2) { background: var(--amarillo); }
.tricolor i:nth-child(3) { background: var(--rojo); }

/* Cabecera */
.cabecera { background: var(--negro); position: sticky; top: 0; z-index: 20; }
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; gap: 1rem; }
.marca { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.marca strong { color: var(--amarillo); }
.marca img { border-radius: 8px; }
.menu { display: flex; gap: .25rem; align-items: center; }
.menu a { color: #fff; text-decoration: none; padding: .55rem .85rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.menu a:hover { background: rgb(255 255 255 / .12); color: var(--amarillo); }
.menu .menu__cta { background: var(--rojo); }
.menu .menu__cta:hover { background: var(--amarillo); color: #000; }
.menu-boton { display: none; background: var(--amarillo); border: 0; font-weight: 700; padding: .55rem 1rem; border-radius: 999px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-boton { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--negro); flex-direction: column; align-items: stretch; padding: .75rem 1rem 1rem; }
  .menu--abierto { display: flex; }
}

/* Héroe */
.heroe { background: var(--negro); color: #fff; overflow: hidden; position: relative; }
.heroe__grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 1rem; min-height: 560px; }
.heroe__texto { padding: 4rem 0; align-self: center; }
.heroe__sup { color: var(--amarillo); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; margin: 0 0 1rem; }
.heroe h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); text-transform: uppercase; }
.heroe h1 span { color: var(--amarillo); display: block; }
.heroe__lema { font-size: 1.35rem; max-width: 32ch; color: #ddd; }
.heroe__foto { align-self: stretch; position: relative; }
.heroe__foto img { height: 100%; width: 100%; object-fit: cover; object-position: left center; mask-image: linear-gradient(to right, transparent 0, #000 25%); }
.botones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.boton { display: inline-block; padding: .85rem 1.6rem; border-radius: 999px; font-weight: 800; text-decoration: none; background: var(--amarillo); color: #000; transition: transform .15s, background .15s; }
.boton:hover { transform: translateY(-2px); background: #fff; color: #000; }
.boton--rojo { background: var(--rojo); color: #fff; }
.boton--rojo:hover { background: #fff; color: var(--rojo); }
.boton--borde { background: transparent; border: 2px solid #fff; color: #fff; }
@media (max-width: 860px) {
  .heroe__grid { grid-template-columns: 1fr; min-height: 0; }
  .heroe__foto { order: -1; max-height: 380px; }
  .heroe__foto img { mask-image: linear-gradient(to top, transparent 0, #000 30%); object-position: center 20%; }
  .heroe__texto { padding: 1rem 0 3rem; }
}

/* Secciones */
.seccion { padding: 4.5rem 0; }
.seccion--gris { background: var(--gris); }
.seccion--verde { background: var(--verde); color: #fff; }
.seccion__titulo { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; position: relative; padding-bottom: .6rem; margin-bottom: 2rem; }
.seccion__titulo::after { content: ""; position: absolute; left: 0; bottom: 0; width: 110px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--verde) 33%, var(--amarillo) 33% 66%, var(--rojo) 66%); }
.seccion--verde .seccion__titulo::after { background: var(--amarillo); }
.seccion__pie { margin-top: 2rem; text-align: center; }

.sobre { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: center; }
.sobre img { border-radius: var(--radio); box-shadow: var(--sombra); }
.sobre p { font-size: 1.15rem; }
.cifras { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cifras div { border-left: 5px solid var(--amarillo); padding-left: .9rem; font-weight: 700; }
@media (max-width: 860px) { .sobre { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Tarjetas */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.tarjeta { background: #fff; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; transition: transform .2s; color: var(--texto); }
.tarjeta:hover { transform: translateY(-4px); }
.tarjeta__img { aspect-ratio: 3 / 2; background: var(--negro) center/cover; }
.tarjeta__img img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta__cuerpo { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.tarjeta h3 { font-size: 1.2rem; margin: 0; }
.tarjeta h3 a { color: inherit; text-decoration: none; }
.tarjeta h3 a::after { content: ""; position: absolute; inset: 0; }
.tarjeta { position: relative; }
.tarjeta p { margin: 0; color: #555; font-size: .97rem; }
.tarjeta__fecha { font-size: .85rem; font-weight: 700; color: var(--verde-osc); text-transform: uppercase; letter-spacing: .05em; }
.etiqueta { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .25rem .7rem; border-radius: 999px; background: var(--verde); color: #fff; margin: 0 0 .6rem; }
.etiqueta--evento { background: var(--rojo); }
.etiqueta--actividad { background: var(--amarillo); color: #000; }
.etiqueta--articulo-opinion { background: var(--negro); }

/* Agenda */
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.agenda li { display: grid; grid-template-columns: 90px 1fr; gap: 1.25rem; background: #fff; border-radius: var(--radio); padding: 1rem 1.25rem; align-items: center; box-shadow: var(--sombra); position: relative; }
.agenda__dia { text-align: center; background: var(--rojo); color: #fff; border-radius: 12px; padding: .5rem .25rem; line-height: 1.1; }
.agenda__dia b { display: block; font-size: 2rem; }
.agenda__dia span { text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; }
.agenda h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
.agenda h3 a { color: inherit; text-decoration: none; }
.agenda h3 a::after { content: ""; position: absolute; inset: 0; }
.agenda p { margin: 0; color: #555; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 960px) { .dos-col { grid-template-columns: 1fr; } }

/* Galería */
.galeria { columns: 3 260px; column-gap: 1rem; }
.galeria img { width: 100%; margin: 0 0 1rem; border-radius: var(--radio); break-inside: avoid; }

/* Contacto */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contacto a { color: var(--amarillo); }
.contacto .redes-grandes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.contacto .redes-grandes a { background: rgb(255 255 255 / .14); color: #fff; text-decoration: none; padding: .6rem 1.1rem; border-radius: 999px; font-weight: 700; }
.contacto .redes-grandes a:hover { background: var(--amarillo); color: #000; }
@media (max-width: 860px) { .contacto { grid-template-columns: 1fr; } }

/* Interior */
.contenido-interno { padding: 3rem 0 5rem; max-width: 860px; }
.contenido-interno.contenedor { width: min(860px, 100% - 2rem); }
.listado-titulo { font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; margin-bottom: 1.5rem; }
.listado-titulo + .tarjetas, .listado-titulo + .agenda { margin-top: 1rem; }
body:has(.tarjetas) .contenido-interno, body:has(.agenda) .contenido-interno { max-width: none; width: min(1160px, 100% - 2rem); }
.nodo__cabecera h1 { font-size: clamp(2rem, 5vw, 3rem); }
.nodo__meta { display: flex; gap: 1.25rem; flex-wrap: wrap; color: #555; font-weight: 600; }
.nodo__imagen img { border-radius: var(--radio); width: 100%; margin: 1.25rem 0; }
.nodo__cuerpo { font-size: 1.12rem; }
.volver { font-weight: 700; }
.pager { margin-top: 2rem; }
.pager__items { display: flex; gap: .5rem; list-style: none; padding: 0; justify-content: center; flex-wrap: wrap; }
.pager a { padding: .4rem .9rem; border-radius: 999px; background: var(--gris); text-decoration: none; font-weight: 700; }
.pager__item--current a { background: var(--verde); color: #fff; }
.vacio { padding: 3rem; text-align: center; background: var(--gris); border-radius: var(--radio); color: #555; }

/* Pie */
.pie { background: var(--negro); color: #ddd; }
.pie__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.pie h2 { color: var(--amarillo); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.pie a { color: #fff; }
.pie a:hover { color: var(--amarillo); }
.pie__lema { color: var(--amarillo); font-weight: 700; }
.pie img { border-radius: 10px; }
.redes { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.pie__legal { text-align: center; font-size: .85rem; color: #888; padding: 1rem; margin: 0; border-top: 1px solid #222; }
@media (max-width: 760px) { .pie__grid { grid-template-columns: 1fr; } }

/* Admin: no mostrar pestañas/mensajes rotos de stable9 fuera del contenedor */
.messages { margin: 1rem auto; width: min(1160px, 100% - 2rem); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
