/* ==========================================================================
   Clima Central — Layout: contenedores, secciones y rejillas
   ========================================================================== */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}

.wrap--nav { max-width: var(--wrap-nav); }

/* Secciones -------------------------------------------------------------- */

.section {
  padding: var(--pad-y) var(--pad-x);
}

.section--top {                       /* primera sección tras el nav */
  padding-top: clamp(32px, 5vw, 64px);
}

.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--tight { padding-block: var(--pad-y-sm); }

.section--surface { background: var(--c-surface); }

.section--dark {
  background: var(--c-ink);
  color: var(--c-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--c-white); }

.section--green {
  background: var(--c-green);
  color: var(--c-white);
}

/* Cabecera de sección ---------------------------------------------------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
}

.section-head__title {
  margin-top: 18px;
  font-size: var(--fs-h2);
}

.section-head__title--sm { font-size: var(--fs-h2-sm); }

.section-head__lead {
  margin-top: 16px;
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  color: var(--c-body);
  max-width: 62ch;
}

.section--dark .section-head__lead { color: var(--c-muted-dark); }

/* Rejillas --------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--200 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid--240 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--280 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--320 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.split {
  display: grid;
  gap: var(--gap-col);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  align-items: start;
}

.split--center { align-items: center; }
.split--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.split--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* Columna de artículo (guías y clústeres) -------------------------------- */

.prose {
  max-width: 72ch;
}

.prose > * + * { margin-top: 20px; }

.prose h2 {
  margin-top: 48px;
  font-size: var(--fs-h2-sm);
  scroll-margin-top: 120px;
}

.prose h3 {
  margin-top: 32px;
  font-size: var(--fs-22);
  font-weight: 600;
}

.prose p,
.prose li {
  font-size: var(--fs-17);
  line-height: var(--lh-body);
  color: var(--c-body);
}

.prose strong { color: var(--c-ink); font-weight: 600; }

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
}

.prose li {
  position: relative;
  padding-left: 22px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-lime);
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol li {
  counter-increment: prose-ol;
  padding-left: 30px;
}

.prose ol li::before {
  content: counter(prose-ol);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--c-green);
}

/* El `:not(.btn)` no es cosmético: sin él, `.prose a` (0,1,1) gana a
   `.btn--dark` (0,1,0) y pinta de tinta el texto de un botón de fondo tinta,
   que desaparece. Los botones traen su propio color y no se tocan aquí. */
.prose a:not(.btn) {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: var(--c-lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:not(.btn):hover { color: var(--c-green); }

/* Layout de guía: contenido + sumario lateral ---------------------------- */

.guide {
  display: grid;
  gap: var(--gap-col);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1000px) {
  .guide { grid-template-columns: minmax(0, 1fr) 300px; }
  .guide__aside { position: sticky; top: 110px; }
}

/* Utilidades ------------------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.stack--sm { gap: 12px; }
.stack--full { align-items: stretch; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.row--sm { gap: 8px; }
.row--between { justify-content: space-between; align-items: center; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-36 { margin-top: 36px; }
