/*
Theme Name: IDPP - Propuesta cívica 2026
Theme URI: https://idpp02.nube4.cloud
Author: Proyecto hosting IDPP
Description: Propuesta de layout para la portada del IDPP, inspirada en el patrón de un portal cívico (boston.gov): búsqueda primero, franja de atención, servicios en mosaico, bloques de color, noticias, videos, convocatoria y autoridades. Usa solo la paleta del sistema de diseño IDPP Institucional 2026 (azul-* y blanco) y permite comparar cuatro combinaciones tipográficas.
Version: 0.1.0
Requires PHP: 8.0
Text Domain: idpp-civico
*/

/* ══════════════════════════════════════════════════════════════
   TOKENS — los del sistema de diseño IDPP Institucional 2026 (mismos nombres y valores)
   ══════════════════════════════════════════════════════════════ */
:root {
	--azul-950: #0E1F36;
	--azul-900: #10243F;
	--azul-800: #0D2745;
	--azul-700: #1B365D;
	--azul-600: #27466B;
	--azul-500: #2F4F74;
	--azul-400: #496A8C;
	--azul-300: #7F9CBD;
	--azul-150: #D3E0EE;
	--azul-100: #D1D7DF;
	--azul-075: #E9EFF6;
	--azul-050: #E4E7EC;
	--azul-025: #F1F3F5;
	--blanco: #FFFFFF;
	--pie-texto: #C9D3DD;
	--pie-texto-tenue: #8FA1B3;

	--wrap: 1180px;
	--gutter: 24px;

	--sombra-tarjeta: 0 2px 14px rgba(16, 36, 63, .08);
	--sombra-hover: 0 8px 20px rgba(16, 36, 63, .09);
	--sombra-panel: 0 16px 28px rgba(16, 36, 63, .14);
	--sombra-modal: 0 24px 60px rgba(14, 31, 54, .35);
}

/* ══════════════════════════════════════════════════════════════
   TIPOGRAFÍA — cuatro combinaciones para decidir. Cada una define tres roles:
   --f-titulo  títulos, etiquetas y controles
   --f-texto   texto corrido
   --f-serif   piezas editoriales: títulos de noticia, etiquetas de mosaico, entradilla del hero
   La combinación se elige en el panel «Tipografía» o con ?tipo=a|b|c|d en la URL.
   ══════════════════════════════════════════════════════════════ */
html[data-tipo="a"] { /* A · Poppins: la actual, sin serif */
	--f-titulo: 'Poppins', sans-serif; --f-texto: 'Poppins', sans-serif; --f-serif: 'Poppins', sans-serif;
	--w-tit: 600; --w-hero: 800; --w-serif: 600; --it-hero: normal; --it-tile: normal; --fs-base: 17px;
}
html[data-tipo="b"] { /* B · Montserrat + Lora: la combinación de boston.gov */
	--f-titulo: 'Montserrat', sans-serif; --f-texto: 'Lora', Georgia, serif; --f-serif: 'Lora', Georgia, serif;
	--w-tit: 700; --w-hero: 800; --w-serif: 600; --it-hero: italic; --it-tile: italic; --fs-base: 17px;
}
html[data-tipo="c"] { /* C · Poppins + Lora: continuidad con lo aprobado, más voz editorial (recomendada) */
	--f-titulo: 'Poppins', sans-serif; --f-texto: 'Poppins', sans-serif; --f-serif: 'Lora', Georgia, serif;
	--w-tit: 700; --w-hero: 800; --w-serif: 600; --it-hero: italic; --it-tile: normal; --fs-base: 17px;
}
html[data-tipo="d"] { /* D · Source Serif 4 + Source Sans 3: sobria, de lectura larga y trámite legal */
	--f-titulo: 'Source Serif 4', Georgia, serif; --f-texto: 'Source Sans 3', sans-serif; --f-serif: 'Source Serif 4', Georgia, serif;
	--w-tit: 700; --w-hero: 700; --w-serif: 600; --it-hero: italic; --it-tile: normal; --fs-base: 18px;
}
html[data-caps="1"] { --caps: uppercase; }
html[data-caps="0"] { --caps: none; }

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--f-texto);
	font-weight: 400;
	font-size: var(--fs-base, 17px);
	line-height: 1.7;
	color: var(--azul-900);
	background: var(--blanco);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--azul-700); outline-offset: 2px; }
.civ-oscuro :focus-visible { outline-color: var(--blanco); }
.civ-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.civ-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.civ-salto { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--azul-900); color: var(--blanco); padding: 10px 16px; border-radius: 4px; }
.civ-salto:focus { top: 8px; }
svg { flex-shrink: 0; }

.civ-sec { padding: 72px 0; }

