/* ══════════════════════════════════════════════════════════════
   RALLY MAYA CHRONICLE — Sistema de diseño compartido
   Páginas internas · v4
   ----------------------------------------------------------------
   Ubicación: assets/css/rmc.css   (cargado por las páginas internas)
   Estructura del proyecto:
     *.html                páginas (raíz)
     assets/css/           este archivo
     assets/js/rmc.js      header/footer/modales/filtros inyectados
     assets/img/           logo + imágenes de fondo y portadas
     assets/frames/        49 frames del intro (desktop)
     assets/frames-mobile/ 49 frames del intro (vertical, móvil)
   NOTA backgrounds: las páginas pasan la imagen por variable
     (--hero-img / --cta-img / --pq-img). Esas url() se resuelven
     relativas a ESTE archivo (assets/css/), por eso en el HTML se
     escriben como  url('../img/archivo.jpg').
══════════════════════════════════════════════════════════════ */

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

:root {
  /* Estructura — charcoal cálido (base Midnight Asphalt) */
  --ivory:      #1A1917;  /* fondo de página */
  --cream:      #242220;  /* header / secciones alt */
  --parchment:  #3A3833;  /* bordes / hairlines */
  --ink:        #E3DDCF;  /* texto principal — Classic Oatstone */
  --ink-mid:    #211F1C;  /* inputs / superficies */
  --stone:      #B0ADA6;  /* apagado — Industrial Slate */
  --mist:       #7C786E;  /* tenue */
  --dark:       #121110;  /* más profundo — edition bar / footer */
  /* Acento de texto = Racing Ochre · relleno con texto blanco = Nautical Steel */
  --teal:       #DDB460;  /* repunteado → Racing Ochre (acento de texto) */
  --teal-light: #18140C;
  --teal-mid:   #ECC67E;  /* ochre claro (hovers de texto) */
  --gold:       #DDB460;
  --gold-light: #18140C;
  --coral:      #D0604C;  /* → Bordeaux Velocity aclarado (legible sobre fondo oscuro) */
  /* Moodboard — paleta completa */
  --ochre:      #DDB460;  /* Racing Ochre */
  --oatstone:   #E3DDCF;  /* Classic Oatstone */
  --slate:      #B0ADA6;  /* Industrial Slate */
  --fog:        #434549;  /* Metallic Fog */
  --asphalt:    #2A2A2A;  /* Midnight Asphalt */
  --bordeaux:   #5E1014;  /* Bordeaux Velocity */
  --gunmetal:   #465763;  /* Gunmetal Ocean */
  --nautical:   #00425E;  /* Nautical Steel (sucesor del teal) */
  --touring:    #264739;  /* Touring Green */
  --leather:    #5B452F;  /* Leatherline Club */
  --sans:  'Lato', sans-serif;
  --header-h: 0px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--nautical); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--parchment); }
::-webkit-scrollbar-thumb:hover { background: var(--mist); }

