/*
Theme Name: Gravedad Cero
Theme URI: https://gravedadcero.es
Author: Alejandro Mena — Embajador de la Agencia Espacial Española
Author URI: https://gravedadcero.es/sobre-mi/
Description: Tema editorial para Gravedad Cero, blog de actualidad espacial y cohetería en español. Portada cronológica con foto, fecha y entradilla; arquitectura de categorías pensada para SEO; datos estructurados de Article y Breadcrumb incluidos.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gravedad-cero
Tags: blog, news, one-column, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  --ink:        #05070f;
  --surface:    #0b1020;
  --surface-2:  #131b30;
  --surface-3:  #1b2540;
  --line:       rgba(255, 255, 255, 0.10);
  --line-soft:  rgba(255, 255, 255, 0.06);

  --text:       #e9edf6;
  --text-dim:   #aab3c7;
  --text-faint: #7c869c;

  --accent:     #ff6b2c;   /* propulsión */
  --accent-ink: #1a0800;
  --accent-2:   #5aa9ff;   /* órbita */
  --accent-3:   #7ee0c0;   /* señal */

  --radius:     14px;
  --radius-sm:  8px;
  --radius-lg:  22px;

  --shadow:     0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --shadow-sm:  0 6px 20px -10px rgba(0, 0, 0, 0.7);

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap:       1180px;
  --wrap-read:  760px;
  --gutter:     clamp(1.1rem, 4vw, 2.5rem);

  --step:       clamp(3rem, 7vw, 5.5rem);
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 620px at 78% -8%, rgba(90, 169, 255, 0.16), transparent 62%),
    radial-gradient(820px 520px at 6% 4%, rgba(255, 107, 44, 0.11), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--text); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }

p { margin: 0 0 1.15em; }

:focus-visible {
  outline: 3px solid var(--accent-3);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Columna de lectura: migas, titular, cuerpo y caja de autor comparten eje. */
.lane { max-width: var(--wrap-read); margin-inline: auto; }

/* ==========================================================================
   3. HEADER + NAVEGACIÓN
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

/* --- Logo --- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 0.63rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.28rem;
}

/* --- Menú principal --- */

.nav-main { margin-left: auto; }

.nav-main ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.nav-main li { position: relative; }

.nav-main a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-main a:hover,
.nav-main .current-menu-item > a,
.nav-main .current-menu-parent > a,
.nav-main .current-menu-ancestor > a {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Submenú desplegable */
.nav-main .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}

.nav-main .sub-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 244px;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-main li:hover > .sub-menu,
.nav-main li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-main .sub-menu a {
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* --- Botón hamburguesa --- */

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }

  .nav-main {
    position: fixed;
    inset: 72px 0 auto;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem var(--gutter) 1.5rem;
    display: none;
  }
  .nav-main.is-open { display: block; }

  .nav-main ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-main > ul > li { border-bottom: 1px solid var(--line-soft); }
  .nav-main a { padding: 0.85rem 0.2rem; font-size: 1rem; }

  .nav-main .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 0 0 0.7rem 0.4rem;
    padding: 0 0 0 0.8rem;
  }
  .nav-main .menu-item-has-children > a::after { float: right; margin-top: 0.55em; }
}

/* ==========================================================================
   4. COMPONENTES REUTILIZABLES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
}

/* Dentro de contenedores flex en columna, la etiqueta no debe estirarse. */
.card-body > .badge,
.author-box .badge { align-self: flex-start; }

.badge-actualidad { color: var(--accent);   border-color: rgba(255, 107, 44, 0.4);  background: rgba(255, 107, 44, 0.10); }
.badge-guia       { color: var(--accent-2); border-color: rgba(90, 169, 255, 0.4);  background: rgba(90, 169, 255, 0.10); }
.badge-intro      { color: var(--accent-3); border-color: rgba(126, 224, 192, 0.4); background: rgba(126, 224, 192, 0.10); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px -12px rgba(255, 107, 44, 0.9);
}
.btn-primary:hover { background: #ff7f48; color: var(--accent-ink); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.83rem;
  color: var(--text-faint);
}
.meta time { color: var(--text-dim); }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem 1.5rem;
  margin-bottom: 1.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-dim); font-size: 0.95rem; max-width: 46ch; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
}

