/* --- HEADER FLOTANTE --- */
.custom-navbar {
  background: linear-gradient(to bottom, rgba(10, 46, 70, 0.9), transparent);
  transition: background-color 0.4s ease, padding 0.4s ease;
  padding: 20px 0;
  z-index: 1040;
}

/* Clase que se activa al hacer scroll */
.custom-navbar.scrolled {
  background-color: var(--primary-blue);
  padding: 10px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.btn-scroll-faq {
  color: var(--text-light) !important;
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 25px !important;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.btn-scroll-faq:hover {
  background-color: var(--accent-terra);
  border-color: var(--accent-terra);
  transform: translateY(-2px);
}

.lang-toggle {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 5px 10px;
  border-radius: 5px;
}

.lang-toggle:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

:root {
  --bg-cream: #f5f5dc;
  /* Fondo papel/crema */
  --primary-blue: #0a2e46;
  /* Río profundo - Elementos pesados */
  --accent-terra: #c84b31;
  /* Arcilla/Terracota - Botones y acción */
  --accent-hover: #a03a24;
  /* Hover botones */
  --text-dark: #2c3e50;
  /* Texto general sobre fondos claros */
  --text-light: #f8f9fa;
  /* Texto sobre fondos oscuros */
  --card-bg: rgba(255, 255, 255, 0.6);
  /* Fondo para tarjetas sobre el crema */
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #f5f5dc;
  /* Color crema */
  background-blend-mode: multiply;
  /* Mejor mezcla para fondos claros */
  color: var(--text-dark);
  overflow-x: hidden;
}

/* --- TARJETA DE INTRODUCCIÓN Y MÍSTICA --- */
.intro-card {
  background-color: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.intro-stats-bg {
  background-color: var(--primary-blue);
  position: relative;
  overflow: hidden;
  /* Asegura que el patrón de fondo no se salga */
}

/* Patrón topográfico sutil en el lado oscuro */
.intro-stats-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("assets/topography2.svg");
  /* Reutiliza tu mapa SVG */
  background-size: 400px;
  opacity: 0.15;
  /* Muy transparente para no estorbar el texto */
  z-index: 0;
}

.intro-stats-bg .stat-item {
  position: relative;
  z-index: 1;
  /* Mantiene el texto por encima del patrón */
}

/* --- HERO INITIAL --- */
.hero-apurimac {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-apurimac video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 0;
  object-fit: cover;
  opacity: 0.6;
}

.hero-apurimac .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 46, 70, 0.8),
    rgba(0, 0, 0, 0.8)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

/* --- SCOLLLYTELLING RÍO --- */
.contenedor-story-rio {
  position: relative;
  margin: 0;
  overflow: hidden;
  background-color: #f5f5dc;
  background-image: url("assets/topography2.svg");
  background-repeat: repeat;
  /* Hace que el mapa se repita infinitamente hacia abajo */
  background-size: 600px;
  /* Ajusta el tamaño de las curvas. Mientras mayor el número, más grandes las curvas */
  background-attachment: fixed;
  /* Opcional pero recomendado: crea un efecto "parallax" donde el río fluye pero el terreno se queda fijo */
  background-blend-mode: soft-light;
  /* Mezcla las líneas sutilmente con el color de fondo para que no roben protagonismo */
  opacity: 0.95;
  /* Si el mapa es muy fuerte, báñalo un poco */
}

.svg-story-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
}