/* ══════════════════════════════════════════
   HEADER (inyectado por rmc.js)
══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
}
.edition-bar {
  background: var(--dark);
  border-bottom: 1px solid var(--parchment);
  padding: 9px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.eb-left, .eb-right, .eb-center {
  font-size: 10px; font-weight: 300; letter-spacing: 0.22em;
  text-transform: uppercase; white-space: nowrap;
}
.eb-left  { color: var(--mist); text-align: left; }
.eb-center { color: var(--stone); text-align: center; }
.eb-right { color: var(--mist); text-align: right; }

header.rmc-head { background: var(--cream); border-bottom: 1px solid var(--parchment); }
.header-top {
  padding: 4px 56px 0;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
}
.header-nav-left { display: flex; gap: 24px; margin-top: 0; }
.header-nav-right { display: flex; align-items: center; gap: 20px; justify-content: flex-end; margin-top: 0; }
.header-nav-left a, .header-nav-right a, .header-nav-right button {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--stone); text-decoration: none; cursor: pointer;
  transition: color 0.15s; font-weight: 400;
  background: none; border: none; font-family: var(--sans);
}
.header-nav-left a:hover, .header-nav-right a:hover,
.header-nav-right button:hover { color: var(--ink); }

.logo-center { text-align: center; padding-bottom: 0; }
.masthead-logo { display: inline-block; text-decoration: none; line-height: 0; margin: 10px 0; }
.masthead-logo img { height: 60px; width: auto; display: block; }
.logo-type-wrap { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; }
.logo-type-main {
  font-family: 'Times New Roman', Times, serif;
  font-size: 26px; font-weight: 300; color: var(--ink);
  letter-spacing: 0.28em; text-indent: 0.28em; line-height: 1; white-space: nowrap;
}
.logo-type-sub {
  font-size: 9px; font-weight: 300; color: var(--stone);
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; justify-content: space-between; margin-top: 7px;
}
.btn-sub {
  background: var(--dark); color: var(--ink) !important;
  padding: 7px 16px; font-size: 9px !important; letter-spacing: 0.18em !important;
}
.btn-sub:hover { background: var(--nautical); color: #fff !important; }

.header-cats {
  display: flex; border-top: 1px solid var(--parchment);
  padding: 0 56px; overflow: visible; scrollbar-width: none;
}
.header-cats::-webkit-scrollbar { display: none; }
.hcat {
  padding: 13px 22px; font-size: 9.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--stone); cursor: pointer;
  white-space: nowrap; border-bottom: 2px solid transparent;
  transition: all 0.15s; font-weight: 400; text-decoration: none;
}
.hcat:hover { color: var(--ink); }
.hcat.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }

/* Enlace al sitio oficial, a la derecha de las categorías */
.hcat-site { margin-left: auto; flex-shrink: 0; text-decoration: none; color: var(--gold); }
.hcat-site:hover { color: var(--teal-mid); }
.hcat-site .ext { font-size: 11px; }

/* Desplegable de Secciones en el header */
.hcat-dd { position: relative; }
.hcat-dd .dd-caret { font-size: 8px; margin-left: 4px; color: var(--teal); }
.hcat-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 300;
  min-width: 240px;
  background: var(--cream);
  border: 1px solid var(--parchment);
  border-top: 2px solid var(--teal);
  padding: 6px 0;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}
