/* --- VARIABLES Y RESET --- */
:root {
  --bg-color: #0f172a; /* Fondo oscuro azulado */
  --card-bg: #1e293b; /* Fondo de las tarjetas */
  --text-main: #f8fafc; /* Texto blanco */
  --text-muted: #94a3b8; /* Texto gris */
  --accent: #2bc85dff; /* Azul brillante (puedes cambiarlo a verde o morado) */
  --accent-hover: #1fdf36ff;
  --font-main: "Inter", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* La animación de movimiento */
@keyframes move {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, -50px) scale(1.1); /* Se mueve y crece un poco */
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
/* --- FONDO ANIMADO --- */

/* El contenedor fijo detrás de todo */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1; /* Importante: Para que se quede DETRÁS del texto */
  overflow: hidden;
  background-color: var(--bg-color); /* Mantenemos el fondo oscuro base */
}

/* Estilo base para las manchas de luz */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px); /* Esto hace el efecto de "niebla" o luz suave */
  opacity: 0.4; /* Transparencia para que no moleste la lectura */
  animation: move 20s infinite alternate; /* Animación lenta */
}

/* Mancha 1: Color Principal (Azul/Cyan) */
.blob-1 {
  top: 10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: var(--accent);
  animation-duration: 25s;
}

/* Mancha 2: Color Secundario (Morado para contraste tech) */
.blob-2 {
  bottom: 20%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: #7c3aed; /* Un violeta que combina bien con el modo oscuro */
  animation-duration: 30s;
  animation-delay: -5s;
}

/* Mancha 3: Un toque sutil extra */
.blob-3 {
  top: 40%;
  left: 40%;
  width: 300px;
  height: 300px;
  background: #2563eb; /* Azul más oscuro */
  animation-duration: 35s;
  animation-delay: -10s;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* Evita scroll horizontal por errores inesperados de ancho */
html, body {
  overflow-x: hidden;
}

/* Bloqueo de scroll cuando se abre modal/lightbox */
body.no-scroll {
  height: 100vh;
  overflow: hidden;
}

.hero-badges {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-badges .badge {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.03);
}

.demo-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* --- BOTONES --- */
.btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: inline-block;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-color);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  border: 1px solid var(--text-main);
  margin-left: 10px;
}
.btn-outline:hover {
  background-color: var(--text-main);
  color: var(--bg-color);
}

/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  position: fixed;
  width: 100%;
  top: 0;
  background-color: rgba(15, 23, 42, 0.7); /* Fondo semi-transparente */
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}
.highlight {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  transition: 0.3s;
}
.nav-links a:hover {
  color: var(--accent);
}

.btn-nav {
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--accent);
}

/* --- HERO SECTION --- */
.hero {
  height: 90vh; /* Casi toda la pantalla */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px auto;
}

/* --- SERVICIOS (GRID) --- */
.services {
  padding: 80px 10%;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(300px, 1fr)
  ); /* Responsivo automático */
  gap: 30px;
  margin-top: 50px;
}

.card {
  background-color: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.01);
  transition: transform 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Estilo para las tarjetas en "Próximamente" */
.coming-soon {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra verticalmente */
  align-items: center; /* Centra horizontalmente */
  min-height: 400px; /* Les da una altura similar a la tarjeta activa */
  opacity: 0.6; /* Las hace un poco más transparentes/apagadas */
  border: 1px dashed rgba(255, 255, 255, 0.2); /* Borde punteado para que parezca "en construcción" */
}

.soon-text {
  font-size: 1.8rem;
  color: var(--accent); /* Usa tu color principal */
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 20px;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.highlight-card {
  border: 1px solid var(--accent);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.tag {
  position: absolute;
  top: -12px;
  right: 20px;
  background-color: var(--accent);
  color: var(--bg-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.currency {
  font-size: 1rem;
  color: var(--text-muted);
}
.desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.features {
  margin-bottom: 30px;
  text-align: left;
  flex-grow: 1;
}
.features li {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.btn-card {
  background-color: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-main);
  display: block;
  text-align: center;
}
.btn-card:hover {
  border-color: var(--text-main);
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent);
  margin-top: 15px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  font-family: inherit;
}

/* El fondo oscuro (Overlay) */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 2000; /* Encima de todo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* Fondo negro semi-transparente */
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

/* La caja del contenido */
.modal-content {
  background-color: rgba(30, 41, 59, 0.95);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  width: 90%;
  max-width: 900px; /* Ancho máximo */
  max-height: 90vh; /* Altura máxima (90% de la pantalla) */
  overflow-y: auto; /* Scroll si es muy alto */
  position: relative;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
  animation: modalFadeIn 0.3s;
}

/* Botón de cerrar (X) */
.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
}
.close-btn:hover {
  color: white;
}

/* Grid interno del modal */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas */
  gap: 40px;
  margin-top: 20px;
  text-align: left;
}

.mt-20 {
  margin-top: 20px;
}

/* Listas */
.modal-details ul {
  margin-left: 20px;
  list-style-type: disc;
}
.modal-details li {
  margin-bottom: 8px;
  color: #e2e8f0;
}
.excluded li {
  color: #94a3b8;
} /* Color más apagado para lo excluido */

/* Galería de Plantillas */

.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.template-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: 8px;
}

