/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* FIX CRÍTICO: Eliminar tap highlight y mejorar touch */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: #0a0a0a;
  overflow-x: hidden;
  position: relative;
  /* Aislamiento para stacking context */
  isolation: isolate;
}

/* Fondo estático con luces intensificadas */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.4) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.4) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 70%,
      rgba(236, 72, 153, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(16, 185, 129, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(249, 115, 22, 0.3) 0%,
      transparent 50%
    ),
    #0a0a0a;
  z-index: -10;
  pointer-events: none !important;
}

/* Overlay para transición suave al CTA */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 70%,
    rgba(99, 102, 241, 0.1) 85%,
    rgba(139, 92, 246, 0.2) 100%
  );
  z-index: -9;
  pointer-events: none !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  isolation: isolate;
}

/* =====================================================
   NAVEGACIÓN - COMPLETAMENTE REDISEÑADA PARA MÓVIL
===================================================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  isolation: isolate;
}

.nav-logo .logo {
  height: 40px;
  transition: transform 0.3s ease;
  z-index: 100001;
  position: relative;
}

.nav-logo .logo:hover {
  transform: scale(1.05);
}

/* MENÚ DESKTOP */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 100001;
  position: relative;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  /* CRÍTICO: Área táctil mejorada */
  padding: 0.75rem 1rem;
  touch-action: manipulation;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  z-index: 100002;
}

.nav-link:hover {
  color: #6366f1;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 1rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: calc(100% - 2rem);
}

/* BOTÓN CTA NAVEGACIÓN */
.nav-cta {
  background: #fc5e51 !important;
  color: white !important;
  border: none !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  /* CRÍTICO: Touch optimizado */
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  min-height: 44px !important;
  min-width: 44px !important;
  position: relative !important;
  z-index: 100002 !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(252, 94, 81, 0.3);
}

.nav-cta:active {
  transform: translateY(0) scale(0.98);
}

/* MENÚ HAMBURGUESA - OPTIMIZADO PARA MÓVIL */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  gap: 4px;
  /* CRÍTICO: Área táctil mínima */
  padding: 12px;
  min-height: 48px;
  min-width: 48px;
  background: none;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 100003;
  pointer-events: auto !important;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background: #ffffff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Animaciones del hamburger */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* =====================================================
   HERO SECTION - OPTIMIZADO
===================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  background: transparent;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.2),
    transparent
  );
  z-index: -1;
  pointer-events: none !important;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
  isolation: isolate;
  overflow: visible;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  animation: slideInLeft 1s ease-out;
  position: relative;
  z-index: 11;
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  user-select: text;
  -webkit-user-select: text;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #a1a1aa;
  margin-bottom: 2.5rem;
  max-width: 500px;
  user-select: text;
  -webkit-user-select: text;
}

/* BOTONES HERO - OPTIMIZADOS PARA MÓVIL */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 12;
  position: relative;
}

.hero-buttons-center {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 2rem;
  z-index: 12;
  position: relative;
}