.hcat-dd:hover .hcat-dd-menu { display: block; }
.hcat-dd-item {
  display: block;
  padding: 10px 18px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.hcat-dd-item:hover { color: var(--teal); background: rgba(255,255,255,0.04); }

/* Hamburger + menú móvil (ocultos en escritorio) */
.nav-toggle { display: none; }
.mobile-nav { display: none; }

/* ══════════════════════════════════════════
   PAGE HERO — encabezado de página interna
══════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 120px 56px 64px;
  border-bottom: 1px solid var(--parchment);
  background: var(--cream);
  overflow: hidden;
}
.page-hero.has-img::before {
  content: ''; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-image: var(--hero-img);
  opacity: 0.78; z-index: 0;
}
.page-hero.has-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(7,7,10,0.28), rgba(7,7,10,0.66));
  z-index: 0;
}
.page-hero > * { position: relative; z-index: 1; }
.breadcrumb {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--stone); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span { color: var(--mist); }
.ph-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--teal); font-weight: 500; margin-bottom: 20px;
}
.ph-kicker::before { content: ''; width: 28px; height: 1.5px; background: var(--teal); }
.ph-title {
  font-size: clamp(34px, 5.4vw, 64px); font-weight: 200;
  line-height: 1.06; letter-spacing: 0.02em; color: var(--ink);
  max-width: 18ch; text-transform: uppercase;
}
.ph-title em { font-style: normal; color: var(--teal); }
.ph-intro {
  margin-top: 22px; font-size: clamp(14px, 1.4vw, 17px);
  color: var(--stone); line-height: 1.75; max-width: 60ch; font-weight: 300;
}
.ph-meta {
  margin-top: 26px; display: flex; gap: 26px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: 0.14em; color: var(--mist); text-transform: uppercase;
}
.ph-meta strong { color: var(--ink); font-weight: 500; }

/* ══════════════════════════════════════════
   SECTION SCAFFOLD
══════════════════════════════════════════ */
.section { padding: 64px 56px; border-bottom: 1px solid var(--parchment); }
.section.tight { padding: 44px 56px; }
.section.alt { background: var(--cream); }
.section-head {
  display: flex; align-items: center; gap: 20px; margin-bottom: 40px;
}
.sh-label {
  font-size: 9px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--ink); font-weight: 500; white-space: nowrap;
}
.sh-rule { flex: 1; height: 1px; background: var(--parchment); }
.sh-more {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal); cursor: pointer; font-weight: 500; text-decoration: none;
  transition: color 0.15s;
}
.sh-more:hover { color: var(--teal-mid); }
.lead {
  font-size: clamp(15px, 1.5vw, 19px); font-weight: 300;
  color: var(--ink); line-height: 1.75; max-width: 70ch;
}
.prose p { font-size: 14.5px; color: var(--stone); line-height: 1.85; margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 13px 26px; cursor: pointer; font-weight: 500;
  text-decoration: none; border: 1px solid transparent;
  font-family: var(--sans); transition: all 0.2s;
}
.btn-primary { background: var(--nautical); color: #fff; }
.btn-primary:hover { background: var(--gunmetal); }
.btn-dark { background: var(--dark); color: var(--ink); }
.btn-dark:hover { background: var(--nautical); color: #fff; }
.btn-ghost { border-color: var(--parchment); color: var(--ink); background: none; }
.btn-ghost:hover { background: var(--nautical); border-color: var(--nautical); color: #fff; }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { filter: brightness(1.12); }

/* ══════════════════════════════════════════
   ARTICLE CARDS / GRID
══════════════════════════════════════════ */
.grid { display: grid; gap: 1px; background: var(--parchment); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.acard {
  background: var(--ink-mid); cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.acard:hover { background: var(--parchment); }
.acard-thumb { height: 200px; position: relative; overflow: hidden; }
.acard-thumb img,
.acard-thumb .ph-bg {
  width: 100%; height: 100%; object-fit: cover;
  background-size: cover; background-position: center;
  transition: transform 0.5s ease;
}
.acard:hover .acard-thumb img,
.acard:hover .acard-thumb .ph-bg { transform: scale(1.06); }
.acard-tag {
  position: absolute; bottom: 12px; left: 14px;
  background: rgba(7,7,10,0.82); padding: 5px 11px;
  font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--stone); font-weight: 500;
}
.acard-body { padding: 26px 28px 24px; display: flex; flex-direction: column; flex: 1; }
.acard-cat {
  font-size: 8px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 11px; font-weight: 500;
}
.acard-title {
  font-size: 18px; font-weight: 300; color: var(--ink);
  line-height: 1.32; margin-bottom: 12px;
}
.acard-excerpt { font-size: 12.5px; color: var(--stone); line-height: 1.7; margin-bottom: 20px; }
.acard-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 15px; border-top: 1px solid var(--parchment); margin-top: auto;
}
.acard-meta { font-size: 9.5px; color: var(--mist); letter-spacing: 0.06em; }
.acard-arrow { font-size: 14px; color: var(--teal); transition: transform 0.2s; }
.acard:hover .acard-arrow { transform: translateX(4px); }

/* Featured wide card */
.feature-row {
  display: grid; grid-template-columns: 1.2fr 1fr;
  border: 1px solid var(--parchment); background: var(--ink-mid);
}
.feature-row .fr-img { background-size: cover; background-position: center; min-height: 340px; }
.feature-row .fr-body { padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; }

/* ══════════════════════════════════════════
   STAT BLOCKS
══════════════════════════════════════════ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--parchment); }
.stat { background: var(--ink-mid); padding: 40px 32px; text-align: center; }
.stat-num {
  font-size: clamp(38px, 4.5vw, 58px); font-weight: 200;
  color: var(--teal); line-height: 1; letter-spacing: 0.01em;
}
.stat-label {
  margin-top: 14px; font-size: 9.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--stone);
}

/* ══════════════════════════════════════════
   PULL QUOTE
══════════════════════════════════════════ */
.pull-quote {
  padding: 72px 12vw; text-align: center;
  border-bottom: 1px solid var(--parchment);
  background: linear-gradient(rgba(94,16,20,0.88), rgba(74,10,14,0.94)),
              var(--pq-img, none) center/cover no-repeat fixed;
  background-color: var(--bordeaux);
}
.pq-text { font-size: clamp(19px, 2.4vw, 28px); font-weight: 300; color: var(--oatstone); line-height: 1.55; margin-bottom: 20px; }
.pq-rule { width: 40px; height: 1.5px; background: var(--gold); margin: 0 auto 14px; }
.pq-attr { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); font-weight: 500; }

/* ══════════════════════════════════════════
   TIMELINE / STAGES
══════════════════════════════════════════ */
.timeline { border-top: 1px solid var(--parchment); }
.tl-item {
  display: grid; grid-template-columns: 130px 1fr auto;
  gap: 30px; padding: 30px 0; border-bottom: 1px solid var(--parchment);
  align-items: center; cursor: pointer; transition: background 0.15s;
}
.tl-item:hover { background: var(--cream); }
.tl-day { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.tl-day b { display: block; font-size: 30px; font-weight: 200; color: var(--ink); letter-spacing: 0; margin-top: 4px; }
.tl-title { font-size: 19px; font-weight: 300; color: var(--ink); }
.tl-desc { font-size: 12.5px; color: var(--stone); margin-top: 6px; line-height: 1.6; }
.tl-km { font-size: 11px; letter-spacing: 0.12em; color: var(--mist); text-transform: uppercase; white-space: nowrap; }

/* ══════════════════════════════════════════
   ACCORDION (FAQ)
══════════════════════════════════════════ */
.accordion { border-top: 1px solid var(--parchment); }
.acc-item { border-bottom: 1px solid var(--parchment); }
.acc-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 24px 4px; cursor: pointer; font-family: var(--sans);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 15px; font-weight: 300; color: var(--ink);
}
.acc-q:hover { color: var(--teal); }
.acc-icon { font-size: 20px; color: var(--teal); transition: transform 0.25s; flex-shrink: 0; }
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height 0.32s ease; }
.acc-a-inner { padding: 0 4px 26px; font-size: 13px; color: var(--stone); line-height: 1.8; }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--stone); font-weight: 500;
}
.field label .req { color: var(--coral); }
.field input, .field select, .field textarea {
  background: var(--cream); border: 1px solid var(--parchment);
  padding: 13px 16px; font-size: 13px; color: var(--ink);
  font-family: var(--sans); outline: none; transition: border-color 0.2s;
  font-weight: 300;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field input::placeholder, .field textarea::placeholder { color: var(--mist); }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888A0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.field-check { display: flex; gap: 11px; align-items: flex-start; }
.field-check input { width: 16px; height: 16px; accent-color: var(--teal); flex-shrink: 0; margin-top: 1px; }
.field-check label { font-size: 11px; letter-spacing: 0.02em; text-transform: none; color: var(--stone); line-height: 1.6; }
.field-error { font-size: 10px; color: var(--coral); display: none; letter-spacing: 0.04em; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--coral); }
.field.invalid .field-error { display: block; }
.form-note { font-size: 10.5px; color: var(--mist); }

