/* ====================
      TOURS - #102542
======================= */
#toursSection {
  display: flex;
  flex-wrap: wrap; 
  justify-content: center;
  gap: 40px;
  padding: 80px 20px;
  width: 100%;
  margin: 0;
  background: linear-gradient(135deg, #0a1929 0%, #1a2b3e 100%);
  background-size: cover;
  background-attachment: fixed;
  box-sizing: border-box;
}

.toursHeader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  text-align: center;
}

.toursHeader h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6em;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding: 12px 20px 8px 20px;
  background: rgba(16, 37, 66, 0.15);
  border-radius: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
  text-transform: uppercase;
  cursor: default;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.toursHeader h2:hover {
  color: #4da8da;
  transform: scale(1.05);
  text-shadow: 0 6px 30px rgba(77, 168, 218, 0.6);
  background: rgba(16, 37, 66, 0.3);
  border-color: rgba(77, 168, 218, 0.3);
}

.toursHeader p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.25em;
  color: #e3f2fd;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.6;
  margin: 0 auto 1rem auto;
  max-width: 650px;
  background: rgba(16, 37, 66, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 16px 25px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.toursHeader p:hover {
  background: rgba(16, 37, 66, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 35px rgba(0, 0, 0, 0.2);
}

.tourCard {
  order: 1;
  width: calc(33.333% - 40px);
  min-height: 420px;
  border-radius: 20px;
  background: linear-gradient(135deg, #102542, #1a3a6b);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  perspective: 1500px;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  font-family: "Open Sans", sans-serif;
  color: #e3f2fd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tourCard.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: fadeUp 0.8s ease forwards;
}

/* Estilo unificado para todos los botones itBtn */
.itBtn {
  background: linear-gradient(145deg, #102542, #1a3a6b);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s ease;
  margin-top: auto;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(77, 168, 218, 0.2);
  position: relative;
  overflow: hidden;
}

.itBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(77, 168, 218, 0.2), transparent);
  transition: left 0.6s ease;
}

.itBtn:hover::before {
  left: 100%;
}

.itBtn:hover {
  transform: scale(1.08);
  background: linear-gradient(145deg, #1a3a6b, #102542);
  box-shadow: 0 8px 25px rgba(77, 168, 218, 0.4);
  border-color: rgba(77, 168, 218, 0.4);
}

.flipBackBtn {
  margin-top: 20px;
  width: fit-content;
  align-self: center;
}

.tourCard:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: #4da8da;
  box-shadow: 0 25px 60px rgba(77, 168, 218, 0.3), 0 35px 80px rgba(0, 0, 0, 0.2);
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  60% { opacity: 0.85; transform: translateY(10px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tourInner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
}

.tourFront, .tourBack {
  backface-visibility: hidden;
  position: relative;
  width: 100%;
  top: 0;
  left: 0;
  color: #e3f2fd;
}

/* === REVERSO MEJORADO === */
.tourBack {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #102542 0%, #1a3a6b 50%, #0d1c36 100%);
  padding: 28px 24px;
  overflow-y: auto;
  transform: rotateY(180deg);
  border-radius: 20px;
  box-shadow: inset 0 0 30px rgba(77, 168, 218, 0.15), 0 8px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: "Open Sans", sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #4da8da rgba(255, 255, 255, 0.1);
}

.tourBack::-webkit-scrollbar { width: 6px; }
.tourBack::-webkit-scrollbar-thumb {
  background: #4da8da;
  border-radius: 10px;
}

.tourBack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background: url('imagenes/banner-tour.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
  border-radius: 20px 20px 0 0;
  filter: grayscale(0.3) brightness(0.7);
}

.tourBack h3 {
  font-family: 'Playfair Display', serif;
  font-size: 23px;
  color: #4da8da;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(77, 168, 218, 0.5);
  position: relative;
  z-index: 1;
}

.tourBack h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: #b3d4fc;
  margin: 10px 0 6px;
  text-shadow: 0 0 8px rgba(77, 168, 218, 0.4);
}

.tourBack p {
  font-size: 15px;
  line-height: 1.6;
  color: #cfe2ff;
  margin-bottom: 12px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(77, 168, 218, 0.1);
}

/* ==== NUEVO DISEÑO PARA ITINERARIO ==== */
.tourBack ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  list-style: none;
  padding: 0;
}

.tourBack ul li {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(77, 168, 218, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  backdrop-filter: blur(3px);
  color: #e3f2fd;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
}

.tourBack ul li:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 16px rgba(77, 168, 218, 0.4);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(77, 168, 218, 0.5);
}

.tourBack ul li img.dayImg {
  width: 85px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #4da8da;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.tourBack ul li:hover img.dayImg {
  transform: scale(1.06);
  box-shadow: 0 5px 15px rgba(77, 168, 218, 0.4);
}

.tourBack ul li span.dayText {
  display: block;
  font-family: "Open Sans", sans-serif;
  font-weight: 500;
  color: #f0f8ff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
}

/* ==== GALERÍA LIGHTBOX ==== */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border: 4px solid #4da8da;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(77, 168, 218, 0.6);
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Secciones incluye / no incluye */
.includes, .not-includes {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(77, 168, 218, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.includes:hover, .not-includes:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(77, 168, 218, 0.3);
}

.includes h4, .not-includes h4 {
  color: #4da8da;
  font-size: 16px;
  margin-bottom: 6px;
  font-family: 'Playfair Display', serif;
  text-align: left;
}

.includes li::before {
  content: "✓";
  color: #66ff99;
  margin-right: 8px;
  font-weight: bold;
}

.not-includes li::before {
  content: "✗";
  color: #ff6666;
  margin-right: 8px;
  font-weight: bold;
}

.tourBack .itBtn {
  align-self: center;
  background: linear-gradient(145deg, #102542, #1a3a6b);
  color: #fff;
  padding: 12px 26px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all 0.35s ease;
  margin-top: auto;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.tourBack .itBtn:hover {
  transform: scale(1.08);
  background: linear-gradient(145deg, #1a3a6b, #102542);
  box-shadow: 0 8px 25px rgba(77, 168, 218, 0.4);
}

/* Flip toggle */
.tourCard.flipped .tourInner {
  transform: rotateY(180deg);
}

/* Imagen elegante */
.imgWrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s ease;
  filter: brightness(0.85);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tourCard:hover img {
  transform: scale(1.06);
  filter: brightness(1);
}

/* Contenido frontal */
.tourContent {
  padding: 22px 20px;
  background: rgba(0, 0, 0, 0.15);
  flex: 1;
  border-radius: 0 0 20px 20px;
  backdrop-filter: blur(5px);
}

.title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #4da8da;
  line-height: 1.35;
  text-shadow: 0 0 6px rgba(77, 168, 218, 0.7), 0 2px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 12px;
  font-weight: 700;
}

.tourContent p {
  color: #e3f2fd;
  margin: 12px 0 16px;
  font-size: 16px;
  line-height: 1.55;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

/* Footer */
.tourFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.price span {
  color: #ffffff;
  background: linear-gradient(90deg, #102542, #1a3a6b);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.4em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: inline-block;
  border: 1px solid rgba(77, 168, 218, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
  .tourCard {
    width: calc(50% - 40px);
  }
}

@media (max-width: 768px) {
  .tourCard {
    width: 100%;
    max-width: 500px;
  }
  
  .toursHeader h2 {
    font-size: 2em;
  }
  
  .toursHeader p {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  #toursSection {
    padding: 40px 15px;
    gap: 30px;
  }
  
  .toursHeader h2 {
    font-size: 1.8em;
    padding: 10px 15px;
  }
  
  .tourContent {
    padding: 18px 15px;
  }
  
  .tourFooter {
    flex-direction: column;
    gap: 12px;
  }
  
  .itBtn {
    width: 100%;
    text-align: center;
  }
}