/* tours.css */

/* ——————————————————————————————————————————————————
   Hero de Tours
   Estilos para la sección de introducción con imagen
   de fondo, overlay semitransparente y texto centrado.
—————————————————————————————————————————————————— */
#tours-hero {
  position: relative;                /* Permite superponer el overlay */
  height: 60vh;                      /* Ocupa el 60% de la altura de la ventana */
  background: url('../img/hero-tours.webp') center/cover no-repeat;
                                     /* Imagen centrada y cubre todo el espacio */
  display: flex;                     /* Flex para centrar el contenido */
  align-items: center;               /* Centra verticalmente */
  justify-content: center;           /* Centra horizontalmente */
}

#tours-hero .overlay {
  position: absolute;                /* Cubre toda la sección */
  inset: 0;                          /* top/right/bottom/left = 0 */
  background: rgba(0, 0, 0, 0.4);    /* Capa oscura semitransparente */
}

#tours-hero .hero-content {
  position: relative;                /* Se sitúa sobre el overlay */
  text-align: center;                /* Texto centrado */
  color: #fff;                       /* Texto en blanco para contraste */
  z-index: 1;                        /* Por encima del overlay */
}

#tours-hero h1 {
  font-size: 3rem;                   /* Título grande */
  margin-bottom: 1rem;               /* Separación inferior */
}

#tours-hero p {
  font-size: 1.25rem;                /* Texto descriptivo de tamaño medio */
}


/* ——————————————————————————————————————————————————
   Contenedor general
   Define el ancho máximo, centrado y padding para
   el listado de tours.
—————————————————————————————————————————————————— */
#tours-list .container {
  max-width: 1200px;                 /* Ancho máximo del contenido */
  margin: 0 auto;                    /* Centra horizontalmente */
  padding: 4rem 1rem;                /* Espacio superior/inferior y lateral */
}


/* ——————————————————————————————————————————————————
   Layout de cada tour
   Configura cada artículo como fila flex con gap
   y alterna dirección en elementos pares.
—————————————————————————————————————————————————— */
.tour-item {
  display: flex;                     /* Flex para imagen + detalles */
  align-items: center;               /* Alinea verticalmente */
  gap: 2rem;                         /* Espacio entre imagen y texto */
  margin-bottom: 4rem;               /* Separación entre tours */
}


/* Invierte imagen y texto en tours pares */
#tours-list .tour-item:nth-child(even) {
  flex-direction: row-reverse;       /* Imagen a la derecha, texto a la izquierda */
}

/* En móviles, apila verticalmente cada tour */
@media (max-width: 768px) {
  .tour-item {
    flex-direction: column;
  }
  #tours-list .tour-item:nth-child(even) {
    flex-direction: column;
  }
}


/* ——————————————————————————————————————————————————
   Carrusel interno por tour
   Contenedor y slides en fila para el desplazamiento.
—————————————————————————————————————————————————— */
.tour-carousel {
  flex: 1 1 40%;                     /* Ocupa la mitad del ancho del tour (Cambia el width del carousel)*/
  position: relative;                /* Necesario para posicionar botones y dots */
  overflow: hidden;                  /* Oculta slides fuera de vista */
  height: 600px;                     /* Altura fija para el carrusel (Cambia la altura del carousel y su contenido) SHHHHHH*/   
  border-radius: 20px;
}

.tour-carousel .carousel-slides {
  display: flex;                     /* Slides en una fila */
  transition: transform 0.5s ease;   /* Animación de deslizamiento */
}

.tour-carousel .carousel-slide {
  flex: 0 0 100%;                    /* Cada slide ocupa el 100% del carrusel */
}

.tour-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1200px), (max-width: 900px), (max-width: 768px), (max-width: 600px) {
  .tour-carousel {
    height: 600px !important;
    max-width: 100vw;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .tour-carousel img {
    height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
    background: #000;
    display: block;
    margin: 0 auto;
  }
  .tour-carousel .carousel-slide {
    height: 100% !important;
  }
  .tour-carousel .carousel-slides {
    height: 100% !important;
  }
}


/* ——————————————————————————————————————————————————
   Botones Prev / Next
   Flechas sobre la imagen para navegar entre slides.
—————————————————————————————————————————————————— */
.tour-carousel .carousel-button {
  position: absolute;
  top: 50%;                          /* Centrado vertical */
  transform: translateY(-50%);       /* Ajuste fino del centrado */
  background: rgba(0, 0, 0, 0.4);    /* Fondo semitransparente */
  border: none;
  color: #fff;                       /* Icono en blanco */
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 50%;                /* Botón circular */
  z-index: 2;                        /* Sobre la imagen */
}

.tour-carousel .carousel-button.prev {
  left: 1rem;                        /* Alineado a la izquierda */
}

.tour-carousel .carousel-button.next {
  right: 1rem;                       /* Alineado a la derecha */
}


/* ——————————————————————————————————————————————————
   Indicadores (dots)
   Puntos en la parte inferior para indicar slide activo.
—————————————————————————————————————————————————— */
.tour-carousel .carousel-dots {
  position: absolute;
  bottom: 1rem;                      /* Distancia desde la base del carrusel */
  left: 50%;                         /* Centrado horizontal */
  transform: translateX(-50%);       /* Ajuste fino del centrado */
  display: flex;                     /* Puntos en línea */
  gap: 0.5rem;                       /* Espacio entre puntos */
  z-index: 2;                        /* Sobre la imagen */
}

.tour-carousel .carousel-dots .dot {
  width: 8px;                        /* Tamaño del punto */
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;                /* Punto circular */
  cursor: pointer;                   /* Cambia el cursor al pasar */
}

.tour-carousel .carousel-dots .dot.active {
  background: #fff;                  /* Punto activo en blanco */
}


/* ——————————————————————————————————————————————————
   Detalles del tour
   Área de texto con título, linea, párrafo y botón CTA.
—————————————————————————————————————————————————— */
.tour-details {
  flex: 1 1 50%;                     /* Ocupa la otra mitad del ancho */
}

.tour-details h2 {
  font-size: 2rem;                   /* Título del tour */
  margin-bottom: 0.5rem;             /* Separación inferior */
  text-align: center;
}

.tour-details h2 {
  position: relative;
  cursor: pointer;
}

/* Línea debajo del título + hover*/
.tour-details h2::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: #27ae60;
  transition: width 0.3s ease, left 0.3s ease;
}

