/* ==========================================================================
   Fernando Orihuela — Junín 2026
   Estilos de páginas internas SEO. Complementa styles.css y REUTILIZA sus
   clases (.section, .section__title, .eyebrow, .btn, .doc-card, etc.) y sus
   tokens :root. No modifica el landing.
   ========================================================================== */

/* ---------- Hero de página (degradado de campaña, igual que .hero) ---------- */
.page-hero {
  background: var(--gradiente-header);
  color: var(--blanco);
  position: relative;
  overflow: hidden;
  padding-block: 28px 56px;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--rojo);
}
.page-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  align-items: center;
}
.page-hero--media .page-hero__inner { grid-template-columns: 1fr; }
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: .7rem;
  color: var(--dorado);
  margin: 0 0 12px;
}
.page-hero__eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--dorado);
  flex-shrink: 0;
}
.page-hero__title {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 .3em;
  color: var(--blanco);
}
.page-hero__lead {
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .88);
  max-width: 60ch;
  margin: 0;
}
.page-hero__media img {
  border-radius: var(--radio);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  border: 3px solid rgba(255, 255, 255, .15);
}
@media (min-width: 860px) {
  .page-hero--media .page-hero__inner { grid-template-columns: 1.4fr .9fr; }
  .page-hero { padding-block: 44px 72px; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { margin-bottom: 16px; }
.breadcrumbs__list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0; padding: 0; font-size: .82rem;
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs__sep { opacity: .6; }
/* sobre el degradado del hero */
.page-hero .breadcrumbs__list { color: rgba(255, 255, 255, .7); }
.page-hero .breadcrumbs__item a { color: #fff; text-decoration: none; }
.page-hero .breadcrumbs__item a:hover { text-decoration: underline; }
.page-hero .breadcrumbs__item [aria-current="page"] { color: rgba(255, 255, 255, .7); }
/* versión clara (si se usa fuera del hero) */
.breadcrumbs--light .breadcrumbs__list { color: #5a6b80; }
.breadcrumbs--light .breadcrumbs__item a { color: var(--azul-cobalto); text-decoration: none; }

/* ---------- Cuerpo de contenido ---------- */
.page-body { padding-block: 56px; }
.page-body .container { max-width: var(--max-width); }
.measure { max-width: 72ch; margin-inline: auto; }

.prose { color: #2c3949; font-size: 1.02rem; }
.prose > h2 {
  font-family: var(--fuente-titulo);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--azul-cobalto);
  margin: 1.8em 0 .5em;
  scroll-margin-top: 90px;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.16rem; color: var(--tinta); margin: 1.5em 0 .4em; }
.prose p { margin: 0 0 1.1em; line-height: 1.65; }
.prose > ul { margin: 0 0 1.3em; padding: 0; }
.prose > ul > li {
  position: relative; padding-left: 1.6em; margin-bottom: .6em; line-height: 1.6;
}
.prose > ul > li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: .55em; height: .55em; border-radius: 2px;
  background: var(--dorado); transform: rotate(45deg);
}
.prose a { color: var(--azul-cobalto); font-weight: 600; }

/* ---------- Lista de datos (formación, trayectoria, obras verificadas) ---------- */
.factlist { display: grid; gap: 10px; margin: 1.3em 0; padding: 0; }
.factlist__item {
  list-style: none;
  padding: 14px 18px;
  background: var(--blanco);
  border: 1px solid #e1e8f1;
  border-left: 4px solid var(--dorado);
  border-radius: 0 var(--radio-sm) var(--radio-sm) 0;
  font-size: .96rem;
  box-shadow: var(--sombra-sm);
}

/* ---------- Grilla de tarjetas (temas / provincias / obras) ---------- */
.cards {
  display: grid; gap: 18px; margin: 1.5em 0 0;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.topic-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  background: var(--fondo);
  border: 1px solid #dfe6f0;
  border-radius: var(--radio);
  text-decoration: none; color: var(--tinta);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: var(--dorado);
}
.topic-card { overflow: hidden; }
.obra-card__thumb {
  position: relative; display: block;
  width: calc(100% + 48px); margin: -24px -24px 10px; height: 150px;
}
.obra-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.obra-card__tag {
  position: absolute; left: 10px; bottom: 10px;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(18, 35, 58, .78); color: #fff;
}
.obra-placeholder-img {
  width: 100%; border-radius: var(--radio); box-shadow: var(--sombra-sm);
  margin: 1em 0 .6em;
}
.topic-card__icon {
  width: 40px; height: 40px; color: var(--azul-cobalto);
  background: #e7eefb; border-radius: 12px; padding: 8px;
}
.topic-card__title {
  font-family: var(--fuente-titulo); font-weight: 600;
  font-size: 1.15rem; color: var(--azul-cobalto);
}
.topic-card__desc { font-size: .92rem; color: #4a5a6e; line-height: 1.5; }
.topic-card__more {
  margin-top: auto; font-size: .82rem; font-weight: 700; color: var(--dorado);
  text-transform: uppercase; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.topic-card__more .icon { width: 16px; height: 16px; }

.obra-badge {
  align-self: flex-start;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
}
.obra-badge--ok { background: #e3f4e8; color: #1b7f3a; }
.obra-badge--wip { background: #fdeede; color: #a4681a; }

/* ==========================================================================
   Mapa interactivo de obras (por provincia)
   ========================================================================== */
.obras-map {
  --c-salud: #E31E2B; --c-educacion: var(--azul-cobalto);
  --c-infraestructura: var(--dorado); --c-saneamiento: #1E88C7;
  background: var(--blanco); border: 1px solid #e2e8f1; border-radius: var(--radio);
  box-shadow: var(--sombra-sm); padding: 22px; margin: 1.5em 0;
}
.obras-map__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.obras-map__filters button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid #dbe3ee;
  background: #f4f7fb; color: #33445c; font-weight: 700; font-size: .86rem; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.obras-map__filters button .icon { width: 15px; height: 15px; }
.obras-map__filters button:hover { border-color: var(--azul-cobalto); }
.obras-map__filters button.is-active { background: var(--azul-cobalto); color: #fff; border-color: var(--azul-cobalto); }

.obras-map__grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .obras-map__grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }

.obras-map__map { position: relative; }
.obras-map__map svg { width: 100%; height: auto; max-height: 420px; display: block; overflow: visible; }
.obras-map .prov { cursor: pointer; }
.obras-map .prov > path {
  fill: #dbe7f6; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round;
  transition: fill .15s ease;
}
.obras-map .prov__hit { fill: transparent; pointer-events: fill; }
.obras-map .prov:hover > path { fill: #b9d2f0; }
.obras-map .prov.is-selected > path { fill: var(--azul-cobalto); }
.obras-map .prov.is-empty > path { fill: #eef1f5; }
.obras-map .prov.is-empty { cursor: default; }
.obras-map .prov__name { font: 700 24px/1 var(--fuente); fill: var(--tinta); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.obras-map .prov.is-selected .prov__name { fill: #fff; stroke: var(--azul-cobalto); }
.obras-map .prov__badge { fill: #fff; stroke: var(--dorado); stroke-width: 3; }
.obras-map .prov__count { font: 800 22px/1 var(--fuente); fill: var(--tinta); }
.obras-map .prov.is-selected .prov__badge { fill: var(--dorado); stroke: #fff; }
.obras-map .prov,
.obras-map .prov:focus,
.obras-map .prov:focus-visible,
.obras-map .prov *:focus { outline: none !important; }
/* indicador solo para foco por teclado: borde punteado en el trazo, sin caja */
.obras-map .prov:focus-visible > path { stroke: var(--dorado); stroke-width: 4; stroke-dasharray: 6 5; }

/* chips: navegador de provincias siempre accesible (clave en móvil) */
.obras-map__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; justify-content: center; }
.obras-map__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid #dbe3ee;
  background: #f4f7fb; color: #33445c; font-weight: 700; font-size: .8rem; cursor: pointer;
}
.obras-map__chip-count {
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--dorado); color: var(--tinta); font-size: .72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.obras-map__chip.is-selected { background: var(--azul-cobalto); color: #fff; border-color: var(--azul-cobalto); }
.obras-map__chip.is-selected .obras-map__chip-count { background: #fff; }
.obras-map__chip.is-empty { opacity: .5; }

.obras-map__panel {
  background: var(--fondo); border: 1px solid #e2e8f1; border-radius: var(--radio);
  padding: 18px; max-height: 560px; display: flex; flex-direction: column;
  scroll-margin-top: 80px;
}
.obras-map__panel-head { position: relative; }
.obras-map__panel-kicker { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #94a1b3; margin: 0; }
.obras-map__panel-title { font-family: var(--fuente-titulo); font-size: 1.4rem; color: var(--azul-cobalto); margin: 2px 0 8px; }
.obras-map__reset {
  background: none; border: none; padding: 0 0 8px; cursor: pointer;
  color: var(--azul-cobalto); font-weight: 700; font-size: .84rem;
}
.obras-map__search { display: block; margin-bottom: 12px; }
.obras-map__search input {
  width: 100%; padding: 10px 14px; border-radius: 999px; border: 1px solid #d7dfea;
  background: var(--blanco); font: inherit; font-size: .9rem;
}
.obras-map__search input:focus-visible { outline: 3px solid var(--dorado); outline-offset: 1px; }
.obras-map__list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.obras-map__item[hidden] { display: none; }
.obras-map__item.is-other { opacity: .72; }
.obras-map__divider {
  order: 1; margin: 6px 0 0; padding-top: 10px; border-top: 1px dashed #cdd6e2;
  font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #94a1b3;
}
.obras-map__item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--radio-sm); background: var(--blanco);
  border: 1px solid #e6ecf4; text-decoration: none; color: var(--tinta);
  transition: transform .12s ease, box-shadow .12s ease;
}
.obras-map__item:hover { transform: translateY(-1px); box-shadow: var(--sombra-sm); }
.obras-map__item img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; background: #eef1f5; }
.obras-map__item-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.obras-map__tag {
  align-self: flex-start; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; color: #fff;
}
.obras-map__tag.t-salud { background: var(--c-salud); }
.obras-map__tag.t-educacion { background: var(--c-educacion); }
.obras-map__tag.t-infraestructura { background: var(--c-infraestructura); color: var(--tinta); }
.obras-map__tag.t-saneamiento { background: var(--c-saneamiento); }
.obras-map__item-name { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.obras-map__item-prov { font-size: .78rem; color: #7a8698; }
.obras-map__item-go { font-size: .78rem; font-weight: 700; color: var(--azul-cobalto); white-space: nowrap; }
.obras-map__empty { font-size: .9rem; color: #7a8698; padding: 8px 4px; }

.obras-map__legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #e2e8f1; font-size: .8rem; color: #566476; }
.obras-map__legend li { display: inline-flex; align-items: center; gap: 7px; }
.obras-map__legend .dot { width: 11px; height: 11px; border-radius: 50%; }
.obras-map__legend .dot.t-salud { background: var(--c-salud); }
.obras-map__legend .dot.t-educacion { background: var(--c-educacion); }
.obras-map__legend .dot.t-infraestructura { background: var(--c-infraestructura); }
.obras-map__legend .dot.t-saneamiento { background: var(--c-saneamiento); }

/* ---------- Placeholder para el administrador (discreto, visible en el CMS) ---------- */
.placeholder {
  display: block; margin: 1.2em 0; padding: 10px 14px;
  border-left: 3px solid #cdd6e2; border-radius: 0 6px 6px 0;
  background: #f4f6f9; color: #6b7a90; font-size: .86rem; font-style: italic;
}
.placeholder::before { content: "Pendiente — "; font-style: normal; font-weight: 700; color: #94a1b3; }

.fuente-pendiente { font-size: .88rem; color: #6b7a90; }

.blog-cover {
  width: 100%; border-radius: var(--radio); box-shadow: var(--sombra-sm);
  margin-bottom: 1.5em; aspect-ratio: 16 / 9; object-fit: cover;
}

/* ---------- Galería / comparador de obra ---------- */
.obra-ba { margin: 1.2em 0; }
.obra-ba .ba-slider {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-sm);
  background: var(--tinta);
}
.obra-galeria {
  display: grid; gap: 12px; margin: 1.2em 0;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.obra-galeria img { border-radius: var(--radio-sm); box-shadow: var(--sombra-sm); width: 100%; }

/* ---------- Nota / matiz ---------- */
.nota {
  margin: 1.4em 0; padding: 14px 18px;
  border-left: 4px solid var(--azul-cobalto);
  background: #eef3fb; border-radius: 0 var(--radio-sm) var(--radio-sm) 0;
  font-size: .95rem; color: #34435a;
}
.nota strong { color: var(--azul-cobalto); }

/* ---------- Enlaces relacionados ---------- */
.related { margin-top: 3.5rem; padding-top: 1.8rem; border-top: 1px solid #e2e8f1; }
.related h2 {
  font-family: var(--fuente-titulo); font-size: 1.25rem;
  color: var(--azul-cobalto); margin: 0 0 1em;
}
.related__links { display: flex; flex-wrap: wrap; gap: 10px; }
.related__links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: #eef3fb; color: var(--azul-cobalto); text-decoration: none;
  border: 1px solid #dbe6f6; transition: background-color .15s ease;
}
.related__links a:hover { background: #e0eaf8; }

/* ---------- CTA de cierre (franja azul, igual que .section--sumate) ---------- */
.page-cta {
  background: var(--gradiente-header);
  color: var(--blanco);
  text-align: center;
  position: relative;
  padding-block: 56px;
}
.page-cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 6px; background: var(--rojo);
}
.page-cta h2 {
  font-family: var(--fuente-titulo); color: var(--blanco);
  font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 .35em;
}
.page-cta p { color: rgba(255, 255, 255, .85); margin: 0 auto 1.5em; max-width: 52ch; }

/* ---------- Preguntas frecuentes ---------- */
.faq { margin-top: 3rem; }
.faq > h2 {
  font-family: var(--fuente-titulo); font-size: 1.35rem;
  color: var(--azul-cobalto); margin: 0 0 1em;
}
.faq__list { display: grid; gap: 10px; }
.faq__item {
  border: 1px solid #e1e8f1; border-radius: var(--radio-sm);
  background: var(--blanco); overflow: hidden;
}
.faq__item > summary {
  cursor: pointer; padding: 14px 44px 14px 18px; position: relative;
  font-weight: 700; color: var(--tinta); list-style: none;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--dorado); line-height: 1;
}
.faq__item[open] > summary::after { content: "–"; }
.faq__answer { padding: 0 18px 16px; color: #34435a; font-size: .96rem; line-height: 1.6; }
.faq__answer a { color: var(--azul-cobalto); font-weight: 600; }