/* Título de sección: la firma del portal cívico -- título y regla gruesa de ancho completo */
.civ-tit {
	font-family: var(--f-titulo);
	font-weight: var(--w-tit);
	font-size: clamp(26px, 3.2vw, 34px);
	line-height: 1.15;
	letter-spacing: -.005em;
	text-transform: var(--caps);
	color: var(--azul-900);
	padding-bottom: 14px;
	margin-bottom: 36px;
	border-bottom: 6px solid var(--azul-900);
}
.civ-fechita {
	font-family: var(--f-titulo);
	font-weight: 600;
	font-size: 12px;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--azul-400);
}
.civ-enlace { font-family: var(--f-titulo); font-weight: 600; font-size: 14px; color: var(--azul-700); }
.civ-enlace:hover { color: var(--azul-900); text-decoration: underline; text-underline-offset: 4px; }
.civ-mas { margin: 40px 0 0; text-align: center; }
.civ-mas-izq { margin: 18px 0 0; text-align: left; }
.civ-btn {
	display: inline-block;
	background: var(--azul-700);
	color: var(--blanco);
	font-family: var(--f-titulo);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .04em;
	text-transform: var(--caps);
	padding: 15px 30px;
	border-radius: 3px;
	transition: background .15s ease;
}
.civ-btn:hover { background: var(--azul-600); }

/* ══════════════════════════════════════════════════════════════
   BANDA OFICIAL + HEADER
   ══════════════════════════════════════════════════════════════ */
.civ-oficial { background: var(--azul-950); color: var(--blanco); font-size: 13px; line-height: 1.4; }
.civ-oficial .civ-wrap { display: flex; justify-content: space-between; align-items: center; gap: 4px 24px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.civ-oficial-der { display: inline-flex; align-items: center; gap: 8px; color: var(--azul-150); }
.civ-oficial svg { width: 15px; height: 15px; }

.civ-header { position: sticky; top: 0; z-index: 100; background: var(--blanco); border-bottom: 1px solid var(--azul-100); }
.civ-header-barra { display: flex; align-items: stretch; min-height: 72px; }

.civ-menu-btn {
	flex: 0 0 76px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	background: var(--azul-700); color: var(--blanco);
	border: 0; cursor: pointer;
	font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 11px; line-height: 1; letter-spacing: .08em; text-transform: uppercase;
	transition: background .15s ease;
}
.civ-menu-btn:hover, .civ-menu-btn[aria-expanded="true"] { background: var(--azul-900); }
.civ-menu-btn-ico { position: relative; display: block; width: 26px; height: 26px; }
.civ-menu-btn-ico svg { position: absolute; inset: 0; width: 26px; height: 26px; }
.civ-ico-cerrar { display: none; }
[aria-expanded="true"] .civ-ico-abrir { display: none; }
[aria-expanded="true"] .civ-ico-cerrar { display: block; }

.civ-marca { display: flex; align-items: center; gap: 12px; padding: 8px 20px; flex-shrink: 0; }
.civ-marca img { height: 56px; width: auto; }
.civ-marca-txt { display: flex; flex-direction: column; line-height: 1.1; }
.civ-marca-txt b { font-family: var(--f-titulo); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; color: var(--azul-900); }
.civ-marca-txt small { margin-top: 3px; max-width: 170px; font-family: var(--f-titulo); font-weight: 500; font-size: 11.5px; line-height: 1.25; color: var(--azul-600); }

.civ-nav-sup { margin-left: auto; display: flex; align-items: center; gap: 26px; padding: 0 12px; }
.civ-nav-sup a {
	font-family: var(--f-titulo); font-weight: 600; font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
	color: var(--azul-900); padding: 6px 0; border-bottom: 2px solid transparent;
}
.civ-nav-sup a:hover { border-bottom-color: var(--azul-400); }

.civ-busca-btn {
	flex: 0 0 64px; display: flex; align-items: center; justify-content: center;
	background: none; border: 0; border-left: 1px solid var(--azul-100); color: var(--azul-700); cursor: pointer;
}
.civ-busca-btn:hover { background: var(--azul-025); }
.civ-busca-btn svg { width: 24px; height: 24px; }

.civ-busca { background: var(--azul-025); border-top: 1px solid var(--azul-100); padding: 18px 0; }
.civ-busca .civ-form-busca { box-shadow: none; border: 1.5px solid var(--azul-100); }

/* Menú completo (mega-menú) */
.civ-mega {
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--blanco); border-top: 4px solid var(--azul-900); box-shadow: var(--sombra-panel);
	max-height: calc(100vh - 120px); overflow: auto; padding: 32px 0 22px;
}
.civ-mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.civ-mega-col summary {
	list-style: none; cursor: default;
	font-family: var(--f-titulo); font-weight: 700; font-size: 13px; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase;
	color: var(--azul-700); padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid var(--azul-100);
}
.civ-mega-col summary::-webkit-details-marker { display: none; }
.civ-mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.civ-mega-col a { display: block; padding: 5px 0; font-family: var(--f-texto); font-size: 15px; line-height: 1.35; color: var(--azul-900); }
.civ-mega-col a:hover { color: var(--azul-600); text-decoration: underline; text-underline-offset: 3px; }
.civ-mega-pie { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--azul-100); font-size: 14px; color: var(--azul-700); }
.civ-mega-pie a { font-weight: 700; }
.civ-mega-pie svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Buscador (hero, header y sedes comparten forma) */
.civ-form-busca { display: flex; max-width: 780px; margin: 0 auto; background: var(--blanco); border-radius: 4px; }
.civ-form-busca input {
	flex: 1 1 auto; min-width: 0; height: 64px; padding: 0 22px; border: 0; background: transparent; border-radius: 4px 0 0 4px;
	font-family: var(--f-texto); font-size: 18px; color: var(--azul-900);
}
.civ-form-busca input::placeholder { color: var(--azul-400); opacity: 1; }
.civ-form-busca input:focus { outline: none; }
.civ-form-busca:focus-within { outline: 3px solid var(--azul-300); outline-offset: 3px; }
.civ-form-busca button {
	flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 28px;
	background: var(--azul-700); color: var(--blanco); border: 0; border-radius: 0 4px 4px 0; cursor: pointer;
	font-family: var(--f-titulo); font-weight: 700; font-size: 16px;
	transition: background .15s ease;
}
.civ-form-busca button:hover { background: var(--azul-600); }
.civ-form-busca button svg { width: 20px; height: 20px; }

