/* ============================================
   Turiexpress — Estilos específicos de tours
   ============================================ */

/* ---------- Hero del tour ---------- */
.tour-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding: 8rem 0 4rem;
  overflow: hidden;
  background: var(--hero) center/cover no-repeat;
}
.tour-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 50%, rgba(0,0,0,0.55) 0%, transparent 65%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.6) 100%);
}
.tour-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: var(--white);
  transition: var(--transition);
}
.back-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-4px);
}
.tour-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.tour-hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0.95;
  max-width: 600px;
  margin-bottom: 2rem;
}
.tour-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.tour-hero-meta div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}
.tour-hero-meta span { font-size: 1.1rem; }

/* ---------- Resumen ---------- */
.tour-summary {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}
.tour-summary strong { color: var(--primary); }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding: 0 0 2rem 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.timeline-content {
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.timeline-content:hover { transform: translateX(4px); border-color: var(--accent); }
.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.timeline-content p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Includes grid (tour) ---------- */
.includes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.includes-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.includes-card.not-included { border-color: var(--border); }
.includes-card h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.includes-card.not-included h3 { color: var(--text-muted); }
.includes-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.includes-card li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
}
.includes-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  font-weight: 700;
}
.includes-card.not-included li::before {
  content: '✗';
  color: #c2410c;
}

/* ---------- Mapa ---------- */
.map-wrapper {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--white);
  padding: 1rem;
}
.route-map {
  display: block;
  width: 100%;
  height: auto;
}
.route-map .pin {
  transform-origin: center;
  animation: pinPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.route-map .pin:nth-child(4) { animation-delay: 0.2s; }
.route-map .pin:nth-child(5) { animation-delay: 0.4s; }
.route-map .pin:nth-child(6) { animation-delay: 0.6s; }
.route-map .pin:nth-child(7) { animation-delay: 0.8s; }
.route-map .pin:nth-child(8) { animation-delay: 1s; }
.route-map .pin:nth-child(9) { animation-delay: 1.2s; }
.route-map .pin:nth-child(10) { animation-delay: 1.4s; }
@keyframes pinPop {
  0% { opacity: 0; transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Gastro cards ---------- */
.gastro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 1.5rem;
}
.gastro-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.gastro-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.gastro-media {
  margin: -2rem -1.75rem 1.25rem;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 16 / 7;
}
.gastro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}
.gastro-media.is-contain img { object-fit: cover; object-position: center; }
.gastro-card:hover .gastro-media img { transform: scale(1.06); }
.gastro-num {
  position: absolute;
  top: -16px;
  right: 20px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.gastro-card h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.gastro-history {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  flex: 1 1 auto;
  min-height: 0;
}
.gastro-dish {
  font-size: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.gastro-dish strong { color: var(--accent-dark); }

/* ---------- Galería ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  transition: var(--transition);
}
.gallery-item:hover .gallery-bg { transform: scale(1.08); }
.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
  color: var(--white);
  padding: 2.5rem 1rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery-item.g-1 { grid-column: span 2; grid-row: span 2; }
.gallery-item.g-5 { grid-column: span 2; }
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.gallery-item:hover img { transform: scale(1.08); }

/* ---------- CTA content ---------- */
.cta-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}
.cta-content p { margin-bottom: 2rem; opacity: 0.9; font-size: 1.05rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.3s ease;
}
.lightbox.open .lightbox-image { transform: scale(1); }
.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  max-width: calc(100% - 10rem);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox-counter {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}
.lightbox-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
body.lightbox-open { overflow: hidden; }

@media (max-width: 768px) {
  .lightbox { padding: 5rem 1rem 4rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-btn { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-caption { font-size: 0.85rem; max-width: calc(100% - 2rem); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .timeline { padding-left: 1.5rem; }
  .timeline-dot {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    margin-bottom: 0.5rem;
  }
  .timeline-item { padding-left: 0; }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .gallery-item.g-1, .gallery-item.g-5 { grid-column: span 2; grid-row: span 1; }
  .includes-grid { grid-template-columns: 1fr; }
  .tour-hero { min-height: auto; padding: 6rem 0 3rem; }
  .gastro-grid { grid-template-columns: 1fr; }
  .gastro-card { min-height: 0; }
}
@media (max-width: 992px) and (min-width: 769px) {
  .gastro-grid { grid-template-columns: repeat(2, 1fr); }
}
