/* "Cómo actuar" — barra de acceso rápido + layout por secciones.
   Archivo aislado para no interferir con styles.css. */

.actuar-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 6px 0 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.actuar-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.actuar-chip:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); transform: translateY(-1px); }
.actuar-chip:focus-visible { outline: 2px solid var(--accent, #d7ef5e); outline-offset: 2px; }
.actuar-routes, .actuar-tools { display: flex; align-items: center; gap: 6px; }
.actuar-routes { min-width: 0; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.actuar-tools { padding-left: 8px; border-left: 1px solid var(--line); }

/* Compensa el header sticky al saltar a una sección + separación clara entre
   secciones (línea divisoria y espaciado) para que se note dónde empieza cada una. */
.actuar-sec {
  scroll-margin-top: 84px;
  margin-top: 40px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.actuar-sec:first-of-type { margin-top: 22px; padding-top: 0; border-top: 0; }
#view-actuar .bottom-blocks { margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
/* Encabezado de sección: acento a la izquierda para que "arranque" sea evidente. */
#view-actuar .actuar-sec > h2 {
  padding-left: 13px;
  border-left: 4px solid var(--green, #2ecc8f);
  line-height: 1.2;
}

/* Puente entre el acordeón y las guías visuales. */
.actuar-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 22px;
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: .92rem;
  color: var(--fg-muted);
}
.actuar-callout .cta-soft { margin: 0; }
/* En <button>, .cta-soft tomaba el fondo gris por defecto del navegador (poco
   legible en modo claro). Se hace transparente: pastilla con borde y texto
   verde legible en ambos temas. */
.cta-soft { background: transparent; cursor: pointer; }
.cta-soft:hover { background: color-mix(in srgb, var(--green, #157150) 10%, transparent); }

@media (max-width: 640px) {
  .actuar-nav { grid-template-columns: 1fr; gap: 7px; margin-bottom: 22px; }
  .actuar-chip { font-size: .8rem; padding: 6px 9px; }
  .actuar-tools { padding: 7px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Acordeón de orientaciones: mejor uso del espacio ----------
   En escritorio pasa de una columna a ancho completo (desperdicia espacio)
   a una rejilla de 2 columnas; contenedores más compactos en general. */
#orientaciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 10px;
  align-items: start;   /* un ítem abierto no estira a su vecino */
}
#orientaciones .ori > summary { padding: 12px 14px; gap: 11px; align-items: center; min-height: 56px; }
#orientaciones .ori-ic { font-size: 20px; }
#orientaciones .ori-t { font-size: 16px; line-height: 1.25; }
#orientaciones .ori-q { font-size: 12.5px; }
#orientaciones .ori-body { padding: 0 14px 14px 45px; }
/* Colapsado: solo ícono + título → rejilla uniforme y ordenada.
   La descripción (quePasa) aparece al expandir. */
#orientaciones .ori:not([open]) .ori-q { display: none; }
#orientaciones .ori[open] > summary { align-items: flex-start; }

@media (max-width: 640px) {
  #orientaciones { gap: 8px; }
  #orientaciones .ori > summary { padding: 11px 13px; gap: 10px; }
  #orientaciones .ori-ic { font-size: 18px; }
  #orientaciones .ori-t { font-size: 15px; }
}

/* ---------- Cronología: navegador compacto (rail de días + detalle) ----------
   Un seguimiento de meses no debe alargar el panel: los días son un rail
   horizontal navegable y solo se muestra el detalle del día activo. */
.crono-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.crono-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.crono-node:hover { border-color: color-mix(in srgb, var(--coral, #e8663d) 45%, var(--line)); }
.crono-node.active { border-color: var(--coral, #e8663d); background: color-mix(in srgb, var(--coral, #e8663d) 12%, var(--surface)); }
.crono-node-dia { font-family: var(--font-serif); font-size: 14px; font-weight: 600; }
.crono-node-fecha { font-size: 11px; color: var(--fg-muted); }

.crono-detail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.crono-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crono-detail-when { font-size: 11.5px; color: var(--coral, #e8663d); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.crono-steps { display: flex; gap: 6px; }
.crono-step {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  font-size: 17px; line-height: 1;
  cursor: pointer;
}
.crono-step:hover:not(:disabled) { border-color: var(--coral, #e8663d); }
.crono-step:disabled { opacity: .4; cursor: default; }
.crono-detail h3 { margin: 8px 0 12px; font-size: 18px; }
.crono-detail ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.crono-detail li { font-size: 14px; color: var(--fg-muted); line-height: 1.5; }
.crono-detalle { margin: 12px 0 0; font-size: 13.5px; color: var(--fg-muted); line-height: 1.55; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Recurso destacado (misma familia de herramientas) ---------- */
.card.featured {
  border-color: color-mix(in srgb, var(--green, #2ecc8f) 55%, var(--line));
  box-shadow: inset 3px 0 0 var(--green, #2ecc8f), var(--shadow);
}
.badge.feat {
  background: color-mix(in srgb, var(--green, #2ecc8f) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green, #2ecc8f) 45%, var(--line));
  color: var(--fg);
  font-weight: 700;
}

/* ---------- Prepárate: dos partes claras ---------- */
.prep-subtitle { font-family: var(--font-serif); font-size: 17px; margin: 24px 0 3px; }
.prep-sub-desc { margin: 0 0 12px; color: var(--fg-muted); font-size: 13.5px; line-height: 1.5; }
#prepFormacion.prep-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }

/* ---------- Separación visible del footer en modo oscuro ----------
   El fondo del footer (#0a1512) es casi igual al fondo oscuro de la página,
   así que se añade un borde superior para delimitarlo (no se nota en claro). */
.site-footer { border-top: 1px solid var(--line); }

/* ---------- Veeduría: registro de apoyos ---------- */
.veed-key {
  margin: 16px 0 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--green, #2ecc8f);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.apoyos-groups { display: flex; flex-direction: column; gap: 26px; }
.apoyo-group > h3 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.apoyo-count {
  font-size: 12px; font-weight: 700; color: var(--fg-muted);
  background: var(--surface-2, #0000000d); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px;
}
/* Cuadrícula por categoría: todo el contenido es visible sin depender de un carrusel. */
.apoyo-carousel { position: relative; }
.apoyo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
  align-items: stretch;          /* tarjetas de igual alto (arregla lo disparejo) */
  padding: 2px 0 4px;
}
.apoyo-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 13px 15px;
}
.apoyo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.apoyo-head h4 { margin: 0; font-size: 14.5px; line-height: 1.3; }
.apoyo-badge { flex: none; }
.apoyo-amount { font-family: var(--font-serif); font-size: 17px; font-weight: 600; margin: 7px 0 2px; }
.apoyo-meta { font-size: 12px; color: var(--fg-faint); }
.apoyo-note {
  margin: 8px 0 0; font-size: 12.5px; color: var(--fg-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.apoyo-src { margin-top: auto; padding-top: 8px; font-size: 11.5px; color: var(--fg-faint); }
.apoyo-src a { color: var(--green, #2ecc8f); text-decoration: none; }
.apoyo-src a:hover { text-decoration: underline; }
.apoyo-arrow {
  position: absolute;
  top: calc(50% - 5px);
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  z-index: 2;
}
.apoyo-arrow:hover { border-color: var(--green, #2ecc8f); }
.apoyo-arrow[hidden] { display: none; }
.apoyo-arrow.prev { left: -4px; }
.apoyo-arrow.next { right: -4px; }
.apoyo-arrow { display: none !important; }

/* Primera ronda de jerarquía visual. */
#view-actuar .section-intro { max-width: 76ch; font-size: 15px; line-height: 1.65; }
.actuar-nav {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.actuar-chip { min-height: 42px; }
.chip-mark {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.actuar-chip-tool { border-style: dashed; }

@media (max-width: 760px) {
  .actuar-chip-tool { margin-left: 0; }
}

/* Banners de transición entre los grandes contenidos de Cómo actuar. */
.section-banner {
  position: relative;
  isolation: isolate;
  min-height: clamp(180px, 22vw, 260px);
  margin: 0 0 22px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green) 26%, var(--line));
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.section-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 35, 27, .94) 0%, rgba(10, 35, 27, .83) 37%, rgba(10, 35, 27, .2) 68%, transparent 100%);
}
.section-banner-copy { width: min(590px, 68%); padding: clamp(20px, 3.5vw, 38px); color: #fff; }
.section-banner h2 { margin: 6px 0 8px; padding: 0 !important; border: 0 !important; color: #fff; font-size: clamp(24px, 3vw, 38px); line-height: 1.05; }
.section-banner p { max-width: 52ch; margin: 0; color: #e0eee6; font-size: 14px; line-height: 1.55; }
.section-number { display: inline-block; color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.section-banner .live-state { margin-top: 10px; color: #fff; border-color: rgba(255,255,255,.35); background: rgba(0,0,0,.24); }
.banner-orientacion { background-image: url("../img/banners/orientacion.webp"); }
.banner-guias { background-image: url("../img/banners/guias.webp"); }
.banner-preparacion { background-image: url("../img/banners/preparacion.webp"); }
.banner-veeduria { background-image: url("../img/banners/veeduria.webp"); }
.banner-aportes { background-image: url("../img/banners/aportes.webp"); }
.banner-recursos { background-image: url("../img/banners/recursos.webp"); }
.banner-mapa { background-image: url("../img/banners/mapa.webp"); }
.banner-entender { background-image: url("../img/banners/entender.webp"); }
.panel-banner { margin-top: 22px; }
.panel-controls { display: flex; justify-content: flex-end; margin: -8px 0 16px; }

@media (max-width: 640px) {
  .panel-banner { margin-top: 16px; }
  .panel-controls { justify-content: stretch; margin-top: -6px; }
  .panel-controls .mode-switch { width: 100%; overflow-x: auto; }
}

@media (max-width: 640px) {
  .section-banner { min-height: 230px; align-items: flex-end; background-position: 62% center; }
  .section-banner::before { background: linear-gradient(0deg, rgba(10,35,27,.96) 0%, rgba(10,35,27,.76) 48%, rgba(10,35,27,.08) 100%); }
  .section-banner-copy { width: 100%; padding: 20px; }
  .section-banner h2 { font-size: 26px; }
  .section-banner p { font-size: 13.5px; }
}

/* ---------- Recursos: tarjetas más compactas (sin perder información) ----------
   El mayor gasto de alto eran los 4 renglones de metadatos con bordes y los
   paddings. Se compactan: meta en una línea fluida, descripción a 3 líneas
   (texto completo en tooltip), tipografía y espaciado más ajustados. */
#grid.grid { gap: 11px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-items: stretch; }
#grid .card { padding: 12px 13px; }
#grid .badges { margin-bottom: 7px; gap: 4px; }
#grid .badge { font-size: 9.5px; padding: 2px 7px; letter-spacing: .02em; }
#grid .card h3 { font-size: 16px; line-height: 1.25; }
#grid .card .action { margin: 0 0 6px; }
#grid .card .desc {
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#grid .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  padding: 8px 0 0;
  margin: 0 0 8px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
}
#grid .meta div { gap: 5px; }
#grid .meta dt { min-width: 0; }
#grid .card .alert { margin: 0 0 8px; padding: 6px 9px; font-size: 11.5px; line-height: 1.35; }
#grid .card-actions .open, #grid .card-actions .report { padding: 8px 11px; }