/* ══════════════════════════════════════════════════════════════
   1. HERO
   ══════════════════════════════════════════════════════════════ */
.civ-hero { position: relative; padding: 76px 0 64px; text-align: center; color: var(--blanco); background: var(--azul-950) center / cover no-repeat; }
.civ-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 31, 54, .84) 0%, rgba(14, 31, 54, .66) 100%); }
.civ-hero .civ-wrap { position: relative; }
.civ-hero h1 { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.civ-hero-pre { font-family: var(--f-serif); font-style: var(--it-hero); font-weight: 400; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.2; color: var(--azul-150); }
.civ-hero-nombre {
	font-family: var(--f-titulo); font-weight: var(--w-hero); font-size: clamp(38px, 7.4vw, 80px); line-height: 1.02; letter-spacing: -.015em;
	text-transform: var(--caps); text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}
.civ-hero-lema { margin: 18px auto 34px; max-width: 60ch; font-size: clamp(16px, 1.9vw, 19px); color: var(--azul-150); text-align: center; }
.civ-form-hero { box-shadow: var(--sombra-modal); }
.civ-populares { margin: 24px auto 0; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; font-size: 14px; text-align: center; }
.civ-populares span { margin-right: 4px; font-weight: 600; color: var(--azul-150); }
.civ-populares a {
	padding: 7px 16px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 30px; color: var(--blanco); font-weight: 500;
	transition: background .15s ease, border-color .15s ease;
}
.civ-populares a:hover { background: rgba(255, 255, 255, .14); border-color: var(--blanco); }

/* ══════════════════════════════════════════════════════════════
   2. FRANJA DE ATENCIÓN
   ══════════════════════════════════════════════════════════════ */
.civ-atencion { padding: 56px 0 64px; }
.civ-fecha {
	display: flex; align-items: center; gap: 24px; text-align: center;
	font-family: var(--f-titulo); font-weight: var(--w-tit); font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; text-transform: var(--caps); color: var(--azul-900);
}
.civ-fecha::before, .civ-fecha::after { content: ""; flex: 1; height: 6px; background: var(--azul-900); }
.civ-atencion-sub { margin: 10px 0 40px; text-align: center; font-size: 14px; letter-spacing: .04em; color: var(--azul-600); }
.civ-atencion-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.civ-atencion-lista li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.civ-atencion-ico {
	width: 76px; height: 76px; margin-bottom: 16px; display: grid; place-items: center;
	border: 2px solid var(--azul-900); border-radius: 50%; color: var(--azul-900);
	transition: background .15s ease, color .15s ease;
}
.civ-atencion-ico svg { width: 34px; height: 34px; }
.civ-atencion-ico:hover { background: var(--azul-900); color: var(--blanco); }
.civ-atencion-tit {
	font-family: var(--f-titulo); font-weight: 700; font-size: 14px; line-height: 1.25; letter-spacing: .05em; text-transform: uppercase;
	color: var(--azul-700); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.civ-atencion-tit:hover { color: var(--azul-900); }
.civ-atencion-lista p { margin: 10px 0 0; font-family: var(--f-serif); font-size: 15px; line-height: 1.5; color: var(--azul-700); }

/* ══════════════════════════════════════════════════════════════
   3. SERVICIOS Y TRÁMITES (mosaico)
   ══════════════════════════════════════════════════════════════ */
.civ-recursos { background: var(--azul-075); }
.civ-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.civ-tile {
	display: flex; flex-direction: column; align-items: center; gap: 20px; height: 100%; min-height: 220px;
	padding: 36px 22px 28px; background: var(--blanco); border-radius: 4px; text-align: center; box-shadow: var(--sombra-tarjeta);
	transition: box-shadow .15s ease, transform .15s ease;
}
.civ-tile:hover { box-shadow: var(--sombra-hover); transform: translateY(-3px); }
.civ-tile-ico { width: 60px; height: 60px; color: var(--azul-900); }
.civ-tile-txt { font-family: var(--f-serif); font-style: var(--it-tile); font-weight: var(--w-serif); font-size: 19px; line-height: 1.3; color: var(--azul-700); }
.civ-tile:hover .civ-tile-txt { text-decoration: underline; text-underline-offset: 4px; }

/* ══════════════════════════════════════════════════════════════
   4. CUATRO CAMINOS
   ══════════════════════════════════════════════════════════════ */
.civ-caminos { display: grid; grid-template-columns: repeat(4, 1fr); }
.civ-camino { display: flex; flex-direction: column; min-height: 340px; padding: 56px 32px 40px; color: var(--blanco); }
.civ-c1 { background: var(--azul-700); }
.civ-c2 { background: var(--azul-900); }
.civ-c3 { background: var(--azul-600); }
.civ-c4 { background: var(--azul-800); }
.civ-camino-ico { width: 68px; height: 68px; margin-bottom: 28px; display: grid; place-items: center; border: 2px solid var(--azul-150); border-radius: 50%; }
.civ-camino-ico svg { width: 30px; height: 30px; }
.civ-camino-etq { font-family: var(--f-serif); font-style: var(--it-hero); font-weight: 500; font-size: 17px; color: var(--azul-150); }
.civ-camino-tit {
	margin-top: 6px; font-family: var(--f-titulo); font-weight: var(--w-tit); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; text-transform: var(--caps);
}
.civ-camino-flecha { margin-top: auto; padding-top: 24px; }
.civ-camino-flecha svg { width: 28px; height: 28px; transition: transform .2s ease; }
.civ-camino:hover .civ-camino-tit { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.civ-camino:hover .civ-camino-flecha svg { transform: translateX(6px); }

/* ══════════════════════════════════════════════════════════════
   5. ENCUENTRA TU SEDE
   ══════════════════════════════════════════════════════════════ */
.civ-sedes-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.civ-lead { margin: 0 0 22px; font-size: 17px; color: var(--azul-700); text-align: left; }
.civ-campo { position: relative; }
.civ-campo svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--azul-400); pointer-events: none; }
.civ-campo input {
	width: 100%; height: 54px; padding: 0 16px 0 46px; background: var(--blanco); border: 1.5px solid var(--azul-100); border-radius: 4px;
	font-family: var(--f-texto); font-size: 16px; color: var(--azul-900);
}
.civ-campo input::placeholder { color: var(--azul-400); opacity: 1; }
.civ-campo input:focus { outline: none; border-color: var(--azul-400); box-shadow: 0 0 0 3px var(--azul-150); }
.civ-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.civ-chip {
	padding: 7px 14px; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 30px; cursor: pointer;
	font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 14px; color: var(--azul-600);
}
.civ-chip:hover { border-color: var(--azul-400); color: var(--azul-700); }
.civ-chip.is-on { background: var(--azul-700); border-color: var(--azul-700); color: var(--blanco); }

.civ-sedes-res { min-height: 150px; margin-bottom: 20px; }
.civ-sedes-vacio {
	display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 24px;
	background: var(--azul-025); border: 1px dashed var(--azul-100); border-radius: 4px; font-size: 16px; color: var(--azul-700);
}
.civ-sedes-vacio svg { width: 26px; height: 26px; color: var(--azul-400); margin-top: 2px; }
.civ-res-cab { margin: 0 0 12px; font-family: var(--f-titulo); font-weight: 700; font-size: 15px; color: var(--azul-600); }
.civ-res-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 430px; overflow: auto; padding-right: 2px; }
.civ-res-item { padding: 14px 16px; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px; }
.civ-res-tag { font-family: var(--f-titulo); font-weight: 600; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--azul-400); }
.civ-res-item h3 { margin: 4px 0; font-family: var(--f-titulo); font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--azul-900); }
.civ-res-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--azul-700); }
.civ-res-item p + p { margin-top: 6px; }
.civ-res-item a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.civ-llamar { display: flex; flex-direction: column; gap: 4px; padding: 26px 28px; background: var(--azul-900); color: var(--blanco); border-radius: 4px; }
.civ-llamar-etq { font-family: var(--f-serif); font-style: var(--it-hero); font-size: 18px; color: var(--azul-150); }
.civ-llamar-num { font-family: var(--f-titulo); font-weight: 800; font-size: clamp(40px, 5vw, 56px); line-height: 1; letter-spacing: -.01em; color: var(--blanco); }
.civ-llamar-num:hover { text-decoration: underline; text-underline-offset: 6px; }
.civ-llamar-sub { font-size: 14px; color: var(--azul-150); }

