/* Google Fonts loaded async in HTML */

/* ==========================================================================
   VARIABLES Y SISTEMA DE DISEÑO
   ========================================================================== */
:root {
  --bg-global: #0d0b1a;
  --bg-card: rgba(19, 17, 39, 0.7);
  --bg-card-hover: rgba(26, 23, 53, 0.9);
  --primary: #7c3aed;
  --primary-glow: rgba(124, 58, 237, 0.5);
  --primary-glow-hover: rgba(124, 58, 237, 0.8);
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --text-white: #ffffff;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;
  --border-card: 1px solid rgba(124, 58, 237, 0.3);
  --border-card-gold: 1px solid rgba(245, 158, 11, 0.4);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

/* ==========================================================================
   RESET Y ESTILOS BASE
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-global);
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Fondo estrellado sutil mediante gradiente */
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.7), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 80px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 110px 220px, rgba(255,255,255,0.5), rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 150px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 250px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 320px 50px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 400px 110px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 450px 280px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 600px 350px, rgba(255,255,255,0.4), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 700px 190px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 850px 240px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 980px 130px, rgba(255,255,255,0.6), rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 1150px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 1300px 170px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 1450px 290px, rgba(255,255,255,0.5), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 1550px 40px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 1600px 1600px;
}

/* Overlay nebulosa de fondo */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(12, 11, 26, 0.5) 0%, #0d0b1a 100%);
  z-index: -2;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   TIPOGRAFÍA Y SECCIONES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gold-title {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

p {
  color: var(--text-muted);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   SEPARADOR PREMIUM CON ESTRELLA
   ========================================================================== */
.separator-star {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto;
  width: 100%;
  max-width: 400px;
}

.separator-star::before,
.separator-star::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.separator-star span {
  margin: 0 16px;
  color: var(--gold);
  font-size: 1.2rem;
  text-shadow: 0 0 8px var(--gold-glow);
  animation: pulse-star 3s infinite ease-in-out;
}

@keyframes pulse-star {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 15px var(--gold); }
}

/* ==========================================================================
   HEADER Y LOGO
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 11, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(13, 11, 26, 0.95);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 200px;
  height: auto;
  object-fit: contain;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

nav ul li a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 0;
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--gold);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

nav ul li a:hover {
  color: var(--gold);
}

nav ul li a:hover::after,
nav ul li.active a::after {
  width: 100%;
}

.header-btn {
  background: transparent;
  color: var(--text-white);
  border: 1px solid var(--primary);
  padding: 10px 22px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.1);
}

.header-btn:hover {
  background: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ==========================================================================
   BOTONES PREMIUM (GLOW EFFECT)
   ========================================================================== */
.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--text-white);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px var(--primary-glow);
  transition: var(--transition-smooth);
}

.btn-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-25deg);
  transition: 0.75s ease-in-out;
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px var(--primary-glow-hover);
  background: #8b5cf6;
}

.btn-glow:hover::before {
  left: 150%;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-white);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 40px;
  border: 1px solid rgba(124, 58, 237, 0.5);
  cursor: pointer;
  letter-spacing: 0.5px;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-3px);
}

.btn-gold {
  background: var(--gold);
  color: var(--text-dark);
  box-shadow: 0 0 15px var(--gold-glow);
}

.btn-gold:hover {
  background: #fbbf24;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

/* ==========================================================================
   CARDS MÍSTICAS (GLASSMORPHISM)
   ========================================================================== */
.mystic-card {
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.mystic-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
  transition: var(--transition-smooth);
}

.mystic-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.mystic-card:hover::after {
  opacity: 1;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary));
}

.mystic-card-gold {
  border: var(--border-card-gold);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.05);
}