.btn-primary {
  background: #fc5e51 !important;
  color: white !important;
  border: none !important;
  padding: 1rem 2rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  /* CRÍTICO: Touch optimizado */
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  min-height: 48px !important;
  min-width: 48px !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(252, 94, 81, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary.large {
  padding: 1.5rem 3rem !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  min-height: 56px !important;
}

.btn-secondary {
  background: transparent !important;
  color: #fc5e51 !important;
  border: 2px solid #fc5e51 !important;
  padding: 1rem 2rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  /* CRÍTICO: Touch optimizado */
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  min-height: 48px !important;
  min-width: 48px !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-secondary:hover {
  background: rgba(252, 94, 81, 0.1) !important;
  border-color: #fc5e51 !important;
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* VISUAL DEL HERO */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: slideInRight 1s ease-out;
  pointer-events: none;
}

.graphic-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  pointer-events: none;
}

.hero-graphic {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.graphic-img {
  width: 400px;
  height: auto;
  position: relative;
  z-index: 1;
  margin: 20px auto;
  display: block;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  pointer-events: none !important;
}

/* ELEMENTOS FLOTANTES */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: -1;
}

.float-element,
.float-image {
  pointer-events: none !important;
  z-index: -1;
}

.float-element {
  position: absolute;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  opacity: 0.6;
}

.element-1 {
  top: 20%;
  left: 10%;
  animation: floatElement 4s ease-in-out infinite;
}

.element-2 {
  top: 60%;
  right: 15%;
  animation: floatElement 5s ease-in-out infinite reverse;
}

.element-3 {
  bottom: 30%;
  left: 20%;
  animation: floatElement 6s ease-in-out infinite;
}

.float-image {
  position: absolute;
  width: 260px;
  height: auto;
  opacity: 1;
  filter: drop-shadow(0 5px 15px rgba(99, 102, 241, 0.3));
}

.element-4 {
  top: 15%;
  right: 20%;
  animation: floatImage 7s ease-in-out infinite;
  margin-right: 120px;
}

.element-5 {
  bottom: 20%;
  right: 10%;
  animation: floatImage 8s ease-in-out infinite reverse;
  margin-left: 99px;
}

/* FONDO DEL HERO */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  pointer-events: none !important;
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: -8;
  pointer-events: none !important;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: -200px;
  right: -200px;
  animation: pulse 8s ease-in-out infinite;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #ec4899, #f97316);
  bottom: 90px;
  left: -150px;
  animation: pulse 6s ease-in-out infinite reverse;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 10s ease-in-out infinite;
}

/* ANIMACIÓN DE PALABRAS CAMBIANTES */
.switch-word-container {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 1em;
}

.words {
  overflow: hidden;
  position: relative;
  height: 1.4em;
  min-width: 120px;
  text-align: left;
}

.word {
  display: block;
  width: 100%;
  padding-left: 0;
  color: #ffffff;
  line-height: 1.4em;
  animation: spin_words 10s infinite;
}

/* =====================================================
   SERVICES SECTION
===================================================== */
.services {
  padding: 8rem 0;
  background: transparent;
  position: relative;
  z-index: 5;
  isolation: isolate;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: text;
  -webkit-user-select: text;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #a1a1aa;
  max-width: 600px;
  margin: 0 auto;
  user-select: text;
  -webkit-user-select: text;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.service-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.service-icon svg {
  width: 30px;
  height: 30px;
  color: white;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  user-select: text;
  -webkit-user-select: text;
}

.service-card p {
  color: #a1a1aa;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  user-select: text;
  -webkit-user-select: text;
}

.service-card.hidden-card {
  display: none;
}

.service-card.hidden-card.show {
  display: block;
  animation: slideInUp 0.4s ease-out;
}

.view-more-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.view-more-button {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: white !important;
  border: none !important;
  padding: 1rem 2.5rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  position: relative !important;
  overflow: hidden !important;
  /* CRÍTICO: Touch optimizado */
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  min-height: 48px !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
}

.view-more-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.view-more-button:active {
  transform: translateY(0) scale(0.98);
}

.view-more-button .arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.view-more-button.expanded .arrow-icon {
  transform: rotate(180deg);
}

/* =====================================================
   ABOUT SECTION
===================================================== */
.about {
  padding: 8rem 0;
  background: transparent;
  position: relative;
  z-index: 5;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-description {
  color: #a1a1aa;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  user-select: text;
  -webkit-user-select: text;
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: #a1a1aa;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.about-visual {
  position: relative;
}

.image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.about-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(139, 92, 246, 0.2)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-container:hover .about-image {
  transform: scale(1.05);
}

.image-container:hover .image-overlay {
  opacity: 1;
}

/* =====================================================
   FEATURES SECTION
===================================================== */
.features {
  padding: 8rem 0;
  background: transparent;
  position: relative;
  z-index: 5;
  margin-top: -30px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  user-select: text;
  -webkit-user-select: text;
}

.feature-item p {
  color: #a1a1aa;
  line-height: 1.6;
  user-select: text;
  -webkit-user-select: text;
}

/* =====================================================
   CTA SECTION
===================================================== */
.cta {
  padding: 8rem 0;
  background: transparent;
  text-align: center;
  position: relative;
  z-index: 6;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  user-select: text;
  -webkit-user-select: text;
}

.cta-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  user-select: text;
  -webkit-user-select: text;
}

.cta .btn-primary {
  background: rgba(252, 94, 81, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  border: 2px solid rgba(252, 94, 81, 0.3) !important;
  color: white !important;
}

.cta .btn-primary:hover {
  background: rgba(252, 94, 81, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(252, 94, 81, 0.2);
}

.center-contact-button {
  display: block;
  margin-left: auto;
  margin-right: auto;
  z-index: 999999 !important;
  position: relative;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
  background: #000000;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 6;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  height: auto;
  width: 150px;
  max-width: 100%;
  object-fit: contain;
}

.footer-brand p {
  color: #a1a1aa;
  user-select: text;
  -webkit-user-select: text;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
  user-select: text;
  -webkit-user-select: text;
}

.footer-column a {
  display: block;
  color: #a1a1aa;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
  padding: 0.25rem 0;
  touch-action: manipulation;
  cursor: pointer;
}

.footer-column a:hover {
  color: #6366f1;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #a1a1aa;
  user-select: text;
  -webkit-user-select: text;
}

/* =====================================================
   MODAL COMPLETO - OPTIMIZADO PARA MÓVIL
===================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  background: rgba(20, 20, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 2.5rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000000;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.modal-overlay.visible .modal-content {
  transform: translateY(0);
}

.modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2rem;
  margin-top: 0;
  line-height: 1.3;
  padding-right: 60px;
  user-select: text;
  -webkit-user-select: text;
}

.modal-form .form-group {
  margin-bottom: 1.25rem;
}

.modal-form input {
  width: 100%;
  padding: 1rem;
  background-color: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 16px !important; /* Prevenir zoom en iOS */
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: text;
  -webkit-user-select: text;
}

.modal-form input::placeholder {
  color: #a1a1aa;
}

.modal-form input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1000001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto !important;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.modal-close-btn:active {
  transform: scale(0.95);
  opacity: 0.8;
}

.modal-submit-btn {
  width: 100% !important;
  padding: 1rem !important;
  font-size: 1.1rem !important;
  margin-top: 1rem !important;
  border-radius: 12px !important;
  background: #fc5e51 !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-height: 48px !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  z-index: 1000001 !important;
  pointer-events: auto !important;
  position: relative !important;
}

.modal-submit-btn:hover {
  background: #e04e42 !important;
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(252, 94, 81, 0.4);
}

.modal-submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.modal-submit-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background: #666 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Mensajes del formulario */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  animation: messageSlideIn 0.3s ease-out;
  border: 1px solid;
}

.form-message.success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.form-message.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.form-message.info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* =====================================================
   ANIMACIONES
===================================================== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes floatElement {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(180deg);
  }
}

@keyframes floatImage {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-25px) rotate(5deg) scale(1.05);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

@keyframes spin_words {
  0% {
    transform: translateY(0%);
  }
  16.6% {
    transform: translateY(-100%);
  }
  33.2% {
    transform: translateY(-200%);
  }
  49.8% {
    transform: translateY(-300%);
  }
  66.4% {
    transform: translateY(-400%);
  }
  83% {
    transform: translateY(-500%);
  }
  100% {
    transform: translateY(-500%);
  }
}

/* =====================================================
   RESPONSIVE DESIGN - MÓVIL PRIMERO
===================================================== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .graphic-container {
    transform: translateX(0) scale(1.2);
  }
}

/* MÓVILES - OPTIMIZACIÓN CRÍTICA */
@media (max-width: 768px) {
  /* NAVEGACIÓN MÓVIL */
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: right 0.3s ease;
    z-index: 99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.active {
    right: 0;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 18px;
    margin: 20px 0;
    padding: 15px 30px;
    text-align: center;
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-cta {
    margin-top: 30px !important;
    padding: 15px 35px !important;
    font-size: 16px !important;
    min-height: 56px !important;
    width: 100% !important;
    max-width: 200px !important;
  }

  .hamburger {
    display: flex !important;
  }

  /* HERO MÓVIL */
  .hero {
    padding-top: 100px;
    min-height: 100vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-title,
  .hero-subtitle {
    text-align: left;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .hero-buttons .btn-primary {
    width: 100%;
    max-width: 280px;
    min-height: 56px !important;
    padding: 1.25rem 2rem !important;
    font-size: 1.1rem !important;
  }

  .btn-primary,
  .btn-secondary {
    padding: 1.25rem 2rem !important;
    font-size: 1rem !important;
    min-height: 56px !important;
    min-width: 56px !important;
  }

  .btn-primary.large {
    padding: 1.5rem 2.5rem !important;
    font-size: 1.2rem !important;
    min-height: 60px !important;
  }

  .graphic-img {
    width: 280px;
    max-width: 90vw;
  }

  /* SERVICIOS MÓVIL */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 2rem 1.5rem;
  }

  /* FEATURES MÓVIL */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* ABOUT MÓVIL */
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
  }

  /* FOOTER MÓVIL */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* MODAL MÓVIL */
  .modal-content {
    width: 95%;
    padding: 2rem 1.5rem;
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .modal-title {
    font-size: 1.5rem;
    padding-right: 50px;
    margin-bottom: 1.5rem;
  }

  .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .modal-form input {
    padding: 1.25rem;
    font-size: 16px !important;
  }

  .modal-submit-btn {
    padding: 1.25rem !important;
    font-size: 1.1rem !important;
    margin-top: 1.5rem !important;
    min-height: 56px !important;
  }

  /* OCULTAR ORBS EN MÓVIL PARA MEJOR RENDIMIENTO */
  .gradient-orb {
    display: none !important;
  }

  .hero-background {
    display: none !important;
  }

  body::after {
    display: none !important;
  }
}

/* MÓVILES PEQUEÑOS */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 1rem;
  }

  .hero {
    padding-top: 100px;
  }

  .service-card {
    padding: 1.5rem;
  }

  .stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary,
  .nav-cta {
    min-height: 52px !important;
    font-size: 1rem !important;
  }

  .hamburger {
    min-height: 52px !important;
    min-width: 52px !important;
    padding: 14px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    padding: 1.5rem;
    max-height: calc(100vh - 20px);
  }
}

/* =====================================================
   UTILIDADES Y CLASES AUXILIARES
===================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 2rem;
}

.background-shared {
  position: relative;
  z-index: 1;
}

.center-btn {
  display: block;
  margin-left: auto;
  margin-right: auto;
  transform: scale(1.2);
}

.center-btn:hover {
  transform: scale(1.2) !important;
}

/* =====================================================
   OPTIMIZACIONES ADICIONALES PARA MÓVIL
===================================================== */

/* Scroll suave optimizado */
.scrolling * {
  pointer-events: none;
}

.scrolling .navbar,
.scrolling .modal-overlay,
.scrolling button,
.scrolling a {
  pointer-events: auto;
}

/* Prevenir selección accidental en elementos decorativos */
.hero-graphic,
.graphic-img,
.service-icon,
.feature-number {
  user-select: none;
  -webkit-user-select: none;
}

/* Mejorar rendimiento de animaciones */
.btn-primary,
.btn-secondary,
.nav-cta,
.service-card,
.feature-item {
  will-change: transform;
}

/* Fix final para iOS Safari */
@supports (-webkit-touch-callout: none) {
  .modal-overlay {
    -webkit-overflow-scrolling: touch;
  }
  
  input, textarea {
    -webkit-appearance: none;
    border-radius: 12px;
  }
  
  button {
    -webkit-appearance: none;
  }
}

/* Media query para dispositivos con hover disponible */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .nav-cta:hover {
    transform: translateY(-2px);
  }
}

/* Media query para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .nav-cta:hover,
  .service-card:hover,
  .feature-item:hover {
    transform: none;
  }
  
  .btn-primary:active,
  .btn-secondary:active,
  .nav-cta:active {
    transform: scale(0.95);
    opacity: 0.9;
  }
}

/* CRÍTICO: Asegurar que NADA bloquee los botones */
* {
  isolation: isolate;
}

body,
.hero,
.hero-background,
.gradient-orb,
.floating-elements {
  pointer-events: none !important;
}

.hero-container,
.container,
.navbar,
button,
a,
input,
.modal-overlay,
.service-card,
.nav-menu {
  pointer-events: auto !important;
}