/* ══════════════════════════════════════════════════════════════
   6. ÚLTIMAS NOTICIAS
   ══════════════════════════════════════════════════════════════ */
.civ-noticias { background: var(--azul-025); }
.civ-noticias-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.civ-nota { display: flex; flex-direction: column; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px; overflow: hidden; }
.civ-nota-foto { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--azul-100); }
.civ-nota-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.civ-nota:hover .civ-nota-foto img { transform: scale(1.04); }
.civ-nota-txt { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 22px; }
.civ-nota h3 { font-family: var(--f-serif); font-weight: var(--w-serif); font-size: 18px; line-height: 1.35; color: var(--azul-700); }
.civ-nota h3 a:hover { color: var(--azul-900); text-decoration: underline; text-underline-offset: 4px; }
.civ-nota-dest { grid-column: span 2; grid-row: span 2; }
.civ-nota-dest .civ-nota-foto { aspect-ratio: 4 / 3; }
.civ-nota-dest .civ-nota-txt { padding: 24px 28px 28px; gap: 12px; }
.civ-nota-dest h3 { font-size: 27px; line-height: 1.25; }
.civ-nota-dest p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--azul-900); text-align: justify; hyphens: auto; }

/* ══════════════════════════════════════════════════════════════
   7. VIDEOS
   ══════════════════════════════════════════════════════════════ */
