/*
 * Raíces & Alma – tema hijo.
 * Los colores salen de Elementor → Ajustes del sitio → Colores globales (variables --e-global-color-*),
 * con el valor original como respaldo.
 */

/* ---------- Fuentes locales (sin Google) ---------- */
@font-face { font-family: "Playfair Display"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/playfair-display-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url(fonts/playfair-display-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-display: swap; font-weight: 400 900;
  src: url(fonts/playfair-display-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-display: swap; font-weight: 400 900;
  src: url(fonts/playfair-display-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; font-style: italic; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-sans-latin-wght-italic.woff2) format("woff2"); }

:root {
  --ra-forest: var(--e-global-color-primary, #2f4a22);
  --ra-forest-dark: var(--e-global-color-forestdark, #1f3016);
  --ra-gold: var(--e-global-color-secondary, #b58a3c);
  --ra-gold-light: var(--e-global-color-goldlight, #d9b66b);
  --ra-ink: var(--e-global-color-text, #26261f);
  --ra-muted: var(--e-global-color-muted, #6b6a5e);
  --ra-ivory: var(--e-global-color-ivory, #faf7f0);
  --ra-sand: var(--e-global-color-sand, #f1ebdd);
  --ra-line: var(--e-global-color-line, #e3dccb);
  --ra-serif: "Playfair Display", Georgia, serif;
  --ra-sans: "Nunito Sans", system-ui, sans-serif;
  --ra-alto-cabecera: 80px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--ra-sans); color: var(--ra-ink); background: var(--ra-ivory);
  -webkit-font-smoothing: antialiased; line-height: 1.6;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--ra-serif); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
a { color: var(--ra-forest); }
::selection { background: var(--ra-gold-light); color: var(--ra-forest-dark); }
:focus-visible { outline: 2px solid var(--ra-gold); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 1000; background: #fff; padding: 8px 16px; border-radius: 8px; }
.ra-boton {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 12px 28px;
  background: var(--ra-forest); color: var(--ra-ivory) !important; text-decoration: none; font: 600 14px/1.3 var(--ra-sans); letter-spacing: .03em;
}
.ra-boton:hover { background: var(--ra-forest-dark); }

/* ---------- Cabecera ---------- */
.ra-cabecera {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ra-ivory) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ra-line);
}
.admin-bar .ra-cabecera { top: var(--wp-admin--admin-bar--height, 32px); }
.ra-cabecera-in { max-width: 80rem; margin: 0 auto; padding: 8px 24px; min-height: var(--ra-alto-cabecera); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ra-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.ra-logo img { height: 64px; width: auto; display: block; }
.ra-logo-texto { font: 500 24px/1 var(--ra-serif); color: var(--ra-forest); }
.ra-menu, .ra-menu-movil { list-style: none; margin: 0; padding: 0; }
.ra-menu { display: flex; align-items: center; gap: 20px; font-size: 14.5px; font-weight: 500; }
.ra-menu a { display: block; padding-bottom: 4px; border-bottom: 2px solid transparent; color: color-mix(in srgb, var(--ra-ink) 80%, transparent); text-decoration: none; transition: color .2s; white-space: nowrap; }
.ra-menu a:hover { color: var(--ra-forest); }
.ra-menu .current-menu-item > a, .ra-menu .current_page_item > a { color: var(--ra-forest); border-bottom-color: var(--ra-gold); }
.ra-cabecera-der { display: flex; align-items: center; gap: 16px; }
.ra-idiomas { display: flex; gap: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.ra-idiomas a { border-radius: 999px; padding: 4px 10px; color: var(--ra-muted); text-decoration: none; }
.ra-idiomas a:hover { background: var(--ra-sand); color: var(--ra-forest); }
.ra-idiomas a.activo { background: var(--ra-forest); color: var(--ra-ivory); }

/* Menú móvil con <details>: se abre y cierra sin JavaScript */
.ra-movil { display: none; }
.ra-movil summary { list-style: none; cursor: pointer; color: var(--ra-forest); width: 32px; height: 32px; display: grid; place-items: center; }
.ra-movil summary::-webkit-details-marker { display: none; }
.ra-movil svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.ra-ico-cerrar, .ra-movil[open] .ra-ico-abrir { display: none; }
.ra-movil[open] .ra-ico-cerrar { display: block; }
.ra-movil-panel {
  position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100svh - var(--ra-alto-cabecera));
  overflow-y: auto; background: var(--ra-ivory); border-top: 1px solid var(--ra-line); padding: 16px 24px;
  box-shadow: 0 16px 32px -12px rgb(38 38 31 / .2);
}
.ra-menu-movil a { display: block; padding: 14px 0; border-bottom: 1px solid var(--ra-line); font: 18px/1.3 var(--ra-serif); color: color-mix(in srgb, var(--ra-ink) 80%, transparent); text-decoration: none; }
.ra-menu-movil li:last-child a { border-bottom: 0; }
.ra-menu-movil .current-menu-item > a { color: var(--ra-forest); }
@media (max-width: 1180px) {
  .ra-nav { display: none; }
  .ra-movil { display: block; }
}
@media (max-width: 767px) {
  :root { --ra-alto-cabecera: 72px; }
  .ra-cabecera-in { padding: 8px 16px; gap: 12px; }
  .ra-logo img { height: 56px; }
  .ra-idiomas a { padding: 4px 7px; }
}

/* ---------- Detalles de las páginas de Elementor ---------- */
.ra-hero h1 .ra-italica, .ra-hero h1 span { color: var(--ra-gold-light); font-style: italic; }
.ra-hero { min-height: calc(100svh - var(--ra-alto-cabecera)) !important; }
.ra-pie-foto p, .ra-pie-texto p, .ra-pie-legal p { margin: 0; }
.ra-pie-texto { color: color-mix(in srgb, var(--ra-ivory) 70%, transparent); font-size: 14px; }
.ra-pie-legal { color: color-mix(in srgb, var(--ra-ivory) 60%, transparent); font-size: 12px; }
.ra-aviso .elementor-widget-container, .elementor-widget.ra-aviso { background: var(--e-global-color-sage, #e7ecdd); border-radius: 12px; padding: 12px 16px; }
.elementor-widget-text-editor ul { padding-left: 20px; }
.elementor-widget-text-editor li::marker { color: var(--ra-gold); }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------- Pie de respaldo (si no hay plantilla de Elementor) ---------- */
.ra-pie-simple { background: var(--ra-forest-dark); color: var(--ra-ivory); text-align: center; padding: 24px; font-size: 14px; }

/* ---------- Entradas del blog ---------- */
.ra-articulo { max-width: 48rem; margin: 0 auto; padding: 48px 16px 96px; }
.ra-volver { font-size: 14px; font-weight: 700; text-decoration: none; }
.ra-articulo-titulo { font-size: clamp(32px, 4vw, 44px); line-height: 1.15; color: var(--ra-forest); margin: 16px 0 8px; }
.ra-articulo-fecha { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ra-muted); }
.ra-articulo-foto { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin: 32px 0; }
.ra-articulo-cuerpo { font-size: 18px; line-height: 1.75; }
.ra-articulo-cuerpo h2 { color: var(--ra-forest); font-size: 28px; margin-top: 1.6em; }
.ra-listado { max-width: 72rem; margin: 0 auto; padding: 48px 16px 96px; }
.ra-listado-titulo { text-align: center; color: var(--ra-forest); font-size: clamp(32px, 4vw, 48px); margin: 0 0 48px; }
.ra-listado .nav-links { display: flex; gap: 12px; justify-content: center; margin-top: 48px; }

/* ---------- 404 ---------- */
.ra-404 { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 24px 96px; }
.ra-404 .ra-404-num { font: 128px/1 var(--ra-serif); color: var(--ra-muted); opacity: .2; margin: 0 0 16px; }
.ra-404 h1 { color: var(--ra-muted); font-size: clamp(28px, 4vw, 36px); margin: 0 0 24px; }
.ra-404 p { max-width: 28rem; font-size: 18px; color: var(--ra-muted); margin: 0 0 40px; }
