/* =========================================================
   TOUR DETALLE — estilos propios de esta página
   (usa variables, header/footer y widget de accesibilidad de styles.css)

   Índice
   1. Contenedor y fondo
   2. Galería (marco + miniaturas)
   3. Panel de información (título, scroll, botón)
   4. Tarjetas de requisitos / condiciones
   5. Botón de reserva
   6. Estado "no encontrado"
   7. Responsive
   ========================================================= */

.site-header--solid { background: var(--green-mid); }

/* ---------- 1. Contenedor y fondo ---------- */
.tour-detail {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 120px;
  overflow: hidden;
}
.tour-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-heading);
}
.tour-back:hover { text-decoration: underline; }

.tour-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.tour-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(42%, 380px);
  height: 90px;
  pointer-events: none;
  z-index: 0;
}
.tour-detail-grid, .tour-back { position: relative; z-index: 1; }


/* ---------- 2. Galería ---------- */
.tour-frame {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
}
.tour-frame-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity .25s var(--ease-smooth);
}
.tour-frame-img--next {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity .9s ease-in-out;   /* mismo valor que FADE_MS en el JS */
}
.tour-frame-img--next.is-visible { opacity: 1; }

.tour-thumbs {
  position: relative;
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--green-mid) transparent;
}
.tour-thumbs:empty { display: none; }
.tour-thumb {
  flex: 0 0 auto;
  width: 84px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
  cursor: pointer;
  opacity: .72;
  transition: opacity .25s var(--ease-smooth), border-color .25s var(--ease-smooth), transform .25s var(--ease-smooth);
}
.tour-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tour-thumb:hover { opacity: 1; transform: translateY(-2px); }
.tour-thumb[aria-pressed="true"] { opacity: 1; border-color: var(--green-mid); }
.tour-thumb:focus-visible,
.tour-scroll:focus-visible,
.btn-reserve:focus-visible,
.tour-back:focus-visible { outline: 3px solid var(--green-heading); outline-offset: 3px; }


/* ---------- 3. Panel de información ---------- */
.tour-gallery, .tour-info { min-width: 0; }
.tour-info, .tour-info-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tour-info-title {
  flex: 0 0 auto;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  letter-spacing: .5px;
  color: var(--green-heading);
}
.tour-scroll {
  flex: none;
  max-height: clamp(300px, 56vh, 480px); /* alto del área con scroll */
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 14px;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--green-mid) var(--cream);
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  -webkit-overflow-scrolling: touch;
}
.tour-scroll::-webkit-scrollbar { width: 8px; }
.tour-scroll::-webkit-scrollbar-track { background: var(--cream); border-radius: 8px; }
.tour-scroll::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 8px; }

.tour-scroll.has-more { /* difumina el borde inferior: indica que hay más por leer */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.tour-description p + p { margin-top: 12px; }
.tour-facts {
  margin: 18px 0 0 18px;
  padding: 0;
  list-style: disc;
}
.tour-facts li { margin-bottom: 4px; }
.tour-facts strong { color: var(--ink); font-weight: 700; }
.tour-facts ul { margin: 2px 0 2px 18px; list-style: circle; }

.tour-block { margin-top: 26px; }
.tour-block h2 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: var(--green-heading);
}


/* ---------- 4. Tarjetas ---------- */
.info-cards { display: grid; gap: 10px; }
.info-card {
  padding: 12px 16px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-left: 8px solid var(--green-mid);
  border-radius: 10px;
}
.info-card h3 { font-size: .9rem; color: var(--ink); margin-bottom: 2px; }
.info-card p { font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }


/* ---------- Duración y precio (fijos, sobre el botón) ---------- */
.tour-meta {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 18px;
  padding: 10px 16px;
  background: var(--cream);
  border-radius: 10px;
}
.tour-meta[hidden] { display: none; }
.tour-meta-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tour-meta-label { font-size: .78rem; color: var(--ink-soft); }
.tour-meta-value { font-size: 1rem; color: var(--green-heading); }

/* Botón "Aquí se realizará" (ocupa toda la fila dentro del panel) */
.tour-map-btn {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 22px;
  border: 2px solid var(--green-mid);
  border-radius: 999px;
  background: transparent;
  color: var(--green-heading);
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: background .3s var(--ease-smooth), color .3s var(--ease-smooth), transform .3s var(--ease-smooth);
}
.tour-map-btn svg { flex: 0 0 auto; }
.tour-map-btn:hover,
.tour-map-btn:focus-visible { background: var(--green-mid); color: #fff; }
.tour-map-btn:hover { transform: translateY(-2px); }
.tour-map-btn:focus-visible { outline: 3px solid var(--green-heading); outline-offset: 3px; }


/* ---------- 5. Botón de reserva ---------- */
.btn-reserve {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: center;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--green-mid);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  transition: transform .3s var(--ease-smooth), box-shadow .3s var(--ease-smooth), background .3s var(--ease-smooth);
}
.btn-reserve:hover { background: var(--green-heading); transform: translateY(-3px); box-shadow: 0 12px 22px rgba(0, 0, 0, .22); }


/* ---------- 6. No encontrado ---------- */
.tour-missing { position: relative; z-index: 1; text-align: center; padding: 60px 0 100px; }
.tour-missing h1 { color: var(--green-heading); margin-bottom: 10px; }
.tour-missing p { margin-bottom: 22px; }
.tour-missing[hidden], .tour-detail-grid[hidden], .tour-block[hidden] { display: none; }


/* ---------- Accesibilidad ---------- */
.a11y-reduce-motion .tour-frame-img,
.a11y-reduce-motion .tour-frame-img--next,
.a11y-reduce-motion .tour-thumb,
.a11y-reduce-motion .tour-map-btn,
.a11y-reduce-motion .btn-reserve { transition: none; }
.a11y-reduce-motion .tour-thumb:hover,
.a11y-reduce-motion .tour-map-btn:hover,
.a11y-reduce-motion .btn-reserve:hover { transform: none; }
.a11y-contrast .info-card, .a11y-contrast .tour-frame { border: 2px solid #000; }
.a11y-contrast .tour-map-btn { border-color: #000; color: #000; background: #fff; }
.a11y-contrast .tour-map-btn:hover,
.a11y-contrast .tour-map-btn:focus-visible { background: #000; color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .tour-frame-img, .tour-thumb, .tour-map-btn, .btn-reserve { transition: none; }
  .tour-map-btn:hover { transform: none; }
}


/* ---------- 7. Responsive ---------- */
@media (max-width: 900px) {
  /* minmax(0,1fr): evita que la tira de miniaturas ensanche la columna
     y empuje el texto fuera de la pantalla */
  .tour-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tour-info { min-height: 0; }
  .tour-scroll { flex: none; max-height: 420px; }
  .tour-wave { height: 60px; width: 55%; }
}
@media (max-width: 520px) {
  .tour-detail { padding: 24px 16px 100px; }
  .tour-thumb { width: 68px; }
  .btn-reserve { width: 100%; }
  .tour-scroll { max-height: 360px; padding-right: 10px; }
  .tour-info-title { font-size: 1.15rem; }
}