.civ-videos { background: var(--azul-075); }
.civ-videos-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.civ-video { display: flex; flex-direction: column; height: 100%; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px; overflow: hidden; transition: box-shadow .15s ease, border-color .15s ease; }
.civ-video:hover { border-color: var(--azul-400); box-shadow: var(--sombra-hover); }
.civ-video-foto { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--azul-950); overflow: hidden; }
.civ-video-foto img { width: 100%; height: 100%; object-fit: cover; }
.civ-play {
	position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center;
	background: var(--azul-700); color: var(--blanco); border-radius: 50%; box-shadow: 0 6px 18px rgba(14, 31, 54, .45); transition: transform .15s ease, background .15s ease;
}
.civ-play svg { width: 26px; height: 26px; margin-left: 3px; }
.civ-video:hover .civ-play { transform: scale(1.08); background: var(--azul-600); }
.civ-video-txt { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 22px; }
.civ-video-tit { font-family: var(--f-serif); font-weight: var(--w-serif); font-size: 19px; line-height: 1.3; color: var(--azul-700); }
.civ-video-desc { font-size: 14.5px; line-height: 1.5; color: var(--azul-900); }
.civ-video-ver { margin-top: auto; padding-top: 4px; font-family: var(--f-titulo); font-weight: 600; font-size: 13px; color: var(--azul-700); }

/* ══════════════════════════════════════════════════════════════
   8. CONVOCATORIA + REDES
   ══════════════════════════════════════════════════════════════ */
.civ-agenda-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; }
.civ-conv { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px; overflow: hidden; }
.civ-conv-foto { position: relative; min-height: 270px; background: var(--azul-100); }
.civ-conv-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.civ-cinta {
	position: absolute; top: 0; right: 16px; padding: 12px 14px 24px; text-align: center;
	background: var(--azul-700); color: var(--blanco); font-family: var(--f-titulo); font-weight: 800; font-size: 20px; line-height: 1.1;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
}
.civ-cinta small { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--azul-150); }
.civ-conv-txt { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 26px; }
.civ-conv h3 { font-family: var(--f-serif); font-weight: var(--w-serif); font-size: 21px; line-height: 1.3; color: var(--azul-700); }
.civ-conv p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--azul-900); }
.civ-conecta { padding: 28px; background: var(--azul-075); border-radius: 4px; }
.civ-conecta p { margin: 0 0 18px; font-family: var(--f-serif); font-size: 18px; line-height: 1.55; color: var(--azul-700); }
.civ-conecta .civ-conecta-mail { margin: 18px 0 0; font-family: var(--f-texto); font-size: 15px; }
.civ-conecta-mail a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.civ-redes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.civ-redes a {
	display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px;
	font-family: var(--f-titulo); font-weight: 600; font-size: 14px; color: var(--azul-700);
	transition: border-color .15s ease, background .15s ease;
}
.civ-redes a:hover { border-color: var(--azul-400); background: var(--azul-025); }
.civ-redes svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════════════════════════════
   9. AUTORIDADES
   ══════════════════════════════════════════════════════════════ */