/* ══════════════════════════════════════════
   MODAL / POPUP
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,5,8,0.86); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--cream); border: 1px solid var(--parchment);
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.98); transition: transform 0.3s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal.wide { width: min(880px, 100%); }
.modal-head {
  padding: 26px 32px; border-bottom: 1px solid var(--parchment);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--teal); font-weight: 500;
}
.modal-close {
  background: none; border: 1px solid var(--parchment); color: var(--stone);
  width: 32px; height: 32px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.modal-close:hover { background: var(--nautical); border-color: var(--nautical); color: #fff; }
.modal-body { padding: 32px; }
.modal-feedback { text-align: center; padding: 48px 32px; }
.modal-feedback .mf-icon {
  width: 64px; height: 64px; border: 1.5px solid var(--teal); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--teal); margin: 0 auto 24px;
}
.modal-feedback h4 { font-size: 22px; font-weight: 300; color: var(--ink); margin-bottom: 12px; }
.modal-feedback p { font-size: 13px; color: var(--stone); line-height: 1.7; max-width: 38ch; margin: 0 auto; }

/* Search modal */
.search-box { display: flex; border: 1px solid var(--parchment); }
.search-box input {
  flex: 1; background: var(--cream); border: none; outline: none;
  padding: 16px 18px; font-size: 15px; color: var(--ink); font-family: var(--sans); font-weight: 300;
}
.search-box button { background: var(--nautical); border: none; color: #fff; padding: 0 22px; cursor: pointer; }
.search-suggest { margin-top: 24px; }
.search-suggest p { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mist); margin-bottom: 14px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.search-tags a {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); border: 1px solid var(--parchment); padding: 8px 14px;
  text-decoration: none; transition: all 0.15s;
}
.search-tags a:hover { background: var(--nautical); border-color: var(--nautical); color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(5,5,8,0.96); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s; padding: 40px;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border: 1px solid var(--parchment); }
.lb-cap { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; background: rgba(7,7,10,0.6);
  border: 1px solid var(--parchment); color: var(--ink); cursor: pointer;
  font-size: 22px; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.lb-nav:hover { background: var(--nautical); border-color: var(--nautical); }
.lb-prev { left: 28px; } .lb-next { right: 28px; }
.lb-close { position: absolute; top: 24px; right: 28px; width: 44px; height: 44px;
  background: none; border: 1px solid var(--parchment); color: var(--ink);
  cursor: pointer; font-size: 18px; }
.lb-close:hover { background: var(--nautical); border-color: var(--nautical); }

/* ══════════════════════════════════════════
   CTA STRIP
══════════════════════════════════════════ */
.cta-strip {
  padding: 64px 56px; text-align: center;
  background: linear-gradient(rgba(0,66,94,0.90), rgba(0,46,66,0.96)),
              var(--cta-img, none) center/cover no-repeat;
  background-color: var(--nautical);
  border-bottom: 1px solid var(--parchment);
}
.cta-strip h2 { font-size: clamp(24px, 3vw, 38px); font-weight: 200; color: var(--ink); margin-bottom: 14px; }
.cta-strip p { font-size: 14px; color: var(--stone); max-width: 52ch; margin: 0 auto 30px; line-height: 1.7; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   FOOTER (inyectado por rmc.js)
══════════════════════════════════════════ */
footer.rmc-foot { background: var(--dark); padding: 56px 56px 32px; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 28px;
}
.ft-logo { margin-bottom: 4px; text-decoration: none; display: inline-block; line-height: 0; }
.ft-logo img { height: 80px; width: auto; display: block; }
.ft-tagline { font-size: 13px; color: rgba(255,255,255,0.35); line-height: 1.6; margin-bottom: 20px; }
.ft-social { display: flex; gap: 12px; }
.ft-social-btn {
  width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: rgba(255,255,255,0.4); cursor: pointer;
  transition: all 0.15s; font-weight: 500; text-decoration: none;
}
.ft-social-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.ft-col-title { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 18px; }
.ft-links { display: flex; flex-direction: column; gap: 11px; }
.ft-links a { font-size: 12px; color: rgba(255,255,255,0.4); text-decoration: none; cursor: pointer; transition: color 0.15s; }
.ft-links a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.ft-copy { font-size: 10px; color: rgba(255,255,255,0.2); letter-spacing: 0.05em; }
.ft-lang { display: flex; gap: 14px; }
.ft-lang a { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.3); text-decoration: none; cursor: pointer; }
.ft-lang a.active { color: var(--teal-mid); }

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* Back to top */
.to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 150;
  width: 44px; height: 44px; background: var(--dark);
  border: 1px solid var(--parchment); color: var(--stone);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all 0.25s; font-size: 16px;
}
.to-top.show { opacity: 1; pointer-events: all; }
.to-top:hover { background: var(--nautical); border-color: var(--nautical); color: #fff; }

/* ══════════════════════════════════════════
   ARTICLE PAGE
══════════════════════════════════════════ */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 64px 24px 80px; }
.article-body h2 { font-size: 24px; font-weight: 300; color: var(--ink); margin: 42px 0 16px; }
.article-body h3 { font-size: 17px; font-weight: 500; color: var(--ink); margin: 32px 0 12px; letter-spacing: 0.04em; }
.article-body p { font-size: 16px; color: #C4C4D0; line-height: 1.9; margin-bottom: 22px; }
.article-body p:first-of-type::first-letter {
  font-size: 64px; font-weight: 200; color: var(--teal);
  float: left; line-height: 0.82; margin: 6px 12px 0 0; font-family: 'Times New Roman', serif;
}
.article-body strong { color: var(--ink); font-weight: 500; }
.article-body figure { margin: 36px 0; }
.article-body figure img { width: 100%; border: 1px solid var(--parchment); }
.article-body figcaption { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); margin-top: 10px; text-align: center; }
.article-body blockquote {
  border-left: 2px solid var(--gold); padding: 6px 0 6px 28px; margin: 32px 0;
  font-size: 21px; font-weight: 300; color: var(--ink); line-height: 1.5;
}
.article-pull { padding: 6px 0; }
.article-meta-bar {
  display: flex; gap: 24px; flex-wrap: wrap; padding: 20px 0;
  border-top: 1px solid var(--parchment); border-bottom: 1px solid var(--parchment);
  margin-bottom: 40px; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mist);
}
.article-meta-bar strong { color: var(--ink); font-weight: 500; }
.share-row { display: flex; gap: 10px; align-items: center; margin: 44px 0; }
.share-row span { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mist); }
.share-btn {
  width: 34px; height: 34px; border: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--stone); cursor: pointer; transition: all 0.15s; background: none;
}
.share-btn:hover { background: var(--nautical); border-color: var(--nautical); color: #fff; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row .fr-img { min-height: 240px; }
}
@media (max-width: 768px) {
  .edition-bar { padding: 7px 16px; grid-template-columns: 1fr auto; }
  .eb-left { display: none; }
  .eb-center { font-size: 8.5px; letter-spacing: 0.14em; text-align: left; }
  .eb-right { font-size: 8.5px; letter-spacing: 0.12em; }

  .header-top { height: 70px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
  .header-nav-left, .header-nav-right { display: none; }
  .logo-center { order: 0; padding-bottom: 0; text-align: left; } .masthead-logo { margin: 0; }
  .masthead-logo img { height: 50px; }
  .ft-logo img { height: 84px; }
  .logo-type-main { font-size: 18px; letter-spacing: 0.2em; }
  /* En móvil toda la navegación vive en el menú hamburguesa → barra de categorías oculta */
  .header-cats { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none;
    border: none; cursor: pointer; padding: 8px; order: 5; z-index: 320;
  }
  .nav-toggle span {
    width: 24px; height: 2px; background: var(--ink); border-radius: 2px; display: block;
    transition: transform .32s cubic-bezier(.6,.05,.28,.99), opacity .2s; transform-origin: center;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav {
    display: flex; flex-direction: column; justify-content: center;
    position: fixed; inset: 0; z-index: 310;
    background: linear-gradient(165deg, #1b1a18 0%, #0c0b0a 100%);
    padding: 96px 34px 48px; transform: translateX(100%); opacity: 0;
    transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .35s ease; overflow-y: auto;
  }
  .mobile-nav.open { transform: translateX(0); opacity: 1; }
  .mobile-nav a {
    display: block; padding: 15px 0; border-bottom: 1px solid var(--parchment);
    font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink); text-decoration: none; font-weight: 300;
    opacity: 0; transform: translateX(30px);
    transition: opacity .45s ease, transform .5s cubic-bezier(.16,1,.3,1), color .15s;
  }
  .mobile-nav.open a { opacity: 1; transform: translateX(0); }
  .mobile-nav.open a:nth-child(2){transition-delay:.06s}
  .mobile-nav.open a:nth-child(3){transition-delay:.11s}
  .mobile-nav.open a:nth-child(4){transition-delay:.16s}
  .mobile-nav.open a:nth-child(5){transition-delay:.21s}
  .mobile-nav.open a:nth-child(6){transition-delay:.26s}
  .mobile-nav.open a:nth-child(7){transition-delay:.31s}
  .mobile-nav.open a:nth-child(8){transition-delay:.36s}
  .mobile-nav.open a:nth-child(9){transition-delay:.41s}
  .mobile-nav.open a:nth-child(10){transition-delay:.46s}
  .mobile-nav.open a:nth-child(11){transition-delay:.51s}
  .mobile-nav.open a:nth-child(12){transition-delay:.56s}
  .mobile-nav a:hover, .mobile-nav a:active { color: var(--gold); }
  .mn-close { position: absolute; top: 20px; right: 20px; background: none;
    border: 1px solid var(--parchment); color: var(--ink); width: 40px; height: 40px;
    font-size: 18px; cursor: pointer; border-radius: 50%; transition: all .2s; }
  .mn-close:hover { border-color: var(--gold); color: var(--gold); }

  .page-hero { padding: 56px 20px 44px; }
  .section { padding: 44px 20px; }
  .section.tight { padding: 32px 20px; }
  .section-head { margin-bottom: 28px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .feature-row .fr-body { padding: 32px 22px; }
  .pull-quote { padding: 48px 22px; }
  .cta-strip { padding: 48px 20px; }
  .tl-item { grid-template-columns: 76px 1fr; gap: 18px; }
  .tl-km { grid-column: 2; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  footer.rmc-foot { padding: 40px 20px 26px; }
  .modal-body { padding: 24px; }
  .article-wrap { padding: 44px 20px 60px; }
  .article-body p:first-of-type::first-letter { font-size: 50px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
}

/* ── Espacios publicitarios (placeholder) ── */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; color: var(--mist); margin: 0 auto;
  border: 1px dashed var(--parchment);
  background: repeating-linear-gradient(45deg, transparent, transparent 11px, rgba(176,173,166,0.035) 11px, rgba(176,173,166,0.035) 22px);
}
.ad-slot .ad-label { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--stone); }
.ad-slot .ad-dim   { font-size: 9px;  letter-spacing: 0.18em; color: var(--mist); }
/* El banner ocupa el ancho disponible y su alto se calcula por aspect-ratio,
   así en móvil se reduce conservando la proporción exacta (no se rompe). */
.ad-leaderboard { width: 100%; margin: 40px auto; }
.ad-970x250 { max-width: 970px; aspect-ratio: 970 / 250; }   /* 3.88 : 1 */
.ad-728x90  { max-width: 728px; aspect-ratio: 728 / 90;  }   /* 8.09 : 1 (desktop) */
.ad-inline  { max-width: 760px; aspect-ratio: 760 / 250; margin: 0 auto 8px; }
.ad-vertical { width: 100%; margin: 0 auto; }
.ad-300x600  { max-width: 300px; aspect-ratio: 300 / 600; }
.ad-slot.ad-has-img { aspect-ratio: auto; border: none; background: none; }
.ad-square  { width: 100%; margin: 0 auto; }
.ad-300x300 { max-width: 300px; aspect-ratio: 1 / 1; }
.ad-500x500 { max-width: 500px; aspect-ratio: 1 / 1; }
.ad-caption {
  display: block; text-align: center; margin-top: 4px;
  font-size: 8.5px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mist);
}
.ad-billboard { width: 100%; max-width: 970px; aspect-ratio: 970 / 250; margin: 8px auto 0; }
.ad-dim-mobile { display: none; }
@media (max-width:768px){
  .ad-leaderboard { margin: 28px auto; }
  .ad-slot .ad-label { font-size: 9px; }
  .ad-slot .ad-dim   { font-size: 8px; }
  .ad-slot { gap: 4px; }
  /* En móvil el 728×90 (muy delgado) se sustituye por Rectángulo 300×250 */
  .ad-m-300x250 { max-width: 300px; aspect-ratio: 300 / 250; }
  .ad-dim-desktop { display: none; }
  .ad-dim-mobile  { display: block; }
}
.ad-wrap { padding: 0 24px; }
@media (max-width:768px){ .ad-wrap { padding: 0 16px; } }

/* ── Columna vertical junto al texto en páginas de sección (2026-07-08) ──
   ⚠️ Mantener AL FINAL del archivo (cascada: debe ganar a las reglas base). */
.art-cols.has-vad { display: flex; justify-content: center; align-items: flex-start; gap: 44px; padding: 0 24px; }
.art-cols.has-vad .article-wrap { margin: 0; min-width: 0; }
.art-vad { flex: 0 0 300px; position: sticky; top: 96px; padding-top: 34px; }
.art-vad .ad-wrap { padding: 0; }
@media (max-width: 1024px) {
  /* Sin espacio lateral: el vertical baja debajo del texto, centrado */
  .art-cols.has-vad { display: block; padding: 0; }
  .art-vad { position: static; padding: 28px 16px 0; }
}

/* ── Grid filtrado con pocas notas: centrado, sin hueco lateral ── */
.grid-3.few-1 { grid-template-columns: minmax(0, 440px); justify-content: center; }
.grid-3.few-2 { grid-template-columns: repeat(2, minmax(0, 440px)); justify-content: center; }
@media (max-width: 768px) {
  .grid-3.few-1, .grid-3.few-2 { grid-template-columns: 1fr; }
}

/* ── Cuadrado 500 integrado (2026-07-08): módulo del grid "Seguir leyendo"
   y columna de la franja del boletín. Mantener AL FINAL (cascada). ── */
.grid-3.has-adcard { grid-template-columns: 340px repeat(3, 1fr); }
.grid-adcard {
  background: var(--ink-mid); border: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.grid-adcard .ad-wrap { padding: 0; width: 100%; }
.cta-strip.has-sq { display: flex; align-items: stretch; padding: 0; }
.cta-strip.has-sq .cta-inner {
  flex: 1; padding: 64px 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.cta-ad {
  flex: 0 0 356px; background: var(--ivory); border-left: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center; padding: 28px;
}
.cta-ad .ad-wrap { padding: 0; }
@media (max-width: 1100px) {
  .grid-3.has-adcard { grid-template-columns: 1fr 1fr; }
  .grid-adcard { grid-column: 1 / -1; order: 9; }
}
@media (max-width: 1024px) {
  .cta-strip.has-sq { display: block; padding: 0; }
  .cta-strip.has-sq .cta-inner { padding: 48px 20px; }
  .cta-ad { border-left: none; border-top: 1px solid var(--parchment); padding: 24px 16px; }
}
@media (max-width: 768px) {
  .grid-3.has-adcard { grid-template-columns: 1fr; }
}
