/* Global Resets & Theme Variables */
:root {
  --color-bg-dark: #0e0805;
  --color-panel-left: #0a0503;
  --color-accent-orange: #FF5500;
  --color-accent-orange-hover: #ff6c24;
  --color-input-bg: rgba(17, 10, 7, 0.85);
  --color-input-border: #3a322d;
  --color-text-light: #FFFFFF;
  --color-text-muted: #a19e9c;
  --color-frame-cream: #EAE6E2;
  
  --font-main: 'Outfit', sans-serif;
  --font-sec: 'Montserrat', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Anti-flicker for dynamic text nodes loaded from DB */
.dyn-loading {
  opacity: 0;
  transition: opacity 0.25s ease-in;
}
.dyn-ready {
  opacity: 1 !important;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg-dark);
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Split-screen Layout (Desktop default) */
.split-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
}

/* Left Panel - Big Typography (Desktop Only) */
.left-panel {
  flex: 1.25;
  background-color: var(--color-panel-left);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  border-right: 1px solid rgba(255, 85, 0, 0.05);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 85, 0, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 85, 0, 0.02) 0%, transparent 40%);
}

/* Contenedor de la imagen de fondo en escritorio (arriba del texto) */
.desktop-hero-container {
  width: 100%;
  max-width: 290px;
  aspect-ratio: 1/1.05;
  position: relative;
  margin-bottom: -1rem; /* Leve solape con el traje */
  z-index: 1;
  overflow: hidden;
}

.desktop-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.15) contrast(1.05);
  animation: subtleZoom 20s infinite alternate ease-in-out;
}

.desktop-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--color-panel-left));
  pointer-events: none;
}

.title-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrado horizontal */
  text-align: center; /* Centrado del texto interno */
  max-width: 500px;
  z-index: 2;
}

.main-title {
  font-size: 6rem;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -3px;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrar elementos internos */
  text-align: center; /* Centrar texto interno */
  text-transform: uppercase;
}

.day-number {
  font-size: 11rem;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -6px;
  background: linear-gradient(135deg, #ffffff 40%, #cccccc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.subtitle-badge {
  border: 3.5px solid var(--color-text-light);
  padding: 0.9rem 2.25rem;
  display: inline-block;
  letter-spacing: 5px;
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
  text-align: center;
  position: relative;
}

.subtitle-badge::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

/* Right Panel - Contains the Card */
.right-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-dark);
  padding: 3rem 2rem;
  position: relative;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 85, 0, 0.05) 0%, transparent 60%);
}

/* Phone Mockup Frame (Desktop) */
.phone-frame {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 9/16;
  border: 10px solid var(--color-frame-cream);
  border-radius: 12px;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 85, 0, 0.05);
  background: var(--color-bg-dark);
  overflow: hidden;
  position: relative;
}

/* Phone Screen Container */
.phone-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  scrollbar-width: none; /* Hide default scrollbar Firefox */
}

.phone-screen::-webkit-scrollbar {
  display: none; /* Hide default scrollbar Chrome/Safari */
}

/* Views & Content Routing inside Screen */
.view-content {
  display: none;
  opacity: 0;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  transition: opacity 0.5s ease-in-out;
}

.view-content.active {
  display: flex !important;
  opacity: 1 !important;
}

/* State 1: Registration Styles */
.hero-section {
  position: relative;
  width: 100%;
  aspect-ratio: 1.25/1; /* Más compacto para que el contenido suba */
  overflow: hidden;
}

.hero-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.15) contrast(1.05);
  animation: subtleZoom 20s infinite alternate ease-in-out;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent 0%, rgba(14, 8, 5, 0.4) 30%, var(--color-bg-dark) 100%);
  pointer-events: none;
}

/* Content Styles */
.content-section {
  padding: 1.5rem 1.25rem 2rem 1.25rem;
  background-color: var(--color-bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.promo-heading {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--color-text-light);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: -0.2px;
}

.highlight {
  color: var(--color-accent-orange);
  text-shadow: 0 0 10px rgba(255, 85, 0, 0.15);
}

.promo-subheading {
  font-family: var(--font-sec);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: #dfdcd9;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  max-width: 90%;
}

.webinar-tag {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--color-text-light);
  margin-bottom: 1.35rem;
  text-transform: uppercase;
  opacity: 0.95;
}

/* Scroll and CTA */
.scroll-prompt-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.cta-pill-btn {
  display: inline-block;
  border: 1.5px solid var(--color-accent-orange);
  border-radius: 50px;
  padding: 0.85rem 2rem;
  color: var(--color-accent-orange);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  transition: var(--transition-smooth);
  box-shadow: 0 0 15px rgba(255, 85, 0, 0.08);
  width: 80%;
  max-width: 250px;
}

.cta-pill-btn:hover {
  background: var(--color-accent-orange);
  color: #000;
  box-shadow: 0 0 25px rgba(255, 85, 0, 0.45);
  transform: translateY(-2px);
}