.civ-autoridades { background: var(--azul-025); }
.civ-aut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.civ-aut { display: grid; grid-template-columns: 200px 1fr; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 4px; overflow: hidden; }
.civ-aut img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: top center; }
.civ-aut-txt { display: flex; flex-direction: column; gap: 8px; padding: 26px 28px; }
.civ-aut h3 { font-family: var(--f-serif); font-weight: var(--w-serif); font-size: 22px; line-height: 1.25; color: var(--azul-900); }
.civ-aut p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--azul-700); }
.civ-aut-consejo { grid-template-columns: 130px 1fr; }
.civ-aut-ico { display: grid; place-items: center; background: var(--azul-700); color: var(--blanco); }
.civ-aut-ico svg { width: 56px; height: 56px; }

/* ══════════════════════════════════════════════════════════════
   10. INSTITUCIONES DEL SECTOR JUSTICIA
   ══════════════════════════════════════════════════════════════ */
.civ-instituciones { padding: 56px 0; }
.civ-inst-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.civ-inst-lista li { display: flex; }
.civ-inst-lista a {
	display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; padding: 20px 12px;
	border: 1px solid var(--azul-100); border-radius: 4px; transition: border-color .15s ease, box-shadow .15s ease;
}
.civ-inst-lista a:hover { border-color: var(--azul-400); box-shadow: var(--sombra-hover); }
.civ-inst-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; }
.civ-inst-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.civ-inst-nombre { font-family: var(--f-titulo); font-weight: 500; font-size: 13px; line-height: 1.3; text-align: center; color: var(--azul-700); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.civ-footer { padding: 56px 0 24px; background: var(--azul-950); color: var(--pie-texto); }
.civ-footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 40px; }
.civ-footer h2 { margin: 0 0 16px; font-family: var(--f-titulo); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--azul-300); }
.civ-footer p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--pie-texto); text-align: left; }
.civ-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.civ-footer li { font-size: 14.5px; line-height: 1.45; color: var(--pie-texto); }
.civ-footer a:hover { color: var(--blanco); text-decoration: underline; text-underline-offset: 3px; }
.civ-footer li svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.civ-footer .civ-redes-pie { flex-direction: row; gap: 14px; margin-top: 4px; }
.civ-redes-pie a { display: block; padding: 0; border: 0; background: none; color: var(--pie-texto); }
.civ-redes-pie svg { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.civ-footer-pie { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--azul-800); font-size: 13px; color: var(--pie-texto-tenue); }

/* ══════════════════════════════════════════════════════════════
   PANEL DE LA PROPUESTA + VOLVER ARRIBA
   ══════════════════════════════════════════════════════════════ */