.tour-details h2:hover::after {
  width: 60%;
  left: 20%;
}

.tour-details p {
  margin-bottom: 1rem;               /* Espacio tras párrafo */
  line-height: 1.6;                  /* Mejora legibilidad */
  text-align: justify;                 /* Justifica el texto del tour */
}

.tour-details .btn-cta {
  display: flex;
  justify-content: center;
  max-width: 160px;
  max-height: 48px;
  margin: 0 auto;
  background: #27ae60;               /* Fondo verde Tortutravel */
  color: #fff;                       /* Texto en blanco */
  padding: 0.75rem 1.5rem;           /* Espacio interno */
  border-radius: 4px;                /* Esquinas redondeadas */
  transition: background 0.3s ease;  /* Suaviza hover */
  transition: 0.3s ease;           /* Suaviza el efecto de hover */
}

.tour-details .btn-cta:hover {
  background: #1b6e3f;               /* Verde más oscuro al pasar */
  transform: scale(1.05);
  transition: 0.3s ease;           /* Suaviza el efecto de hover */
}


/* ——————————————————————————————————————————————————
   Efecto fade-in
   Clases .hidden/.visible usadas por JS para animar
   la entrada de secciones al hacer scroll.
—————————————————————————————————————————————————— */
/*
.hidden {
  opacity: 0;                        /* Oculto inicialmente 
  transform: translateY(2rem);       /* Desplazado hacia abajo 
  transition: opacity 0.6s ease,     /* Animación suave 
              transform 0.6s ease;
}

.visible {
  opacity: 1;                        /* Visible 
  transform: translateY(0);          /* En su posición original 
}
*/

/* ——————————————————————————————————————————————————
   Packs: sección de packs con imágenes y overlay
—————————————————————————————————————————————————— */
.packs-section {
  padding: 3.5rem 1rem;
  background: #fff;
}
.packs-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  position: relative;
  cursor: pointer;
}

.packs-title::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: #27ae60;
  transition: width 0.3s ease, left 0.3s ease;
}

.packs-title:hover::after {
  width: 60%;
  left: 20%;
}

/* Packs: igual tamaño y características que carrusel tours, pero manteniendo alineación horizontal */
.packs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
}
.pack-card {
  position: relative;
  flex: 1 1 320px;
  max-width: 360px;
  aspect-ratio: 4 / 5; /* Ajustado a las imágenes 512x640 */
  min-height: 380px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  background: #fff;
  transition: transform 0.3s;
  display: block;
  margin-bottom: 1rem;
}
.pack-card img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Evita recortes en móviles */
  background: #f8f9fa;
  border-radius: 20px;
  display: block;
}
.pack-overlay {
  position: absolute;
  inset: 0;
  background: rgba(39, 174, 96, 0.85);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 1.3rem;
  pointer-events: none;
  text-align: center;
}
.pack-card:hover .pack-overlay {
  opacity: 1;
  pointer-events: auto;
}
.pack-name {
  font-weight: bold;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.pack-price {
  font-size: 1.3rem;
  background: rgba(0,0,0,0.2);
  padding: 0.3rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}
@media (max-width: 1200px) {
  .pack-card {
    flex: 1 1 280px;
    max-width: 320px;
    aspect-ratio: 4 / 5;
    min-height: 400px;
    margin-bottom: 1rem;
  }
}
@media (max-width: 900px) {
  .packs-row {
    gap: 0.8rem;
  }
  .pack-card {
    flex: 1 1 260px;
    max-width: 100%;
    aspect-ratio: 4 / 5;
    min-height: 420px;
    margin-bottom: 1rem;
  }
}
@media (max-width: 600px) {
  .packs-row {
    flex-direction: column;
    align-items: center;
  }
  .pack-card {
    flex: 1 1 240px;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 5;
    min-height: 460px;
    margin-bottom: 1rem;
  }
}
@media (max-width: 480px) {
  .packs-section {
    padding: 3rem 0.75rem;
  }
  .packs-title {
    font-size: 1.9rem;
  }
  .pack-card {
    border-radius: 16px;
    max-width: 100%;
    flex-basis: 220px;
    aspect-ratio: 4 / 5;
    min-height: 500px;
  }
  .pack-card img {
    border-radius: 16px;
  }
}
