/* ROADTRIP-ONLINE.COM — nuevo sitio estático
   Dos temas con la MISMA estructura: beige (todos los viajes) y negro
   (solo Amérique du Sud). Tipografía: Avenir Next en todos los textos.
   Colores tomados del sitio viejo: beige #E7D7A6, texto #3D3423,
   enlaces #6B5636, nav #344C74; negro: fondo #070604, texto #EDE2A2.
   (Texto beige oscurecido 2026-11-14 para legibilidad: el #73654C viejo
   daba solo 3.97:1 sobre el beige; #3D3423 da 8.56:1 y el enlace
   #6B5636 da 4.87:1, ambos ≥4.5:1 WCAG AA.)
   (Peso 2026-11-14: el texto de historias/notas pasó de Light 300 a
   Regular 400 en AMBOS temas — el problema de legibilidad era el grosor,
   no solo el color. Títulos 700, subtítulos 600, enlaces 500, cuerpo 400.) */

:root {
  --font: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tap: 44px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  background-color: #000;
  color: var(--text);
}

/* ---------- Temas ---------- */
body.theme-beige {
  --content-bg: #E7D7A6;
  --text: #3D3423;
  --link: #6B5636;
  --link-visited: #5F4A2E;
  --link-hover: #4A3A22;
  --nav: #344C74;
  --footer: #204373;
  --rule: #4F3919;
  --rule-soft: #C9B67E;
  --box-bg: #EFE3BC;
  --topbar-bg: rgba(20, 14, 4, 0.92);
  --topbar-text: #E7D7A6;
  --menu-bg: #1A1408;
  --menu-text: #EDE2A2;
  --menu-link: #E7D7A6;
  --maxw: 720px;
  background-image: url("../design/bg.jpg");
  background-repeat: repeat;
}

body.theme-black {
  --content-bg: #070604;
  --text: #EDE2A2;
  --link: #E3E3E3;
  --link-visited: #C0C0C0;
  --link-hover: #FFFFFF;
  --nav: #E3E3E3;
  --footer: #100D0A;
  --rule: #3A2F1A;
  --rule-soft: #2A2210;
  --box-bg: #0E0B06;
  --topbar-bg: rgba(7, 6, 4, 0.94);
  --topbar-text: #EDE2A2;
  --menu-bg: #0E0B06;
  --menu-text: #EDE2A2;
  --menu-link: #EDE2A2;
  --maxw: 920px;
  background-image: url("../design/ouest_canada/bg.jpg");
  background-repeat: repeat;
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link-visited); }
a:hover, a:focus-visible { color: var(--link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

/* ---------- Barra superior + menú hamburguesa ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 6px 12px;
  background: var(--topbar-bg);
  color: var(--topbar-text);
}
.topbar .brand {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--topbar-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .brand span { font-weight: 300; letter-spacing: 0.05em; font-size: 0.8rem; opacity: 0.85; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-current {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
  opacity: 0.9;
}
.burger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--topbar-text);
}
.burger .bar { display: block; width: 22px; height: 2px; background: currentColor; }
.burger[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.burger .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 61;
  width: min(320px, 88vw);
  height: 100dvh;
  overflow-y: auto;
  background: var(--menu-bg);
  color: var(--menu-text);
  padding: 16px 18px 32px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}
.menu-panel[hidden] { display: none; }
.menu-panel h2 {
  margin: 4px 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.menu-panel nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.menu-panel nav li { border-bottom: 1px solid var(--rule-soft); }
.menu-panel nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--menu-link);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.menu-panel nav a:hover { text-decoration: underline; }
.menu-lang { display: flex; gap: 8px; margin: 4px 0 6px; }
.menu-lang a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border: 1px solid var(--menu-text);
  border-radius: 6px;
  color: var(--menu-link);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.menu-lang a[aria-current="true"] { background: var(--menu-text); color: var(--menu-bg); }
.menu-note { font-size: 0.8rem; opacity: 0.75; margin: 0; }

/* ---------- Marco de la página ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto 24px;
  background: var(--content-bg);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}
.banner { display: block; line-height: 0; }
.banner img { display: block; width: 100%; height: auto; }
.separator { display: block; width: 100%; height: 2px; }

/* Nav clásica (escritorio; en móvil queda el menú hamburguesa) */
.classic-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.classic-nav a { color: var(--nav); text-decoration: none; }
.classic-nav a:hover { text-decoration: underline; }
.classic-nav .sep { opacity: 0.5; }

/* ---------- Dos columnas ---------- */
.layout { display: grid; grid-template-columns: 1fr; }
.content { padding: 8px 18px 24px; min-width: 0; }
.sidebar {
  padding: 8px 18px 24px;
  font-size: 0.85rem;
}
.side-box {
  border: 1px solid var(--rule-soft);
  background: var(--box-bg);
  padding: 12px;
  margin-bottom: 16px;
}
.side-box h2, .side-box h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.side-box p { margin: 0 0 8px; }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li { margin-bottom: 4px; }
.side-box a { font-weight: 400; }
.side-box .thumb { display: block; margin: 4px auto; max-width: 100%; height: auto; }

/* ---------- Contenido de historias ---------- */
.story-head { margin: 12px 0 4px; }
.story-head .date-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.story-head .date-line img { flex: none; }
h1 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}
h2 { font-size: 1.1rem; font-weight: 600; }
.content p { margin: 0 0 14px; }
.content ul { margin: 0 0 14px; padding-left: 22px; }
.content li { margin-bottom: 4px; }

figure { margin: 0 0 16px; }
figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule-soft);
}
figure a { display: block; line-height: 0; }
figcaption {
  margin-top: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}