.civ-panel { position: fixed; left: 16px; bottom: 16px; z-index: 150; font-family: 'Poppins', sans-serif; }
.civ-panel-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 30px; cursor: pointer;
	background: var(--azul-900); color: var(--blanco); font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; box-shadow: var(--sombra-panel);
}
.civ-panel-btn span { font-family: 'Lora', Georgia, serif; font-style: italic; font-weight: 600; font-size: 16px; }
.civ-panel-btn:hover { background: var(--azul-700); }
.civ-panel-cuerpo { position: absolute; left: 0; bottom: calc(100% + 10px); width: 330px; padding: 18px 18px 14px; background: var(--blanco); border: 1px solid var(--azul-100); border-radius: 6px; box-shadow: var(--sombra-modal); }
.civ-panel-tit { margin: 0 0 10px; font-weight: 700; font-size: 14px; color: var(--azul-900); }
.civ-panel fieldset { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; }
.civ-panel label { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--azul-900); cursor: pointer; }
.civ-panel label em { font-style: normal; font-size: 12px; color: var(--azul-400); }
.civ-panel input { accent-color: var(--azul-700); }
.civ-panel-caps { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--azul-100); }
.civ-panel-iconos { margin: 10px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--azul-100); display: flex; flex-direction: column; gap: 4px; }
.civ-panel-sub { float: left; width: 100%; margin: 0 0 6px; padding: 0; font-weight: 700; font-size: 13px; color: var(--azul-900); }
.civ-panel-nota { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--azul-600); }
.civ-panel-nota code { font-size: 12px; }
.civ-arriba {
	position: fixed; right: 16px; bottom: 16px; z-index: 140; width: 58px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px;
	background: var(--azul-700); color: var(--blanco); border: 0; border-radius: 4px; cursor: pointer; box-shadow: var(--sombra-panel);
	font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.civ-arriba svg { width: 20px; height: 20px; transform: rotate(180deg); }
.civ-arriba:hover { background: var(--azul-900); }

/* ══════════════════════════════════════════════════════════════
   PICTOGRAMAS — iconografía ilustrada bicolor (inc/pictogramas.php), junto a los iconos lineales del sistema.
   Tres capas por dibujo: trazo (currentColor), relleno tenue (--ic-f) y acento (--ic-a); --ic-w es el «papel».
   Sobre fondos oscuros las tres capas cambian a versiones translúcidas y azul-300.
   html[data-iconos="a"] vuelve a los iconos lineales; "b" (por defecto) muestra los pictogramas.
   ══════════════════════════════════════════════════════════════ */
:root { --ic-f: var(--azul-150); --ic-a: var(--azul-400); --ic-w: var(--blanco); }
.civ-camino, .civ-aut-ico, .civ-atencion-ico:hover { --ic-f: rgba(255, 255, 255, .16); --ic-a: var(--azul-300); --ic-w: rgba(255, 255, 255, .07); }
.civ-pic { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.civ-pic .f { fill: var(--ic-f); }
.civ-pic .a { fill: var(--ic-a); }
.civ-pic .w { fill: var(--ic-w); }
.civ-pic .sw { stroke: #FFFFFF; }
.civ-pic .ac { stroke: var(--ic-a); stroke-width: 1.8; }
html[data-iconos="a"] .civ-pic { display: none; }
html[data-iconos="b"] .civ-lin { display: none; }
html[data-iconos="a"] .civ-lin { display: block; }
.civ-tile:hover .civ-pic, .civ-camino:hover .civ-pic { transform: translateY(-3px); }

/* medallón de la franja de atención: con pictograma crece para darle aire al dibujo */
html[data-iconos="b"] .civ-atencion-ico { width: 104px; height: 104px; background: var(--azul-025); }
html[data-iconos="b"] .civ-atencion-ico:hover { background: var(--azul-900); }
html[data-iconos="b"] .civ-atencion-ico .civ-pic { width: 64px; height: 64px; }
/* mosaico de servicios */
.civ-tile-ico { display: block; }
.civ-tile-ico svg { width: 100%; height: 100%; }
html[data-iconos="b"] .civ-tile-ico { width: 92px; height: 92px; margin-top: -6px; }
/* cuatro caminos: el pictograma va sin círculo */
html[data-iconos="b"] .civ-camino-ico { width: 88px; height: 88px; margin-bottom: 20px; border: 0; border-radius: 0; }
html[data-iconos="b"] .civ-camino-ico .civ-pic { width: 88px; height: 88px; }
/* Consejo y ficha vacía de sedes */
html[data-iconos="b"] .civ-aut-ico .civ-pic { width: 88px; height: 88px; }
.civ-vacio-ico { flex-shrink: 0; width: 26px; height: 26px; }
.civ-vacio-ico svg { width: 100%; height: 100%; margin: 0; }
html[data-iconos="b"] .civ-vacio-ico { width: 56px; height: 56px; color: var(--azul-900); }

/* ══════════════════════════════════════════════════════════════
   PÁGINAS INTERIORES (mínimo: solo la portada es parte de la propuesta)
   ══════════════════════════════════════════════════════════════ */
.civ-interior { padding: 56px 0 88px; min-height: 50vh; background: var(--azul-075); }
.civ-tit-pagina { margin-bottom: 28px; font-size: clamp(28px, 4vw, 38px); }
.civ-cuerpo { max-width: 70ch; font-size: 17px; line-height: 1.75; color: var(--azul-700); }
.civ-cuerpo p { text-align: justify; hyphens: auto; }
.civ-listado { list-style: none; margin: 0; padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: 24px; }
.civ-listado li { padding-bottom: 24px; border-bottom: 1px solid var(--azul-100); }
.civ-listado h2 { margin-bottom: 8px; font-family: var(--f-serif); font-weight: var(--w-serif); font-size: 21px; color: var(--azul-700); }
.civ-listado p { margin: 0; color: var(--azul-900); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — mismos quiebres que el sistema de diseño (560 / 900 / 1200), más uno propio en 1000 para la franja de atención
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
	.civ-mega-grid { grid-template-columns: repeat(3, 1fr); }
	.civ-inst-lista { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
	.civ-nav-sup { display: none; }
	.civ-busca-btn { margin-left: auto; }
	.civ-atencion-lista { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
	.civ-caminos { grid-template-columns: repeat(2, 1fr); }
	.civ-camino { min-height: 280px; }
	.civ-videos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
	.civ-sec { padding: 56px 0; }
	.civ-oficial-der { display: none; }
	.civ-mega-grid { grid-template-columns: 1fr; gap: 0; }
	.civ-mega-col { border-bottom: 1px solid var(--azul-100); }
	.civ-mega-col summary { cursor: pointer; margin: 0; padding: 14px 0; border: 0; display: flex; justify-content: space-between; align-items: center; }
	.civ-mega-col summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px; }
	.civ-mega-col[open] summary::after { transform: rotate(-135deg); }
	.civ-mega-col ul { padding-bottom: 12px; }
	.civ-tiles { grid-template-columns: repeat(2, 1fr); }
	.civ-sedes-grid, .civ-agenda-grid, .civ-aut-grid { grid-template-columns: 1fr; gap: 32px; }
	.civ-noticias-grid { grid-template-columns: repeat(2, 1fr); }
	.civ-nota-dest .civ-nota-txt { padding: 20px 22px 24px; }
	.civ-nota-dest h3 { font-size: 23px; }
	.civ-footer-grid { grid-template-columns: 1fr 1fr; }
	.civ-hero { padding: 56px 0 48px; }
}
@media (max-width: 560px) {
	:root { --gutter: 16px; }
	.civ-menu-btn { flex-basis: 64px; }
	.civ-marca { padding: 8px 12px; gap: 10px; }
	.civ-marca img { height: 46px; }
	.civ-marca-txt b { font-size: 26px; }
	.civ-marca-txt small { display: none; }
	.civ-header-barra { min-height: 64px; }
	.civ-form-busca { flex-direction: column; }
	.civ-form-busca input { height: 56px; border-radius: 4px 4px 0 0; }
	.civ-form-busca button { justify-content: center; height: 52px; border-radius: 0 0 4px 4px; }
	.civ-fecha::before, .civ-fecha::after { height: 4px; gap: 0; }
	.civ-fecha { gap: 14px; }
	.civ-atencion-lista { grid-template-columns: 1fr; gap: 22px; }
	.civ-atencion-lista li { display: grid; grid-template-columns: 60px 1fr; column-gap: 16px; align-items: start; justify-items: start; text-align: left; }
	.civ-atencion-ico { grid-row: 1 / span 2; width: 60px; height: 60px; margin: 0; }
	.civ-atencion-ico svg { width: 28px; height: 28px; }
	html[data-iconos="b"] .civ-atencion-lista li { grid-template-columns: 76px 1fr; }
	html[data-iconos="b"] .civ-atencion-ico { width: 76px; height: 76px; }
	html[data-iconos="b"] .civ-atencion-ico .civ-pic { width: 48px; height: 48px; }
	.civ-atencion-tit { grid-column: 2; margin-top: 2px; }
	.civ-atencion-lista p { grid-column: 2; margin: 6px 0 0; text-align: left; }
	.civ-tile { min-height: 180px; padding: 26px 14px 22px; }
	.civ-tile-ico { width: 48px; height: 48px; }
	html[data-iconos="b"] .civ-tile-ico { width: 68px; height: 68px; }
	.civ-tile-txt { font-size: 16px; }
	.civ-caminos { grid-template-columns: 1fr; }
	.civ-camino { min-height: 220px; padding: 36px 24px 28px; }
	html[data-iconos="b"] .civ-camino-ico, html[data-iconos="b"] .civ-camino-ico .civ-pic { width: 72px; height: 72px; }
	.civ-res-lista { grid-template-columns: 1fr; }
	.civ-noticias-grid { grid-template-columns: 1fr; }
	.civ-nota-dest { grid-column: auto; grid-row: auto; }
	.civ-videos-grid { grid-template-columns: 1fr; }
	.civ-conv { grid-template-columns: 1fr; }
	.civ-conv-foto { min-height: 210px; }
	.civ-aut, .civ-aut-consejo { grid-template-columns: 1fr; }
	.civ-aut img { height: 320px; min-height: 0; }
	.civ-aut-ico { padding: 24px; }
	.civ-inst-lista { grid-template-columns: repeat(2, 1fr); }
	.civ-footer-grid { grid-template-columns: 1fr; gap: 28px; }
	.civ-panel-cuerpo { width: min(330px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
