/* VARIABLES */
:root {
  --primary-color: #ffd700;
  --whatsapp-color: #25D366;
  --bg-color: #000;
  --text-main: white;
  --text-secondary: #ddd;
  --card-bg: rgba(20, 20, 20, 0.85);
  --glass-bg: rgba(0, 0, 0, 0.6);
}

/* RESET */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-padding-top: 80px;
}


/* BODY */

/* ===== FONDO GLOBAL (PC) ===== */

body {
  background-color: var(--bg-color);
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 10, 40, 0.5)), url("img/fondo.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
}

/* ===== FONDO PARA CELULARES (Solución Asimetría y Zoom en iOS) ===== */
@media (max-width:768px) {
  body {
    background-image: none; /* Quitamos el fondo del body */
  }

  /* Usamos un seudo-elemento con posición estática respecto al viewport */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%;
    /* Se utiliza translateZ(0) para forzar aceleración por hardware en iOS y prevenir el bug de Zoom */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 10, 40, 0.5)), url("img/fondoc.jpg");
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
  }
}

/* HERO */

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  /* no se aplica fondo aquí; utiliza el fondo global del <body> */
  background: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }

  66% {
    transform: translate(-20px, 40px) rotate(240deg);
  }
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.65);
  padding: 50px;
  border-radius: 25px;
  max-width: 750px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.logo {
  width: 180px;
  margin: 0 auto 20px auto;
  display: block;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.7));
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .logo {
    width: 120px;
    margin-bottom: 10px;
  }
}

.hero h1 {
  font-size: 46px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  color: #ddd;
}

/* BOTON WHATSAPP */

.whatsapp-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--whatsapp-color) 0%, #1ebe5d 100%);
  color: white;
  padding: 18px 45px;
  font-size: 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), inset 0 0 0 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.whatsapp-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(49, 37, 211, 0.5), inset 0 0 0 50px rgba(255, 255, 255, 0.05);
  background: linear-gradient(135deg, #1ebe5d 0%, #17a84f 100%);
}

.whatsapp-btn:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:focus {
  outline: none;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6), 0 0 0 4px rgba(37, 211, 102, 0.2);
}

/* BOTON FLOTANTE WHATSAPP */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: var(--whatsapp-color);
  background: linear-gradient(135deg, var(--whatsapp-color) 0%, #1ebe5d 100%);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 9999; /* Para asegurar que siempre esté encima */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  color: #fff;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }
  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}

/* SECCIONES */

.section {
  padding: 100px 20px;
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

.section h2 {
  font-size: 38px;
  margin-bottom: 50px;
}

/* PAQUETES */

.paquetes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 35px;
}

.card {
  background: rgba(20, 20, 20, 0.85);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  transition: 0.35s;

  /* Flex para simetría forzada */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9);
}

.card h3 {
  font-size: 24px;
  margin-bottom: 18px;
  color: var(--primary-color);
}

.card ul {
  list-style: none;
  margin-bottom: 20px;
  flex-grow: 1; /* Empuja el precio y los botones hacia abajo simétricamente */
}

.card li {
  margin-bottom: 10px;
  color: #ccc;
}

.price {
  font-size: 24px;
  margin-top: 20px;
  color: var(--primary-color);
  font-weight: bold;
}

/* GALERIA */

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.galeria img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;

  transition: 0.35s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.galeria img:hover {
  transform: scale(1.05);
}

/* VIDEOS */

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 900px;
  margin: auto;
}

.videos-grid video {
  width: 100%;
  border-radius: 15px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* FOOTER */

footer {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-color);
  color: #aaa;
  margin-top: 80px;
}

/* RESPONSIVE */

@media (max-width:768px) {

  .hero h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-overlay {
    padding: 25px;
    margin: 20px;
    border-radius: 20px;
  }

  .section {
    padding: 60px 15px;
  }

  .section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    line-height: 1.3;
  }

  /* AJUSTES PARA HEADER EN MÓVILES */
  .main-header {
    padding: 10px 15px;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
  }

  .nav-links a {
    margin: 0 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 5px;
    transition: 0.2s;
  }

  .nav-links a:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    text-shadow: none;
  }

  /* BOTONES EN MÓVILES */
  .whatsapp-btn {
    padding: 12px 25px;
    font-size: 14px;
    width: 100%;
    max-width: 280px;
    margin: 10px auto;
    display: block;
    border-radius: 40px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  }

  .whatsapp-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  }

  .whatsapp-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
  }

  /* PAQUETES EN MÓVILES */
  .paquetes {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .card {
    padding: 25px;
    margin: 0 10px;
    border-radius: 15px;
  }

  .card h3 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .card ul {
    margin-bottom: 15px;
  }

  .card li {
    font-size: 14px;
    margin-bottom: 8px;
  }

  /* GALERIA EN MÓVILES */
  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .galeria img {
    border-radius: 12px;
  }

  /* VIDEOS EN MÓVILES */
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .videos-grid video {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
  }

  /* FOOTER EN MÓVILES */
  footer {
    padding: 40px 20px;
    text-align: center;
  }

  footer p {
    font-size: 12px;
    margin-bottom: 8px;
  }

}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: top 0.3s ease;
}

/* estilos de enlaces de navegación eliminados - sin enlaces activos */

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--primary-color);
  z-index: 1001;
  /* La transition fue removida para ser actualizada sincrónicamente desde JS via RAF */
}

/* PRELOADER */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#preloader .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #444;
  border-top: 6px solid var(--whatsapp-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== MEJORA PAQUETES EN CELULAR ===== */

@media (max-width:768px) {

  .paquetes {
    display: grid;
    grid-template-columns: 1fr; /* Cambiado a 1 columna para evitar aplastar las tarjetas en celular */
    gap: 20px;
    padding: 10px;
  }

  .card {
    padding: 25px 20px;
    border-radius: 18px;
  }

  .card h3 {
    font-size: 18px;
  }

  .card li {
    font-size: 14px;
  }

  .price {
    font-size: 18px;
    margin-top: 10px;
  }

  .card button,
  .card .btn {
    padding: 12px;
    font-size: 15px;
    border-radius: 25px;
  }

}