.header-dia {
  background-color: #e6ddc3;
  /* Un crema un poco más oscuro para separar secciones */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-dia h2 {
  color: var(--accent-terra) !important;
}

.path-rio {
  fill: none;
  stroke: var(--primary-blue);
  /* La línea ahora es Azul profundo */
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.story-barco {
  width: 60px;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  will-change: transform;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  margin-left: -30px;
  /* Centrar SVG */
  margin-top: -30px;
}

.story-points-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.story-point {
  position: absolute;
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 300px;
  will-change: transform, opacity;
}

.story-point.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.story-card {
  background: var(--card-bg);
  /* Fondo blanco traslúcido */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  /* Borde sutil oscuro */
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  /* Sombra suave para que flote */
  color: var(--text-dark);
  /* Texto oscuro */
}

.story-card h4 {
  color: var(--accent-terra);
  /* Títulos en terracota */
  font-weight: 800;
  margin-bottom: 5px;
}

.story-card img,
.story-card video {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
  object-fit: cover;
  height: 180px;
}

/* Posicionamiento Responsivo Alternado */
.story-point.left-side {
  left: 20%; /* Se acercó desde el 10% */
}

.story-point.right-side {
  left: 55%; /* Se acercó desde el 60% */
}
.story-point.center-side {
  left: 50%;
  margin-left: -150px; /* La mitad exacta de los 300px de ancho */
}

@media (max-width: 768px) {
  .story-point.left-side,
  .story-point.right-side {
    left: 50% !important;
    transform: translate(-50%, 50px);
  }

  .story-point.is-visible.left-side,
  .story-point.is-visible.right-side {
    transform: translate(-50%, 0);
  }
}

/* --- CAMPAMENTO HERO & CANVAS --- */
.hero-campamento {
  background: url("assets/1.JPG") center/cover no-repeat;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-campamento::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.canvas-scroll-section {
  height: 600vh;
  /* Altura para hacer scroll */
  position: relative;
  background-color: #000;
}

.canvas-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camp-lightpass {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.camp-overlay-text {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px 40px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
}

/* --- TRACKER DE DESCENSO FLOTANTE --- */
.tracker-flotante {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 46, 70, 0.85);
  padding: 20px 10px;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(126, 217, 87, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.tracker-flotante.visible {
  opacity: 1;
}

.progress-vertical {
  width: 6px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  margin: 15px 0;
  position: relative;
  overflow: hidden;
}

.progress-vertical .fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent-terra);
  /* <-- ACÁ ESTÁ EL CAMBIO */
  transition: height 0.1s linear;
}

.badge-km {
  color: white;
  font-size: 0.75rem;
  text-align: center;
  font-weight: 600;
}

.badge-km i {
  color: var(--accent-terra);
  /* <-- ACÁ ESTÁ EL CAMBIO */
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.badge-percent {
  color: var(--accent-terra);
  /* <-- ACÁ ESTÁ EL CAMBIO */
  font-weight: 800;
  font-size: 1.1rem;
}

/* Efecto hover para imágenes y videos de las tarjetas */
.story-card img,
.story-card video {
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.story-card img:hover,
.story-card video:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

/* --- CTA ANIMADO CON EQUIPO DE RAFTING --- */
.cta-rafting-banner {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
}

/* Imagen de fondo con zoom al pasar el mouse */
.cta-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.6s ease;
}

.cta-rafting-banner:hover .cta-bg-img {
  transform: scale(1.05);
}

/* Filtro oscuro para que se lea el texto */
.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 46, 70, 0.9) 0%,
    rgba(10, 46, 70, 0.6) 100%
  );
  z-index: 1;
}

/* Botón del CTA */
.btn-cta-gringo {
  background-color: var(--accent-terra);
  color: var(--text-light) !important;
  border: 2px solid var(--accent-terra);
  transition: all 0.3s ease;
  position: relative;
  z-index: 3;
}

.btn-cta-gringo:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-3px);
  /* Pequeño levante elegante */
  box-shadow: 0 10px 20px rgba(200, 75, 49, 0.3);
}

/* --- ANIMACIONES DE LOS ELEMENTOS FLOTANTES --- */
.floating-item {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  /* Evita que estorben si el usuario quiere hacer clic en el botón */
  filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.6));
}

.item-casco {
  width: 140px;
  top: 15%;
  left: 8%;
  animation: flotarCasco 6s ease-in-out infinite;
}

.item-remo {
  width: 280px;
  bottom: -30px;
  right: 5%;
  animation: flotarRemo 8s ease-in-out infinite;
  transform-origin: center;
}

.item-salvavidas {
  width: 160px;
  top: 10%;
  right: 12%;
  animation: flotarSalva 7s ease-in-out infinite;
}

/* Keyframes de movimiento orgánico */
@keyframes flotarCasco {
  0%,
  100% {
    transform: translateY(0) rotate(-10deg);
  }

  50% {
    transform: translateY(-25px) rotate(5deg);
  }
}

@keyframes flotarRemo {
  0%,
  100% {
    transform: translateY(0) rotate(-35deg);
  }

  50% {
    transform: translateY(-35px) rotate(-20deg);
  }
}