figcaption a { text-decoration: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair figure { margin-bottom: 0; }

/* La foto del "trajet du jour" (mapa de la ruta del día, pie "Voici le
   trajet du jour!") va a ancho completo de la columna de la historia, no
   en media columna de la rejilla .pair. La clase .route-map la añade
   site.js al cargar (el pie de foto es el marcador, igual en FR/ES/EN);
   el CSS la hace ocupar las dos columnas de la rejilla. */
.pair figure.route-map { grid-column: 1 / -1; }

/* Las figuras de las rejillas no deben imponer el ancho intrínseco de la
   foto como mínimo de columna: hay fotos de hasta 4884 px de ancho y, sin
   min-width: 0, la columna 1fr se estiraba hasta el ancho de la foto en
   algunos navegadores (Safari) y la página quedaba más ancha que la
   pantalla, con las fotos enormes. */
.pair, .gallery { min-width: 0; }
.pair figure, .gallery figure { min-width: 0; }
.sidebar { min-width: 0; }

/* ---------- AdSense ---------- */
.ads { text-align: center; margin: 16px 0; overflow: hidden; }
.ads ins { display: block; }
/* Un slot responsive sin anuncio no debe dejar un hueco vacío: AdSense
   marca el slot con data-ad-status="unfilled" cuando no hay anuncio; en
   ese caso se oculta el slot (y su contenedor .ads con :has, para quitar
   también los márgenes). El !important vence al display:block en línea
   del <ins>. Sin esto, el slot reservaba ~400 px de alto vacío arriba de
   cada historia. */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ads:has(> ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* ---------- Prev / Next ---------- */
.story-nav {
  display: flex;
  gap: 10px;
  margin: 22px 0 8px;
}
.story-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 10px;
  border: 1px solid var(--rule);
  color: var(--nav);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-align: center;
}
.story-nav a:hover { background: var(--box-bg); }
.story-nav a.disabled { visibility: hidden; }

/* ---------- Mapa de destinos ---------- */
.dest-map { margin: 22px 0 8px; border-top: 1px solid var(--rule-soft); padding-top: 14px; }
.dest-map h2 { margin: 0 0 10px; font-size: 0.95rem; letter-spacing: 0.06em; }
.dest-map ol { margin: 10px 0 0; padding-left: 24px; }
.dest-map li { margin-bottom: 3px; }

/* ---------- Listas de viajes / tarjetas ---------- */
.trip-list { list-style: none; margin: 0; padding: 0; }
.trip-list li { margin-bottom: 18px; }
.trip-card { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; }
.trip-card img { border: 1px solid var(--rule-soft); }
.trip-card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.trip-card h2 a { color: var(--nav); text-decoration: none; }
.trip-card h2 a:hover { text-decoration: underline; }
.trip-card .trip-dates { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; margin: 0 0 6px; }
.trip-card p { margin: 0 0 6px; font-size: 0.95rem; }
.trip-card .trip-stats { font-size: 0.8rem; opacity: 0.85; margin: 0 0 6px; }
.trip-card .more { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; }
.badge-soon {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 9px;
}

.story-index { list-style: none; margin: 0; padding: 0; }
.story-index li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.story-index .idx-date { flex: none; width: 92px; font-size: 0.82rem; font-weight: 500; }
.story-index a { font-weight: 500; }

/* ---------- Pie ---------- */
footer { border-top: 1px solid var(--rule-soft); padding: 0 0 18px; }
footer .footer-banner { display: block; line-height: 0; }
footer .footer-banner img { display: block; width: 100%; height: auto; }
.footer-inner { padding: 14px 18px 0; }
footer h2 { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; margin: 0 0 8px; }
.footer-trips { list-style: none; margin: 0 0 16px; padding: 0; }
.footer-trips li { margin-bottom: 2px; }
.footer-nav { list-style: none; margin: 0 0 16px; padding: 0; }
.footer-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; }
.copy { font-size: 0.78rem; opacity: 0.8; margin: 0; }

/* ---------- Mapa de destinos (imagen con mapa de imagen nativo) ---------- */
.map-wrap { overflow-x: auto; margin: 0 0 6px; }
/* El mapa de destinos es de 695 px: en móvil debe ajustarse al ancho de
   la pantalla en vez de desbordarla (las coordenadas <area> las reescala
   assets/js/site.js para que sigan funcionando). */
.map-wrap img { width: 100%; max-width: 695px; height: auto; }

/* ---------- Galería Westfalia ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 0.68rem; letter-spacing: 0.04em; }

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .layout { grid-template-columns: 1fr 190px; }
  .sidebar { border-left: 1px solid var(--rule-soft); padding-top: 12px; }
  .footer-trips { columns: 2; }
  .content { padding: 8px 22px 24px; }
}
@media (max-width: 759px) {
  .classic-nav { display: none; }
  .trip-card { grid-template-columns: 104px 1fr; gap: 10px; }
  .pair { grid-template-columns: 1fr; }
  .story-nav { flex-direction: column; }
  .story-nav a.disabled { display: none; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