/* ==========================================================================
   5. PORTADA — DESTACADO + REJILLA CRONOLÓGICA
   ========================================================================== */

.site-main { padding-block: clamp(2rem, 5vw, 3.5rem) var(--step); }

.home-lead {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 62ch;
}
.home-lead h1 { margin-bottom: 0.55rem; }
.home-lead p { color: var(--text-dim); font-size: 1.06rem; margin: 0; }

/* --- Artículo destacado --- */

.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.3rem, 3vw, 2.6rem);
  align-items: center;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  margin-bottom: var(--step);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.featured-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured:hover .featured-media img { transform: scale(1.03); }

.featured-body { padding-right: clamp(0rem, 1.5vw, 1rem); }
.featured-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin: 0.85rem 0 0.7rem;
}
.featured-body h2 a { color: var(--text); }
.featured-body h2 a:hover { color: var(--accent); }
.featured-body .excerpt {
  color: var(--text-dim);
  margin-bottom: 1.35rem;
}

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured-media { order: -1; }
}

/* --- Rejilla de tarjetas --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.2rem, 2.6vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.7rem;
  padding: 1.15rem 1.25rem 1.35rem;
}

.card-body h3 { margin: 0; font-size: 1.14rem; line-height: 1.28; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--accent); }

.card-body .excerpt {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-dim);
  flex: 1;
}

.card-body .meta { margin-top: auto; padding-top: 0.35rem; }

/* --- Paginación --- */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: var(--step);
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding-inline: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
}
.pagination .page-numbers:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ==========================================================================
   6. BLOQUE "POR DÓNDE EMPIEZO" (rutas de entrada)
   ========================================================================== */

.routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: var(--step);
}

.route {
  display: block;
  padding: 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.route:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.route h3 { margin: 0.9rem 0 0.45rem; font-size: 1.16rem; }
.route p { margin: 0; color: var(--text-dim); font-size: 0.93rem; }
.route-icon { width: 30px; height: 30px; color: var(--accent); }
.route:nth-child(2) .route-icon { color: var(--accent-2); }
.route:nth-child(3) .route-icon { color: var(--accent-3); }

/* ==========================================================================
   7. ARTÍCULO INDIVIDUAL
   ========================================================================== */

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin-inline: 0.45rem; opacity: 0.5; }

.entry-header { margin-bottom: 2rem; }
.entry-header h1 { margin: 0.9rem 0 0.9rem; }

.entry-lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 62ch;
  margin-bottom: 1.4rem;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding-block: 1rem;
  border-block: 1px solid var(--line-soft);
  font-size: 0.87rem;
  color: var(--text-faint);
}
.entry-meta strong { color: var(--text-dim); font-weight: 600; }

/* La foto de portada respira un poco más ancha que el texto, sin comerse la pantalla. */
.entry-figure { margin: 0 auto 2.4rem; max-width: 980px; }
.entry-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.entry-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* --- Cuerpo del texto --- */

.entry-content { font-size: 1.06rem; }

/* Imágenes «anchas» del editor: se salen de la columna de lectura sin romper la página. */
.entry-content .alignwide,
.entry-content .alignfull {
  width: min(980px, 92vw);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content h2 { margin-top: 2.6rem; }
.entry-content h3 { margin-top: 2rem; }

.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

.entry-content ul,
.entry-content ol { padding-left: 1.35rem; margin-bottom: 1.4rem; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content img,
.entry-content figure { border-radius: var(--radius); }
.entry-content figure { margin-block: 2.2rem; }
.entry-content figcaption { font-size: 0.82rem; color: var(--text-faint); margin-top: 0.6rem; }

.entry-content blockquote {
  margin: 2.2rem auto;
  padding: 0.3rem 0 0.3rem 1.4rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text);
}
.entry-content blockquote cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-style: normal;
  color: var(--text-faint);
}