/* Cuadrados de colores (Placeholders para tus fotos) */

.placeholder-img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* --- ESTILOS DEL VISOR (LIGHTBOX) CORREGIDOS --- */

.lightbox {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 3000; /* Por encima de todo, incluso del modal */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95); /* Fondo muy oscuro */
  overflow-y: auto;
  padding-top: 40px;
  box-sizing: border-box;
  text-align: center;
}

#lightbox-img,
.lightbox-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 95%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(255,255,255,0.12);
  animation: zoomIn 0.28s;
  margin-bottom: 40px;
}

/* Botón de cerrar (X) - FLOTANTE FIJO */

.close-lightbox {
  position: fixed; /* Fijo para que no se mueva al hacer scroll */
  top: 18px;
  right: 22px;
  color: #f1f1f1;
  font-size: 34px;
  font-weight: bold;
  transition: 0.18s;
  cursor: pointer;
  z-index: 3001;
  background: rgba(0,0,0,0.45); /* Fondo oscurito para que se vea siempre */
  width: 48px;
  height: 48px;
  line-height: 48px; /* Centrado vertical */
  border-radius: 50%;
  text-align: center;
}

.close-lightbox:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

/* Texto descriptivo abajo */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Footer del modal */
.modal-footer {
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

/* --- CONTACTO --- */
.contact {
  padding: 80px 20px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.form-box {
  margin-top: 40px;
  background-color: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background-color: var(--bg-color);
  color: white;
  font-family: inherit;
}
.input-group input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.full-width {
  width: 100%;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid #1e293b;
}

/* --- REDES SOCIALES EN CONTACTO --- */
.social-links-container {
  margin-top: 30px;
  text-align: center;
}

.social-links-container p {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px; /* Espacio entre iconos */
}

.icon-link {
  font-size: 2rem; /* Tamaño grande */
  color: var(--text-main);
  transition: 0.3s transform, 0.3s color;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%; /* Círculo perfecto */
  background-color: rgba(255, 255, 255, 0.05); /* Fondo sutil */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Efecto Hover: Levantar y cambiar color */
.icon-link:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Colores específicos al pasar el mouse */
.whatsapp:hover {
  color: #25d366;
  border-color: #25d366;
}
.instagram:hover {
  color: #e1306c;
  border-color: #e1306c;
}
.github:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* --- ESTILOS DEL FOOTER ACTUALIZADO --- */
footer {
  padding: 50px 20px 20px;
  background-color: rgba(15, 23, 42, 0.8); /* Un poco más oscuro */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.logo-footer {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-main);
}

.footer-icons {
  display: flex;
  gap: 20px;
}

.footer-icons a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: 0.3s;
}

.footer-icons a:hover {
  color: var(--accent); /* Se iluminan con tu color principal */
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* Estilo para las miniaturas en la lista */
.zoomable {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 2px solid transparent;
}

.template-item span {
  color: var(--text-main);
  font-size: 0.95rem;
  text-align: center;
}

.zoomable:focus {
  outline: 3px solid rgba(43,200,93,0.18);
  outline-offset: 3px;
}

.zoomable:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  border-color: var(--accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .nav-links {
    display: none;
  } /* Ocultar menú en móvil por simplicidad */
  .services {
    padding: 60px 20px;
  }
  .pricing-grid {
    display: flex; /* Usamos Flexbox en vez de Grid en móvil */
    flex-direction: column; /* Ponemos las cartas una debajo de otra */
    align-items: center; /* Centramos las cartas horizontalmente */
    gap: 30px; /* Espacio entre cartas */
    width: 100%;
  }

  .card {
    width: 100%; /* Que ocupe todo el ancho disponible */
    max-width: 400px; /* Pero que no se vea gigante si el cel es grande */
    margin: 0 auto; /* Centrado automático por si acaso */
  }

  .modal-grid {
    grid-template-columns: 1fr; /* Una sola columna en el modal */
    gap: 20px;
  } /* Una columna en móvil */
  .modal-content {
    width: 95%;
    padding: 20px;
    max-height: 80dvh;
  }

  /* Evitar centrar verticalmente el modal en pantallas pequeñas */
  .modal {
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto;
  }

  .modal-content {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  /* Galería más compacta en móvil */
  .template-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
