/*
Theme Name: Boots, Bikes & Border Crossings (i18n + Dark + Dual Menus) — Fixed Full
Author: You
Description: Lightweight block theme with EN/ES switch, dark/light/auto toggle, dual nav menus, hero, PDF section, and About carousel.
Version: 1.8.3
License: GPL-2.0-or-later
Text Domain: boots-bikes
*/

/* ========== Base ========== */
:root {
  --maxw: 1200px;
  --accent: #ff4d4d;
  color-scheme: light dark;
}
html {
  font-size: 18px;
}
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  background: #fafafa;
  color: #222;
  line-height: 1.7;
  letter-spacing: 0.1px;
  margin: 0;
}
a {
  color: #0f62fe;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
figure {
  margin: 0;
}

/* ========== Layout global ========== */
.site-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ========== Header: título oculto con espacio reservado ========== */
.site-title-placeholder {
  display: block;
  width: 240px;
  height: 1px;
  visibility: hidden;
}
@media (max-width: 781px) {
  .site-title-placeholder {
    width: 0;
  }
}

/* “Mata” cualquier Site Title renderizado por el Editor de Sitio (DB) */
.wp-block-site-title,
.wp-block-site-title * {
  display: none !important;
}

/* ========== Navegación ========== */
.nav a {
  opacity: 0.85;
  padding: 10px 12px;
  display: inline-block;
  border-radius: 10px;
}
.nav a:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

/* Idioma (solo uno visible) */
html:not([lang^="es"]) .nav-es {
  display: none;
}
html[lang^="es"] .nav-en {
  display: none;
}

/* ========== Headings ========== */
h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}
h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-top: 1.5em;
}
h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

/* ========== Hero ========== */
.wp-block-cover {
  border-radius: 16px;
  overflow: hidden;
}
.wp-block-cover .wp-block-cover__inner-container {
  padding: 28px 16px 36px;
}

/* ========== Cards ========== */
.card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.wp-block-query .card {
  margin-bottom: 16px;
}

/* ========== Botones ========== */
.wp-block-button .wp-element-button {
  border-radius: 12px;
  padding: 12px 18px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wp-block-button .wp-element-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ========== PDF ========== */
.pdf-embed {
  aspect-ratio: 4/3;
  width: 100%;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
/* oculta cualquier preview inline, mantiene enlaces visibles */
iframe[src$=".pdf"],
iframe[src*=".pdf?"],
embed[type="application/pdf"],
embed[src$=".pdf"],
object[type="application/pdf"] {
  display: none !important;
}

/* ========== Footer ========== */
.footer {
  background: #111;
  color: #eee;
  padding: 40px 20px;
  text-align: center;
  border-top: 2px solid var(--accent);
  font-size: 14px;
  margin-top: 48px;
}
.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ========== Carrusel About ========== */
.about-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.about-carousel .swiper-wrapper,
.about-carousel .swiper-slide {
  height: 100%;
}
.about-carousel .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-carousel .swiper-button-next,
.about-carousel .swiper-button-prev {
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  width: 36px;
  height: 36px;
}
.about-carousel .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}
.about-carousel .swiper-pagination-bullet.swiper-pagination-bullet-active {
  opacity: 1;
}

/* ========== Switches (idioma/tema) ========== */
.lang-switch,
.theme-switch {
  display: flex;
  gap: 6px;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.lang-switch button,
.theme-switch button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.lang-switch button.active,
.theme-switch button.active {
  background: #0f62fe;
  color: #fff;
}

/* ========== i18n visibilidad ========== */
html:not([lang^="es"]) .i18n.es {
  display: none !important;
}
html[lang^="es"] .i18n.en {
  display: none !important;
}

/* ========== Komoot ========== */
.komoot-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  margin-bottom: 12px;
}
@media (prefers-color-scheme: dark) {
  .komoot-section a {
    text-decoration: underline;
  }
}

/* ========== Ajuste foto específica ========== */
img[src*="trekking-boots-mountain-trail.jpg"] {
  object-position: center 10%;
}

/* ========== Tema: Dark por preferencia ========== */
@media (prefers-color-scheme: dark) {
  body {
    background: #0f1115;
    color: #e8e8ea;
  }
  a {
    color: #8ab4ff;
  }
  .nav a:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  .card {
    background: #151821;
    border-color: #20242e;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
  .pdf-embed {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  }
  .footer {
    background: #0b0c10;
    color: #d6d6dc;
  }
  .lang-switch,
  .theme-switch {
    background: #151821;
    border-color: #20242e;
    box-shadow: none;
  }
}

/* ========== Tema: forzado con data-theme ========== */
html[data-theme="dark"] body {
  background: #0f1115;
  color: #e8e8ea;
}
html[data-theme="dark"] a {
  color: #8ab4ff;
}
html[data-theme="dark"] .nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .card {
  background: #151821;
  border-color: #20242e;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .pdf-embed {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .footer {
  background: #0b0c10;
  color: #d6d6dc;
}
html[data-theme="dark"] .lang-switch,
html[data-theme="dark"] .theme-switch {
  background: #151821;
  border-color: #20242e;
  box-shadow: none;
}

html[data-theme="light"] body {
  background: #fafafa;
  color: #222;
}
html[data-theme="light"] .card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .footer {
  background: #111;
  color: #eee;
}

/* ========== Responsive ========== */
@media (max-width: 800px) {
  .site-wrap {
    padding: 20px;
  }
}