@keyframes flotarSalva {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* Responsividad para móviles */
@media (max-width: 768px) {
  .item-casco {
    width: 90px;
    top: 5%;
    left: 2%;
  }

  .item-remo {
    width: 180px;
    bottom: -20px;
    right: -10px;
  }

  .item-salvavidas {
    width: 110px;
    top: 5%;
    right: 5%;
  }
  #camp-lightpass {
    width: 100vw;
    height: auto;
    object-fit: contain;
  }
}

.cta-content {
  position: relative;
  z-index: 3 !important;
}

/* --- ACORDEÓN PREGUNTAS FRECUENTES --- */
.custom-accordion .accordion-item {
  background-color: var(--card-bg);
  /* Fondo semi-transparente que definimos en la paleta */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 15px !important;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.custom-accordion .accordion-button {
  background-color: transparent;
  color: var(--primary-blue);
  font-weight: 700;
  box-shadow: none !important;
  /* Quita el borde azul molesto de Bootstrap al hacer clic */
  padding: 20px;
  transition: all 0.3s ease;
}

/* Estado cuando la pregunta está abierta */
.custom-accordion .accordion-button:not(.collapsed) {
  color: var(--accent-terra);
  background-color: rgba(200, 75, 49, 0.05);
  /* Un fondo rojizo muy muy suave */
}

.custom-accordion .accordion-body {
  color: var(--text-dark);
  line-height: 1.7;
  opacity: 0.9;
  padding: 0 20px 20px 20px;
}

/* --- FIX PARA IMÁGENES DEL SWIPER --- */
.swiper-slide {
  height: 400px;
  /* Fija la altura que desees para la galería */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 15px;
  /* Bordes redondeados modernos */

  /* Fondo sutil por si la imagen carga lento */
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* CLAVE: Recorta la foto sin deformarla para llenar el espacio */
  object-position: center;
  /* Mantiene el centro de la foto siempre visible */
}

/* --- BANNER DE VIDEO EN MEDIO DEL RÍO --- */
.banner-mid-rio {
  position: absolute;
  left: 0;
  width: 100%;
  height: 600px; /* Altura configurable del banner */
  z-index: 1; /* Se sitúa sobre el fondo crema pero debajo de las tarjetas */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.banner-mid-rio2 {
  position: absolute;
  left: 0;
  width: 100vw; /* 100vw fuerza a que tome el ancho total de la pantalla (Viewport Width) */
  height: 300px; /* La altura reducida que necesitas */
  z-index: 0; /* Aseguramos que quede por debajo de las tarjetas */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* LA MAGIA DEL CROPPEO: Aplica al video o imagen que pongas de fondo */
.banner-mid-rio2 video,
.banner-mid-rio2 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Esta es la propiedad clave: llena el contenedor y recorta lo que sobra sin aplastar la imagen */
  object-position: center; /* Centra el recorte para que no te corte cabezas importantes */
  z-index: 0;
}

/* Si usas el overlay oscuro para que se lea el texto */
.banner-mid-rio2 .banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(
    10,
    46,
    70,
    0.7
  ); /* O el color/transparencia que prefieras */
  z-index: 1;
}

.banner-mid-rio2 .banner-content {
  position: relative;
  z-index: 2; /* Para que el texto quede sobre la imagen y el overlay */
}
.banner-mid-rio .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 0;
  object-fit: cover;
}

/* El overlay para oscurecer el video y que se lea el texto */
.banner-mid-rio .banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 46, 70, 0.7); /* Azul profundo transparente */
  z-index: 1;
}

.banner-mid-rio .banner-overlay2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 46, 70, 0.2); /* Azul profundo transparente */
  z-index: 1;
}

.banner-mid-rio .banner-content {
  position: relative;
  z-index: 1;
}
/* --- HERO RESPONSIVO (Solo Celulares) --- */
@media (max-width: 768px) {
  /* 1. Escondemos el video para que no consuma recursos */
  .hero-apurimac video {
    display: none !important;
  }

  /* 2. Ponemos tu foto como fondo de la sección entera */
  .hero-apurimac {
    background-image: url("assets/2.JPG"); /* Reemplaza esto con el nombre de tu foto */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  /* 3. (Opcional) Un pequeño filtro oscuro para asegurar que las letras blancas se lean perfecto */
  .hero-apurimac::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 46, 70, 0.4); /* Azul profundo al 40% de opacidad */
    z-index: 1;
  }
  .hero-apurimac .hero-content h1,
  .hero-apurimac .hero-content p {
    color: #ffffff !important;
  }
}