.entry-content hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin-block: 2.6rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin-block: 2rem;
}
.entry-content th,
.entry-content td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.entry-content th { font-family: var(--font-display); color: var(--text); }

/* Tablas anchas: scroll propio, nunca scroll horizontal de página */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Caja "En cristiano": glosario de término técnico --- */

.jargon {
  max-width: var(--wrap-read);
  margin: 2.2rem auto;
  padding: 1.25rem 1.4rem;
  background: rgba(90, 169, 255, 0.07);
  border: 1px solid rgba(90, 169, 255, 0.28);
  border-radius: var(--radius);
}
.jargon .eyebrow { color: var(--accent-2); margin-bottom: 0.4rem; }
.jargon p:last-child { margin-bottom: 0; }
.jargon strong { color: var(--text); }

/* --- Caja "Por qué te importa" --- */

.why {
  max-width: var(--wrap-read);
  margin: 2.4rem auto;
  padding: 1.4rem 1.5rem;
  background: linear-gradient(140deg, rgba(255, 107, 44, 0.13), rgba(255, 107, 44, 0.03));
  border: 1px solid rgba(255, 107, 44, 0.3);
  border-radius: var(--radius);
}
.why .eyebrow { margin-bottom: 0.45rem; }
.why p:last-child { margin-bottom: 0; }

/* --- Caja de autor (E-E-A-T) --- */

.author-box {
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
  max-width: var(--wrap-read);
  margin: var(--step) auto 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-avatar {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 2px solid var(--accent);
}
.author-box h3 { margin: 0 0 0.15rem; font-size: 1.08rem; }
.author-role {
  font-size: 0.79rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.author-box p { margin: 0; font-size: 0.93rem; color: var(--text-dim); }

/* --- Relacionados --- */

.related { margin-top: var(--step); }

/* ==========================================================================
   8. NEWSLETTER
   ========================================================================== */

.newsletter {
  margin-top: var(--step);
  padding: clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(90, 169, 255, 0.18), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.newsletter h2 { margin-bottom: 0.5rem; }
.newsletter p {
  max-width: 52ch;
  margin: 0 auto 1.6rem;
  color: var(--text-dim);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 480px;
  margin-inline: auto;
}
.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 0.82rem 1.1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: var(--text-faint); }
.newsletter-note { font-size: 0.78rem; color: var(--text-faint); margin: 1rem 0 0; }

/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  margin-top: var(--step);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

.footer-about p {
  margin: 1rem 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 42ch;
}

.footer-col h4 {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--text-dim); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.83rem;
  color: var(--text-faint);
}
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--text-dim); }

/* ==========================================================================
   10. ARCHIVO / BÚSQUEDA / 404
   ========================================================================== */

.archive-header {
  padding-bottom: 2rem;
  margin-bottom: var(--step);
  border-bottom: 1px solid var(--line);
}
.archive-header h1 { margin-bottom: 0.6rem; }
.archive-header .archive-description {
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0;
}

.subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.subcats a {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.subcats a:hover { border-color: var(--accent); color: var(--accent); }

.search-form { display: flex; gap: 0.5rem; max-width: 420px; }
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.no-results { padding-block: 3rem; text-align: center; color: var(--text-dim); }

.error-404 { text-align: center; padding-block: clamp(3rem, 9vw, 6rem); }
.error-404 .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 8rem);
  line-height: 1;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ==========================================================================
   11. UTILIDADES WORDPRESS
   ========================================================================== */

.alignleft  { float: left;  margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; display: block; }
/* .alignwide y .alignfull se resuelven en la sección 7, dentro de .entry-content. */

.wp-caption-text { font-size: 0.82rem; color: var(--text-faint); }
.sticky .card { border-color: var(--accent); }

.entry-content .wp-block-image { margin-block: 2.2rem; }

/* Impresión */
@media print {
  .site-header, .site-footer, .newsletter, .related, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
