/* Estilos personalizados sobre Tailwind para look cyberpunk neon */

:root {
  --accent: #008373;
}

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Utilidades similares a las clases de Tailwind usadas con @apply */

.section-padded {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
  max-width: 72rem; /* similar a max-w-6xl */
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .section-padded {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgb(110 231 183); /* emerald-300 */
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-subtitle {
  font-size: 0.875rem;
  color: rgb(203 213 225); /* slate-300 */
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: rgb(16 185 129);
  color: rgb(15 23 42);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.9);
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary:hover {
  background-color: rgb(52 211 153);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: rgb(190 242 100);
  background-color: transparent;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn-ghost:hover {
  background-color: rgba(16, 185, 129, 0.08);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: rgb(226 232 240);
}

.form-input {
  width: 100%;
  border-radius: 0.75rem;
  background-color: rgba(15, 23, 42, 0.7);
  border: 1px solid rgb(51 65 85);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(241 245 249);
}

.form-input::placeholder {
  color: rgb(100 116 139);
}

.form-input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 1);
}

.nav-link {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: rgb(226 232 240);
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link:hover {
  background-color: rgba(15, 23, 42, 0.85);
}

.icon-btn {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(52, 211, 153, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgb(190 242 100);
  background-color: transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.icon-btn:hover {
  background-color: rgba(16, 185, 129, 0.08);
}

#hero-gradient {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.5), transparent 55%),
              radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.45), transparent 55%),
              radial-gradient(circle at top right, rgba(16, 185, 129, 0.5), transparent 55%);
  filter: blur(2px);
}

/* Temas globales: dark / light con fondos neon y contraste de texto */

html.dark body {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(147, 51, 234, 0.18), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.16), transparent 55%),
    #020617;
  color: rgb(226 232 240);
}

html.light body {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.35), transparent 55%),
    linear-gradient(135deg, #cbd5f5 0%, #e2e8f0 45%, #c4f1e2 100%);
  color: rgb(15 23 42);
}

/* Contenedor de página para aplicar glow suave en los bordes */

.page-shell {
  position: relative;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.08), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(56, 189, 248, 0.08), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.9;
  z-index: -1;
}

/* Navbar translúcido tipo glassmorphism */

.glass-nav {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

html.dark .glass-nav {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 55%),
              rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.95);
}

html.light .glass-nav {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 55%),
              rgba(248, 250, 252, 0.78);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

html.light .nav-link {
  color: rgb(30 64 175);
}

html.light .nav-link:hover {
  background-color: rgba(191, 219, 254, 0.8);
}

html.light .btn-primary {
  background-color: #008373;
  color: white;
}

html.light .btn-primary:hover {
  background-color: #00a689;
}

html.light .btn-ghost {
  border-color: rgba(14, 116, 144, 0.6);
  color: #0369a1;
}

html.light .btn-ghost:hover {
  background-color: rgba(56, 189, 248, 0.12);
}

html.light .form-input {
  background-color: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.9);
  color: rgb(15 23 42);
}

html.light .form-label {
  color: rgb(15 23 42);
}

/* Correcciones de contraste para modo claro cuando se usan clases de texto oscuras de Tailwind */

html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: rgb(30 41 59); /* slate-800 */
}

html.light .text-slate-400,
html.light .text-slate-500 {
  color: rgb(51 65 85); /* slate-700 */
}

html.light .text-emerald-300 {
  color: #008373; /* acento principal en light */
}

/* Subtítulos de sección y descripciones en modo claro */

html.light .section-subtitle {
  color: rgb(51 65 85); /* slate-700 */
}

html.light .eyebrow {
  color: #008373;
}

/* Cards del catálogo en modo claro: fondo más oscuro para mejor contraste */

html.light .plan-card {
  background-color: rgba(15, 23, 42, 0.88); /* azul oscuro pero no negro */
  border-color: rgba(22, 163, 74, 0.6);
}

html.light .plan-card h3,
html.light .plan-card p {
  color: rgb(226 232 240);
}


/* Estilos David */

.servicio {
    filter: drop-shadow(rgba(0, 0, 0, 0.5));
}

/* Animaciones CSS adicionales */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(16,185,129,0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(16,185,129,0.6), 0 0 60px rgba(56,189,248,0.3);
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes bounce-subtle {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
  }
}

@keyframes border-dance {
  0%, 100% {
    border-color: rgba(16,185,129,0.4);
  }
  33% {
    border-color: rgba(56,189,248,0.4);
  }
  66% {
    border-color: rgba(147,51,234,0.4);
  }
}

@keyframes text-glow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(16,185,129,0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(16,185,129,0.8), 0 0 30px rgba(16,185,129,0.4);
  }
}

/* Aplicar animaciones a elementos */

.plan-card {
  animation: float 6s ease-in-out infinite, pulse-glow 8s ease-in-out infinite;
}

.plan-card:nth-child(2n) {
  animation-delay: 1s, 2s;
}

.plan-card:nth-child(3n) {
  animation-delay: 2s, 3s;
}

.section-title {
  animation: text-glow 5s ease-in-out infinite;
}

.btn-primary, .btn-ghost {
  animation: bounce-subtle 4s ease-in-out infinite;
  transition: all 0.3s ease;
}

.btn-primary:hover, .btn-ghost:hover {
  animation: pulse-glow 1s ease-in-out infinite;
}

.eyebrow {
  animation: text-glow 4s ease-in-out infinite;
}

.glass-nav {
  animation: border-dance 10s linear infinite;
}

/* Efecto de shimmer para cards destacadas */
.plan-card[data-highlight="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(16,185,129,0.2),
    transparent
  );
  animation: shimmer 3s infinite;
}

/* Animación de entrada para todos los elementos */
.fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efecto parallax suave */
.section-padded {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

/* Hover mejorado para links */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.8), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: translateX(0);
  animation: shimmer 1s infinite;
}

/* Efecto de resplandor en imágenes */
.plan-card img {
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(16,185,129,0.3));
  transition: all 0.3s ease;
}

.plan-card img:hover {
  filter: drop-shadow(0 0 20px rgba(16,185,129,0.6)) brightness(1.1);
  transform: scale(1.05) rotate(2deg);
}

/* Animación de carga para la página */
@keyframes pageLoad {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body {
  animation: pageLoad 0.8s ease-out;
}

/* Efecto de onda en hover para botones */
.btn-primary, .btn-ghost {
  position: relative;
  overflow: hidden;
}

.btn-primary::before, .btn-ghost::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;
}

.btn-primary:hover::before, .btn-ghost:hover::before {
  width: 300px;
  height: 300px;
}

/* Animación de escritura para títulos */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Efecto de partículas en el fondo */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0.6;
  }
}