.down-arrow-wrapper {
  width: 28px;
  height: 28px;
  animation: bounce 2s infinite ease-in-out;
  cursor: pointer;
}

.down-arrow {
  width: 100%;
  height: 100%;
}

/* Anchor spacing */
#form-anchor {
  height: 1px;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

/* Registration Form */
.registration-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1rem;
}

.form-group {
  width: 100%;
}

.form-group input {
  width: 100%;
  padding: 1.05rem 1.5rem;
  background: var(--color-input-bg);
  border: 1.5px solid var(--color-input-border);
  border-radius: 50px;
  color: var(--color-text-light);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.form-group input::placeholder {
  color: #6a625d;
  font-weight: 700;
  letter-spacing: 1px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent-orange);
  box-shadow: 
    0 0 0 1px var(--color-accent-orange),
    0 0 15px rgba(255, 85, 0, 0.15);
  background: #140b06;
}

.phone-group {
  display: flex;
  gap: 0.5rem;
}

.phone-group .country-select {
  flex: 0 0 40%;
  padding: 1.05rem 0.5rem;
  background: var(--color-input-bg);
  border: 1.5px solid var(--color-input-border);
  border-radius: 50px;
  color: var(--color-text-light);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition-smooth);
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
}

.phone-group .country-select:focus {
  outline: none;
  border-color: var(--color-accent-orange);
  box-shadow: 
    0 0 0 1px var(--color-accent-orange),
    0 0 15px rgba(255, 85, 0, 0.15);
  background: #140b06;
}

.phone-group input {
  flex: 1;
}

.country-select option {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.submit-btn {
  width: 100%;
  padding: 1.15rem;
  background: var(--color-accent-orange);
  border: none;
  border-radius: 50px;
  color: #000;
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  background: var(--color-accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 85, 0, 0.45);
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  background: #552b17;
  color: #885c49;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner Loader */
.loader {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Thank You View */
.thank-you-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.75rem;
  text-align: center;
  width: 100%;
  min-height: 100%;
  margin: auto 0;
}

.success-icon-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255, 85, 0, 0.15);
  box-shadow: 0 0 20px rgba(255, 85, 0, 0.1);
  animation: pulseRing 2s infinite ease-in-out;
}

.checkmark-svg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
  stroke-width: 4;
  stroke: var(--color-accent-orange);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px rgba(255, 85, 0, 0.2);
  animation: fillCircle .4s ease-in-out .4s forwards, scaleCheck .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 4;
  stroke-miterlimit: 10;
  stroke: var(--color-accent-orange);
  fill: none;
  animation: strokeCircle .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #000;
  animation: strokeCheck .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

.thanks-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-accent-orange);
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(255, 85, 0, 0.2);
}

.event-details-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 85, 0, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  width: 100%;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.event-details-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 0.75rem;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 85, 0, 0.3), transparent);
  margin: 0.75rem 0;
}

.details-text {
  font-family: var(--font-sec);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.meta-label {
  color: var(--color-text-muted);
  font-weight: 700;
}

.meta-val {
  color: #fff;
  font-weight: 800;
}

.whatsapp-prompt {
  font-family: var(--font-sec);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  max-width: 90%;
}

.whatsapp-btn {
  background: #25D366;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  padding: 1.1rem 2rem;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.wa-icon {
  width: 20px;
  height: 20px;
}

/* Animations */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes subtleZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

/* Success Checkmark Animations */
@keyframes strokeCircle {
  100% { stroke-dashoffset: 0; }
}

@keyframes strokeCheck {
  100% { stroke-dashoffset: 0; }
}

@keyframes fillCircle {
  100% { fill: var(--color-accent-orange); }
}

@keyframes scaleCheck {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}

/* Custom fade effects for views swap */
.fade-out-animation {
  animation: fadeOut 0.3s ease forwards;
}

.fade-in-animation {
  animation: fadeIn 0.4s ease-out forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .split-layout {
    flex-direction: column;
  }
  
  .left-panel {
    display: none; /* Hide Desktop typography */
  }
  
  .right-panel {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }
  
  .phone-frame {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    aspect-ratio: auto;
    box-shadow: none;
  }
  
  .hero-section {
    aspect-ratio: 1.45/1; /* Más ancho y bajo para recortar y subir elementos */
  }
  
  .content-section {
    padding: 1.25rem 1rem 2rem 1rem;
  }
  
  .promo-heading {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
  }
  
  .promo-subheading {
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
  }
  
  .webinar-tag {
    font-size: 0.72rem;
    margin-bottom: 1rem;
  }
  
  .scroll-prompt-container {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 360px) {
  .promo-heading {
    font-size: 1.25rem;
  }
  
  .submit-btn {
    font-size: 1rem;
    padding: 1rem;
  }
}

/* Ocultar la sección del héroe dentro de la tarjeta de celular sólo en vista escritorio */
@media (min-width: 901px) {
  .phone-screen .hero-section {
    display: none;
  }
}

