/*
 * El Romancero Criollo — rediseño móvil (<920px).
 *
 * Se carga con media="(max-width: 920px)" (functions.php): en desktop el navegador no lo aplica y el sitio
 * queda exacto al builder. Aquí el grid fijo de 360px del builder se vuelve una columna en flujo: cada celda
 * se ordena por su fila móvil (--m-order) y el ritmo lo ponen márgenes propios, no las filas de relleno.
 * Las clases rc-block--* / rc-m-* las añade inc/mobile.php; la estructura de bloques del editor no cambia.
 * Misma marca: Spectral (títulos) + Noto Sans (texto), teal #255f71 / #0c4658, rojo de YouTube.
 */

:root {
  --m-gutter: 24px;
  --m-column: 600px;
  --m-section: clamp(48px, 13vw, 72px);
  --m-gap: 20px;
  --m-card-gap: 48px;
  --m-radius-soft: 10px;
  --m-line: rgba(29, 30, 32, 0.12);
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- Foco visible (teclado) ---------- */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.rc-block--tone-dark :focus-visible { outline-color: #fff; }

/* ---------- Header compacto ---------- */
.rc-header { padding: 0; }
.rc-header__mobile { padding: 6px 12px 6px 20px; grid-template-columns: auto 1fr max-content max-content; grid-template-areas: "logo . cart burger"; }
.rc-header__mobile .rc-header__logo { width: 112px; }
.rc-header__mobile .rc-header__cart { overflow: visible; }
.rc-header__mobile .rc-header__cart-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.rc-header__cart-icon { width: 22px; height: 22px; }
.rc-burger { width: 44px; height: 44px; margin-left: 4px; border-radius: 8px; }
.rc-burger__bun, .rc-burger__meat { left: 10px; width: 24px; }
.rc-burger__bun:first-child { top: 13px; }
.rc-burger__meat { top: 21px; }
.rc-burger__bun:last-child { top: 29px; }
.rc-burger--open .rc-burger__bun:first-child { top: 12px; }
.rc-burger--open .rc-burger__meat { width: 0; }
.rc-header__dropdown { align-items: stretch; gap: 0; padding: 0 24px; }
.rc-header__dropdown--open {
  max-height: calc(100svh - 64px); overflow-y: auto; padding: 4px 24px 24px;
  border-top: 1px solid var(--m-line); box-shadow: rgba(0, 0, 0, 0.12) 0 18px 24px -12px;
}
.rc-header__dropdown .rc-header__nav { width: 100%; }
.rc-header__dropdown .rc-header__links { gap: 0; text-align: start; }
.rc-header__dropdown .rc-header__links li { border-bottom: 1px solid var(--m-line); }
.rc-header__dropdown .rc-header__links li:last-child { border-bottom: 0; }
.rc-header__dropdown .rc-header__item { justify-content: flex-start; }
.rc-header__dropdown .rc-header__item a {
  display: flex; align-items: center; min-height: 56px; width: 100%; text-align: start;
  font-family: var(--font-primary); font-size: 21px; line-height: 1.25; color: var(--ink); text-decoration: none;
}
.rc-header__dropdown .rc-header__item.is-active a { color: var(--teal); text-decoration: none; }
.rc-header__dropdown .rc-header__item.is-active a::before {
  content: ""; width: 6px; height: 6px; margin-right: 12px; border-radius: 50%; background: var(--teal);
}

/* ---------- Secciones: columna en flujo ---------- */
.rc-layout {
  display: flex; flex-direction: column; align-items: stretch;
  max-width: calc(var(--m-column) + 2 * var(--m-gutter));
  min-height: 0;
  padding: var(--m-section) var(--m-gutter);
}
.rc-el, .rc-el--abs {
  position: relative; inset: auto; width: auto; height: auto;
  order: var(--m-order, 0);
  margin-top: var(--m-gap);
}
.rc-el.rc-m-first { margin-top: 0; }
.rc-el.rc-m-card:not(.rc-m-first) { margin-top: var(--m-card-gap); }
.rc-el.rc-m-tight { margin-top: 12px; }
.rc-el--m-hidden { display: none; }
.rc-el--slide { transform: translateY(16px); }
.rc-el--scale { transform: scale(0.97); }

/* franjas decorativas sin contenido: las blancas sobran, las de color quedan como un filete */
.rc-block--blank { display: none; }
.rc-block--empty:not(.rc-block--blank) .rc-layout { padding: 0; min-height: 10px; }

/* ---------- Tipografía: jerarquía clara, tamaños fluidos ---------- */
/* el tamaño del builder se respeta si es menor (créditos, pies), con piso legible y techo por nivel */
.rc-el-text :is(h1, h2, h3, h4, h5, h6) {
  --m-fs: var(--fontSizeMobile, var(--fontSizeDesktop, 999px));
  line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance;
}
.rc-el-text h1 { font-size: max(18px, min(var(--m-fs), clamp(38px, 10.5vw, 56px))); }
.rc-el-text h2 { font-size: max(18px, min(var(--m-fs), clamp(32px, 8.8vw, 46px))); }
.rc-el-text h3 { font-size: max(18px, min(var(--m-fs), clamp(28px, 7.6vw, 38px))); }
.rc-el-text h4 { font-size: max(18px, min(var(--m-fs), clamp(24px, 6.4vw, 32px))); }
.rc-el-text h5 { font-size: max(17px, min(var(--m-fs), clamp(20px, 5.4vw, 24px))); line-height: 1.3; letter-spacing: 0; }
.rc-el-text h6 { font-size: max(16px, min(var(--m-fs), 19px)); line-height: 1.35; letter-spacing: 0; }
/* títulos pequeños de varias líneas (créditos): se leen como texto, no como titular */
.rc-el-text :is(h3, h4, h5, h6)[style*="--fontSizeDesktop: 16px"] { line-height: 1.5; text-wrap: wrap; }
.rc-el-text p {
  font-size: max(16px, min(var(--fontSizeMobile, var(--fontSizeDesktop, var(--size))), 20px));
  line-height: 1.65; text-wrap: pretty;
}
.rc-el-text p.body-small { font-size: max(15px, min(var(--fontSizeMobile, var(--fontSizeDesktop, var(--size))), 17px)); line-height: 1.6; }
.rc-el-text span { font-size: inherit; }
.rc-el-text :is(h1, h2, h3, h4, h5, h6, p):is(:first-child, :last-child) { padding: 0; }
.rc-el-text :is(h1, h2, h3, h4, h5, h6) { margin-bottom: 0.45em; }
.rc-el-text :is(p, .body-large, .body, .body-small) { margin-bottom: 1em; }
.rc-el-text :is(h1, h2, h3, h4, h5, h6, p):last-child { margin-bottom: 0; }
.rc-el-text :is(ol, ul) { padding-left: 1.4em; }
.rc-el-text a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.rc-el-text p:empty { display: none; }

/* títulos de página (sección con un único texto al inicio: Tienda, Contacto, ¿Quiénes…?) */
.rc-block--title .rc-layout { padding-bottom: 8px; }
.rc-block--title + .rc-block:not(.rc-block--tone-dark):not(.rc-block--photo) .rc-layout { padding-top: 32px; }

/* ---------- Hero ---------- */
.rc-block--hero { display: flex; flex-direction: column; min-height: min(86svh, 720px); }
.rc-block--hero .rc-block__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 30, 38, 0.30) 0%, rgba(8, 30, 38, 0.38) 45%, rgba(8, 30, 38, 0.78) 100%);
}
.rc-block--hero .rc-layout { flex: 1; width: 100%; justify-content: flex-end; padding-top: 120px; padding-bottom: 56px; }
.rc-block--hero .rc-el-text p { color: #fff !important; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.rc-block--hero .rc-m-first .rc-el-text p,
.rc-block--hero .rc-m-first .rc-el-text p > span,
.rc-block--hero .rc-el--text p[style*="--fontSizeDesktop: 72px"] > span {
  font-size: clamp(46px, 13vw, 76px); line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance;
}
.rc-block--hero .rc-el:not(.rc-m-first) .rc-el-text p { font-size: clamp(18px, 4.8vw, 22px); line-height: 1.45; max-width: 30ch; margin-inline: auto; opacity: 0.95; }
.rc-block--hero .rc-el.rc-el:not(.rc-m-first) { margin-top: 16px; }
.rc-hero-ctas { order: 999; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.rc-hero-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; min-width: 140px; padding: 0 28px;
  font-family: var(--font-secondary); font-size: 16px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none;
  border-radius: 999px; border: 2px solid transparent; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.rc-hero-cta--primary { background: #fff; color: var(--teal-dark); }
.rc-hero-cta--primary:hover { background: #e9f2f4; }
.rc-hero-cta--secondary { color: #fff; border-color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.06); }
.rc-hero-cta--secondary:hover { background: rgba(255, 255, 255, 0.18); }
.rc-hero-ctas :focus-visible { outline-color: #fff; }

/* ---------- Fondos de foto con texto largo: el texto va en un panel legible ---------- */
.rc-block--photo .rc-block__overlay { opacity: 0.35 !important; }
.rc-block--photo .rc-el--text .rc-el-text {
  padding: 28px 24px; border-radius: var(--m-radius-soft);
  background: rgba(10, 32, 40, 0.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.rc-block--photo .rc-el-text :is(p, h1, h2, h3, h4, h5, h6, span, strong, b) {
  color: #fff !important; font-weight: 400 !important; font-family: var(--font-secondary) !important; letter-spacing: 0;
}
.rc-block--photo .rc-el-text :is(p, h1, h2, h3, h4, h5, h6) { font-size: 16px; line-height: 1.7; text-wrap: wrap; }

/* ---------- Botones: táctiles, texto completo, jerarquía ---------- */
.rc-el--button { align-items: center; }
.rc-el--button > .rc-btn {
  width: auto; min-width: min(100%, 240px); max-width: 100%; min-height: 50px; height: auto;
  padding: 12px 24px; white-space: normal; overflow: visible;
  font-size: max(16px, var(--btn-m-size, 16px)); line-height: 1.3; font-weight: 600;
  align-self: center; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.rc-el--button > .rc-btn--secondary {
  background: transparent; color: var(--teal-dark); border: 2px solid currentColor; box-shadow: none;
}
.rc-el--button > .rc-btn--secondary:hover { background: rgba(37, 95, 113, 0.08); }
.rc-block--tone-dark .rc-el--button > .rc-btn--secondary { color: #fff; }

/* ---------- Imágenes: tamaño natural, sin franjas ni recortes ---------- */
.rc-el--image { display: flex; flex-direction: column; align-items: center; }
.rc-el--image > .rc-imgwrap { max-height: none; height: auto; width: 100%; align-self: center; }
.rc-img, .rc-img--mobile { width: 100%; height: auto; max-width: 100%; border-radius: var(--m-radius, 6px); }
.rc-img img { height: auto; }
/* retratos circulares (¿Quiénes somos?) */
.rc-el[style*="--m-radius:50%"] .rc-imgwrap { width: min(240px, 72%); }
.rc-el[style*="--m-radius:50%"] .rc-img { aspect-ratio: 1; }
.rc-el[style*="--m-radius:50%"] .rc-img img { height: 100%; }

/* tarjetas tocables: imagen con enlace + su título (libros, tienda). La parte de arriba es la que abre la
   tarjeta (rc-m-card), la de abajo la que se le pega (rc-m-tight): juntas se ven como una sola pieza */
.rc-el.rc-m-linked { background: #fff; border: 1px solid var(--m-line); color: var(--text-dark); }
.rc-el.rc-m-linked.rc-m-card { padding: 20px 20px 0; border-bottom: 0; border-radius: var(--m-radius-soft) var(--m-radius-soft) 0 0; }
.rc-el.rc-m-linked.rc-m-tight { margin-top: 0; padding: 16px 20px 20px; border-top: 0; border-radius: 0 0 var(--m-radius-soft) var(--m-radius-soft); }
.rc-el.rc-m-linked.rc-m-label { cursor: pointer; }
.rc-el.rc-m-linked.rc-m-media .rc-imgwrap { width: min(100%, 260px); }
.rc-el.rc-m-linked.rc-m-media .rc-img { aspect-ratio: var(--m-ratio, auto); }
.rc-el.rc-m-linked.rc-m-media[style*="--m-ratio"] .rc-img img { height: 100%; }
.rc-el.rc-m-linked.rc-m-media .rc-img { box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.45); border-radius: 4px; }
/* Slides del builder: el título de la tarjeta viene con --text:left de fábrica;
   en el rediseño las tarjetas van centradas (coherente con rc-m-label). */
.rc-el--slide .rc-el-text { text-align: center; }

.rc-el.rc-m-linked.rc-m-label .rc-el-text { text-align: center; }
.rc-el.rc-m-linked.rc-m-label .rc-el-text :is(p, h1, h2, h3, h4, h5, h6, span) { color: var(--ink) !important; }
.rc-el.rc-m-linked.rc-m-label.rc-m-tight[data-m-href]::after {
  content: "Ver más  →"; display: block; margin-top: 10px; text-align: center;
  font-family: var(--font-secondary); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: var(--teal);
}
.rc-block--tone-dark .rc-el.rc-m-linked { border-color: transparent; }

/* ---------- Música / YouTube / Drive: reproductores a ancho completo ---------- */
.rc-el--video > *, .rc-el--video .rc-video, .rc-el--video .rc-video-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.rc-el--video { border-radius: var(--m-radius-soft); overflow: hidden; background: #111; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.5); }
.rc-el--video .rc-video-cover { background-size: cover; }
.rc-el--video .rc-video-cover::after { width: 60px; height: 42px; background-size: contain; }
.rc-el--video .rc-video-cover--offline { aspect-ratio: 16 / 9; }
.rc-el--embed .rc-embed { width: 100%; }
.rc-drive, .rc-drive-cover {
  width: 100%; height: auto; aspect-ratio: 4 / 3; margin: 0; border: 0; border-radius: var(--m-radius-soft);
}
.rc-el--embed:has(.rc-drive) .rc-drive { aspect-ratio: 4 / 3; height: auto; }
/* el título de cada canción se pega a su video */
.rc-el--video.rc-m-tight { margin-top: 14px; }

/* ---------- Instagram: grilla 2×2 limpia ---------- */
.rc-ig { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rc-ig a { width: auto; border-radius: 8px; }
.rc-ig a:nth-child(n + 5) { display: none; }

/* ---------- Redes ---------- */
.rc-el--social { align-items: center; }
.rc-social { height: auto; justify-content: center; gap: 12px; }
.rc-social__link { min-width: 44px; min-height: 44px; }

/* ---------- Formularios ---------- */
.rc-el--form .wpcf7-form { gap: 18px; }
.rc-form label { font-weight: 600; font-size: 15px; color: var(--ink); }
.rc-form input, .rc-form textarea {
  margin-top: 6px; height: 52px; padding: 14px 16px; border-radius: 8px;
  color: var(--text-dark); background: #fff; border: 1px solid rgba(29, 30, 32, 0.22);
}
.rc-form textarea { height: 132px; min-height: 132px; }
.rc-form input:focus, .rc-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37, 95, 113, 0.22); }
.rc-btn.rc-form__submit { min-height: 50px; padding: 0 36px; font-size: 16px; font-weight: 600; border-radius: 999px; }
.rc-form__actions { justify-self: stretch; }
.rc-form__actions .rc-form__submit { width: 100%; justify-content: center; }

/* ---------- Footer compacto ---------- */
.rc-footer .rc-block { border-top: 1px solid var(--m-line); }
.rc-footer .rc-layout { align-items: center; padding: 40px var(--m-gutter) 36px; }
.rc-footer .rc-el { text-align: center; margin-top: 14px; }
.rc-footer .rc-el.rc-m-first { margin-top: 0; }
.rc-footer .rc-el--image .rc-imgwrap { width: 120px; }
.rc-footer .rc-el-text p { font-size: 13px; line-height: 1.55; color: #4a4b4d !important; max-width: 36ch; margin-inline: auto; }

/* ---------- Cabecera de entradas (blog) ---------- */
.rc-blog-header__inner { padding: 40px var(--m-gutter) 24px; }

/* ---------- Tablet (600–920px): misma columna, más aire ---------- */
@media (min-width: 600px) {
  :root { --m-gutter: 40px; --m-card-gap: 56px; }
  .rc-ig { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-el--slide, .rc-el--scale { opacity: 1; transform: none; transition: none; }
}