.mystic-card-gold::after {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.mystic-card-gold:hover {
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   SECCIÓN HERO COMÚN
   ========================================================================== */
.hero-section {
  padding: 100px 0 60px 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.25);
  border: 2px solid rgba(124, 58, 237, 0.4);
  animation: float-slow 6s infinite ease-in-out;
}

.hero-img-wrapper.no-circle {
  border-radius: 20px;
  aspect-ratio: auto;
  max-width: 100%;
}

.hero-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.hero-img-wrapper:hover img {
  transform: scale(1.05);
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Rueda zodiacal animada en Hero */
.zodiac-wheel-rotate {
  animation: rotate-zodiac 120s infinite linear;
}

@keyframes rotate-zodiac {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   SECCIONES GENERALES Y RETROALIMENTACIÓN DE USUARIO (FORMULARIOS)
   ========================================================================== */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
}

.section-title-wrapper h2 {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.section-title-wrapper p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Inputs de Formularios Estilo Místico */
.mystic-form-group {
  margin-bottom: 24px;
}

.mystic-form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mystic-input {
  width: 100%;
  background: rgba(13, 11, 26, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.mystic-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  background: rgba(19, 17, 39, 0.9);
}

.mystic-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

select.mystic-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 48px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #080712;
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  padding: 80px 0 40px 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-info .logo-vertical {
  height: 90px;
  object-fit: contain;
  margin-bottom: 24px;
}

.footer-info p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--gold);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links ul li a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-social h4 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--gold);
}

.social-icons {
  display: flex;
  gap: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text-white);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  padding-top: 40px;
  font-size: 0.85rem;
}

/* ==========================================================================
   COMPARTIDO: CHECKLIST / LISTAS DE QUÉ INCLUYE
   ========================================================================== */
.checklist {
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.checklist li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 1.2rem;
  text-shadow: 0 0 8px var(--gold-glow);
}

/* ==========================================================================
   ANIMACIONES DE CARGA (SIMULACIÓN INTERACTIVA)
   ========================================================================== */
.mystic-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loader-zodiac {
  width: 100px;
  height: 100px;
  border: 2px dashed rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  position: relative;
  animation: rotate-zodiac 20s infinite linear;
  margin-bottom: 24px;
}

.loader-zodiac::before {
  content: "✦";
  position: absolute;
  top: -12px;
  left: calc(50% - 10px);
  color: var(--gold);
  font-size: 1.5rem;
  text-shadow: 0 0 15px var(--gold);
}

.loader-circle {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 2px solid rgba(124, 58, 237, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1.5s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-status {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.loader-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   CITY AUTOCOMPLETE DROPDOWN
   ========================================================================== */
.city-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 8, 24, 0.97);
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(124, 58, 237, 0.15);
  max-height: 300px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.4) transparent;
}

.city-autocomplete-dropdown:empty { display: none; }

.city-autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  transition: background 0.12s;
}

.city-autocomplete-item:last-child { border-bottom: none; }

.city-autocomplete-item:hover,
.city-autocomplete-item.active {
  background: rgba(124, 58, 237, 0.2);
}

.city-ac-name {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-ac-coords {
  color: var(--gold);
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  opacity: 0.85;
  flex-shrink: 0;
}

.city-ac-status {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

/* ==========================================================================
   RESPONSIVIDAD Y OPTIMIZACIÓN MÓVIL (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .footer-social {
    grid-column: span 3;
    text-align: center;
  }
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-container {
    height: 90px;
  }

  .logo-img {
    width: 200px;
    height: auto;
  }
  
  nav {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background: #0d0b1a;
    transition: var(--transition-smooth);
    padding: 40px 24px;
    z-index: 99;
    border-top: 1px solid rgba(124, 58, 237, 0.15);
  }
  
  nav.active {
    left: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
  }
  
  nav ul li {
    width: 100%;
  }
  
  nav ul li a {
    font-size: 1.2rem;
    display: block;
    width: 100%;
  }
  
  .header-btn {
    width: 100%;
    margin-top: 24px;
    text-align: center;
    display: block;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2.4rem;
  }
  
  .hero-btns {
    justify-content: center;
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-visual {
    display: none !important;
    order: -1;
  }

  .hero-img-wrapper {
    display: none !important;
    max-width: 320px;
  }
  
  .section-title-wrapper h2 {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-social {
    grid-column: span 1;
  }
  
  .footer-info {
    text-align: center;
  }
  
  .footer-info .logo-vertical {
    margin: 0 auto 24px auto;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .btn-glow, .btn-outline {
    width: 100%;
    padding: 12px 24px;
  }
}
