/* ===================================
   CSS Variables & Theme System
   =================================== */
:root {
  /* Colors */
  --primary: #667eea;
  --secondary: #764ba2;
  --accent: #f59e0b;
  --success: #10b981;
  --white: #ffffff;
  --gray-light: #f8f9fa;
  --gray-medium: #6b7280;
  --gray-dark: #1f2937;
  --black: #000000;

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-primary);

  /* Timing Functions - Professional Easing */
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1);

  /* Durations */
  --duration-fast: 0.3s;
  --duration-normal: 0.6s;
  --duration-slow: 1.2s;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  /* Border Radius */
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;

  /* Z-index Layers */
  --z-loader: 9999;
  --z-cursor: 9998;
  --z-header: 1000;
  --z-modal: 999;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--gray-dark);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===================================
   Typography
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-dark);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  line-height: 1.6;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
}

.seo-text {
  position: absolute;
  left: -9999px;
  height: 1px;
  overflow: hidden;
}


/* ===================================
   Page Loader
   =================================== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader);
  transition: opacity 0.5s var(--ease-out-expo), visibility 0.5s;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  color: var(--white);
}

.loader-logo {
  font-size: 4rem;
  font-weight: 900;
  font-family: var(--font-display);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-direction: column;
}
.char{
    margin: -0.2rem !important;
}
.loader-logo .char {
  display: inline-block;
  animation: loader-bounce 0.6s var(--ease-out-expo) forwards;
}

.loader-logo .char:nth-child(1) {
  animation-delay: 0s;
}

.loader-logo .char:nth-child(2) {
  animation-delay: 0.1s;
}

.p-loader{
    display: flex;
    justify-content: left;
    align-items: start;
    text-align: start;
}

@keyframes loader-bounce {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.5);
  }
  50% {
    transform: translateY(10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.loader-bar-container {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 1rem;
}

.loader-bar {
  height: 100%;
  background: var(--white);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.loader-percentage {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ===================================
   Custom Cursor
   =================================== */
.custom-cursor {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--white);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
}

.cursor-hover .cursor-outline {
  width: 60px;
  height: 60px;
}

/* Hide cursor on mobile */
@media (max-width: 768px) {
  .custom-cursor {
    display: none;
  }
}

/* ===================================
   Container
   =================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================================
   Buttons with Advanced Effects
   =================================== */
.btn-primary,
.btn-outline {
  position: relative;
  display: inline-block;
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast) var(--ease-out-expo);
  overflow: hidden;
  isolation: isolate;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

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

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-white {
  color: var(--white);
  border-color: var(--white);
}

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

.btn-full {
  width: 100%;
}

/* Magnetic Button Effect */
.magnetic-btn {
  will-change: transform;
  transition: transform 0.3s var(--ease-out-expo);
}

/* ===================================
   Header / Navigation
   =================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

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

/* ===== DROPDOWN BASE ===== */
.nav-item {
  position: relative;
}
.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;

  background: #111;
  border-radius: 12px;
  padding: 12px 0;

  min-width: 220px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);

  transition: all 0.25s ease;
  z-index: 999;
}

/* Links del dropdown */
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.08);
}

.logo {
  font-size: 1.75rem;
  font-weight: 900;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  display: flex;
  gap: 0.25rem;
}

.logo-letter {
  display: inline-block;
  transition: transform 0.3s var(--ease-out-expo);
}

.logo-letter:hover {
  transform: scale(1.2) rotate(-10deg);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--gray-dark);
  position: relative;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--duration-fast) var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--gray-dark);
  border-radius: 3px;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

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

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

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

/* ===================================
   Hero Section with Advanced Animations
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 50%,
    rgba(245, 158, 11, 0.03) 100%
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Floating Shapes */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float-shape 20s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  top: 50%;
  right: 10%;
  animation-delay: 7s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: var(--accent);
  bottom: 10%;
  left: 30%;
  animation-delay: 14s;
}

@keyframes float-shape {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -50px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 30px) rotate(240deg);
  }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Text Reveal Animation */
.hero-title {
  margin-bottom: 1.5rem;
  perspective: 1000px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.word{
    margin: 1rem;
}

.hero-title .word {
  display: inline-block;
  margin-right: 0.5rem;
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: text-reveal 0.8s var(--ease-out-expo) forwards;
}

@keyframes text-reveal {
  from {
    opacity: 0;
    transform: translateY(100%) rotateX(-90deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* Stagger animation delays for each character */
.hero-title .char:nth-child(1) {
  animation-delay: 1.5s;
}
.hero-title .char:nth-child(2) {
  animation-delay: 1.55s;
}
.hero-title .char:nth-child(3) {
  animation-delay: 1.6s;
}
.hero-title .char:nth-child(4) {
  animation-delay: 1.65s;
}
.hero-title .char:nth-child(5) {
  animation-delay: 1.7s;
}
.hero-title .char:nth-child(6) {
  animation-delay: 1.75s;
}
.hero-title .char:nth-child(7) {
  animation-delay: 1.8s;
}
.hero-title .char:nth-child(8) {
  animation-delay: 1.85s;
}
.hero-title .char:nth-child(9) {
  animation-delay: 1.9s;
}
.hero-title .char:nth-child(10) {
  animation-delay: 1.95s;
}
.hero-title .char:nth-child(11) {
  animation-delay: 2s;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray-medium);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.badge:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.badge-icon {
  font-size: 1.25rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll Indicator */
.scroll-indicator {
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-medium);
  font-size: 0.875rem;
  font-weight: 500;
  padding-top: 2rem;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--gray-medium);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--gray-medium);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s ease infinite;
}

@keyframes scroll-wheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* ===================================
   Section Titles with Text Reveal
   =================================== */
.section-title {
  text-align: center;
  margin-bottom: 1rem;
  perspective: 1000px;
}

.section-title .word {
  display: inline-block;
  margin-right: 0.5rem;
}

.section-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
}

.section-title.animated .char {
  animation: text-reveal 0.6s var(--ease-out-expo) forwards;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-medium);
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle-loader {
  text-align: center;
  color: var(--black);
  font-size: 1.125rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
transition: transform 0.3s var(--ease-out-expo);

}



.section-subtitle-loader:hover {
  transform: scale(1.2) rotate(-10deg);
}

.section-subtitle-nav {
  text-align: center;
  color: var(--gray-dark);
  font-size: 1.125rem;
  max-width: 700px;
  margin-left: 5%;
  margin-right: auto;
transition: transform 0.3s var(--ease-out-expo);

}

/* ===================================
   Calculator Section
   =================================== */
.calculator-section {
  padding: 6rem 0;
  background: var(--gray-light);
}

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

.service-card {
  position: relative;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  overflow: hidden;
}

/* Service Card Glow Effect */
.service-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-normal);
  pointer-events: none;
}

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

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

.service-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.service-type {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-dark);
}

.service-badge {
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.service-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.service-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-medium);
}

.service-description {
  color: var(--gray-medium);
  margin-bottom: 1rem;
}

.service-expand-hint {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

.service-details {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
}

.service-card.active .service-details {
  display: block;
  animation: slideDown var(--duration-fast) var(--ease-out-expo);
}

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

.service-includes {
  margin-bottom: 1.5rem;
}

.service-includes h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.service-includes ul {
  list-style: none;
}

.service-includes li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-includes li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 1.125rem;
}

.service-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.service-time,
.service-ideal {
  flex: 1;
  min-width: 200px;
}

.service-time strong,
.service-ideal strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gray-dark);
}

.service-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.service-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.service-btn:hover::before {
  left: 100%;
}

.service-btn:hover {
  background: var(--secondary);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ===================================
   Benefits Section
   =================================== */
.benefits-section {
  padding: 6rem 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.benefit-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: icon-bounce 2s ease infinite;
}

@keyframes icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.benefit-card h3 {
  margin-bottom: 0.75rem;
}

.benefit-card p {
  color: var(--gray-medium);
}

/* ===================================
   Process Section / Timeline
   =================================== */
.process-section {
  padding: 6rem 0;
  background: var(--gray-light);
}

.timeline {
  max-width: 900px;
  margin: 3rem auto 0;
  position: relative;
}

.timeline-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 70px;
  width: 2px;
  height: calc(100% + 3rem);
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  z-index: -1;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
  animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
  }
}

.timeline-content {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  flex: 1;
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.timeline-content:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-xl);
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gray-dark);
}

.timeline-list {
  list-style: none;
}

.timeline-list li {
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-medium);
}

.timeline-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
}
/* ===================================
   Portfolio Section
   =================================== */
.portfolio-section {
  padding: 6rem 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-2xl);
}

.portfolio-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

.portfolio-mockup {
  width: 90%;
  background: var(--white);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.portfolio-card:hover .portfolio-mockup {
  transform: translate(-50%, -50%) scale(1.05);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.portfolio-content h3 {
  margin-bottom: 0.75rem;
}

.portfolio-content p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.portfolio-tech {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.portfolio-tech span {
  padding: 0.25rem 0.75rem;
  background: var(--gray-light);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.portfolio-result {
  color: var(--success);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials-section {
  padding: 6rem 0;
  background: var(--gray-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.testimonial-stars {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 600;
  color: var(--gray-medium);
  font-size: 0.9rem;
}

/* ===================================
   FAQ Section
   =================================== */
.faq-section {
  padding: 6rem 0;
}

.faq-accordion {
  max-width: 800px;
  margin: 3rem auto 0;
}

.faq-item {
  background: var(--white);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-fast);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-dark);
  cursor: pointer;
  transition: background-color var(--duration-fast);
  background: var(--white);
  text-align: left;
}

.faq-question:hover {
  background: var(--gray-light);
}

.faq-icon {
  font-size: 1.5rem;
  transition: transform var(--duration-fast) var(--ease-out-expo);
  font-weight: 300;
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-fast) var(--ease-out-expo), padding var(--duration-fast);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
  color: var(--gray-medium);
  line-height: 1.6;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-bg-animated {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: cta-bg-move 10s ease infinite;
}

@keyframes cta-bg-move {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, -20px);
  }
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-title {
  color: var(--white);
  margin-bottom: 1rem;
}

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

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
  padding: 6rem 0;
  background: var(--gray-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out-expo), box-shadow var(--duration-fast);
}

.contact-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-xl);
}

.contact-icon {
  font-size: 2rem;
}

.contact-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-item a {
  color: var(--primary);
  transition: color var(--duration-fast);
}

.contact-item a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gray-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--gray-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-fast);
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.25rem;
  transition: background var(--duration-fast), transform var(--duration-fast) var(--ease-out-expo);
}

.social-icon:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

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

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* ===================================
   Scroll Reveal Animation
   =================================== */
[data-animate] {
  opacity: 0;
}

[data-animate="fade-up"] {
  transform: translateY(30px);
}

[data-animate="fade-in"] {
  opacity: 0;
}

[data-animate].animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-slow) var(--ease-out-expo), transform var(--duration-slow) var(--ease-out-expo);
}

/* Stagger delays */
[data-delay="100"].animated {
  transition-delay: 0.1s;
}
[data-delay="150"].animated {
  transition-delay: 0.15s;
}
[data-delay="200"].animated {
  transition-delay: 0.2s;
}
[data-delay="250"].animated {
  transition-delay: 0.25s;
}
[data-delay="300"].animated {
  transition-delay: 0.3s;
}
[data-delay="350"].animated {
  transition-delay: 0.35s;
}
[data-delay="400"].animated {
  transition-delay: 0.4s;
}
[data-delay="450"].animated {
  transition-delay: 0.45s;
}
[data-delay="500"].animated {
  transition-delay: 0.5s;
}
[data-delay="550"].animated {
  transition-delay: 0.55s;
}
[data-delay="600"].animated {
  transition-delay: 0.6s;
}
[data-delay="700"].animated {
  transition-delay: 0.7s;
}
[data-delay="800"].animated {
  transition-delay: 0.8s;
}
[data-delay="1000"].animated {
  transition-delay: 1s;
}
[data-delay="1200"].animated {
  transition-delay: 1.2s;
}
[data-delay="1500"].animated {
  transition-delay: 1.5s;
}


/* ===================================
   Theme Switcher
   =================================== */
.theme-switcher {
  position: fixed;
  top: 90px; /* Debajo del nav */
  right: 2rem;
  z-index: 999;
}

.theme-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  border: 2px solid var(--primary);
  color: var(--primary);
}

.theme-btn:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: var(--shadow-2xl);
}

.theme-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.theme-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background var(--duration-fast);
  font-weight: 500;
}

.theme-option:hover {
  background: var(--gray-light);
}

.theme-option.active {
  background: rgba(102, 126, 234, 0.1);
}

.theme-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
}

.theme-light {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.theme-dark {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.theme-blue {
  background: linear-gradient(135deg, #0066ff, #00ccff);
}

.theme-purple {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}

.theme-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* ===================================
   Theme Variations
   =================================== */
[data-theme="dark"] {
  --primary: #818cf8;
  --secondary: #6366f1;
  --accent: #fbbf24;
  --white: #1a1a2e;
  --gray-light: #16213e;
  --gray-medium: #94a3b8;
  --gray-dark: #f1f5f9;
  --black: #ffffff;
}

[data-theme="dark"] body {
  background: #0f172a;
  color: #f1f5f9;
}

[data-theme="dark"] #header {
  background: rgba(26, 26, 46, 0.8);
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .benefit-card,
[data-theme="dark"] .portfolio-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .contact-form,
[data-theme="dark"] .contact-item,
[data-theme="dark"] .timeline-content {
  background: #1e293b;
  color: #f1f5f9;
}

[data-theme="dark"] .nav-link,
[data-theme="dark"] .service-type,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #f1f5f9;
}

[data-theme="blue"] {
  --primary: #0066ff;
  --secondary: #00ccff;
  --accent: #0099ff;
}

[data-theme="purple"] {
  --primary: #a855f7;
  --secondary: #ec4899;
  --accent: #d946ef;
}

[data-theme="green"] {
  --primary: #10b981;
  --secondary: #059669;
  --accent: #34d399;
}

/* Footer en modo oscuro */
[data-theme="dark"] .footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
}

[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-bottom p {
  color: rgba(241, 245, 249, 0.7);
}

[data-theme="dark"] .footer-links a:hover {
  color: #f1f5f9;
}

[data-theme="dark"] .footer-links h4,
[data-theme="dark"] .footer-social h4 {
  color: #f1f5f9;
}

[data-theme="dark"] .social-icon {
  background: rgba(241, 245, 249, 0.1);
  color: #f1f5f9;
}

[data-theme="dark"] .social-icon:hover {
  background: var(--primary);
}
[data-theme="dark"] .footer-logo {
  color: var(--primary);
}
/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
/* Menú lateral */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: #ffffff; /* fondo blanco */
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  /* Dropdown container */
  .nav-item.dropdown {
    width: 100%;
  }

  /* Dropdown toggle */
  .dropdown-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #111;
    font-weight: 500;
    padding: 10px 0;
    text-decoration: none;
  }

  /* Dropdown menu: colapsado por defecto */
  .dropdown-menu {
    display: none;
    flex-direction: column;
    background: #f9f9f9;
    margin-top: 0.5rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
  }

  /* Dropdown abierto */
  .nav-item.dropdown.open .dropdown-menu {
    display: flex;
  }

  /* Links dentro del dropdown */
  .dropdown-menu a {
    color: #111;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 400;
  }

  .dropdown-menu a:hover {
    background: rgba(0,0,0,0.05);
  }

  /* Links normales */
  .nav-menu li {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Hamburger */
  .hamburger {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
  }

  .hamburger span {
    width: 25px;
    height: 3px;
    background: #111;
    border-radius: 3px;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .timeline-item {
    flex-direction: column;
    gap: 1rem;
  }

  .timeline-item::before {
    left: 30px;
    top: 70px;
  }

  .timeline-number {
    width: 60px;
    height: 60px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-image {
    height: 450px;
  }
}

@media (max-width: 899px) {
  .dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    padding-left: 16px;
  }

  .dropdown-menu a {
    padding: 8px 0;
  }
}

/* ===== DESKTOP: hover ===== */
@media (min-width: 900px) {
  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    padding: 6rem 0 3rem;
  }

  .hero-badges {
    flex-direction: column;
  }

  .badge {
    width: 100%;
    justify-content: center;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-outline {
    width: 100%;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-image {
    height: 250px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    max-width: 100%;
  }

  .social-icons {
    justify-content: center;
  }

   .theme-switcher {
    top: 90px;
    right: 1rem;
  }

  .theme-btn {
    width: 45px;
    height: 45px;
  }

  .theme-dropdown {
    right: 0;
    min-width: 160px;
  }
  /* Dropdown menú oculto */
.dropdown-menu {
  display: none;
  flex-direction: column;
  background: #f9f9f9;
  margin-top: 0.5rem;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  opacity: 1;
  visibility: visible;
  transform: none;
  position: static; /* Asegura que no sea absolute */
}

/* Dropdown abierto */
.nav-item.dropdown.open .dropdown-menu {
  display: flex;
}

/* Links dentro del dropdown */
.dropdown-menu a {
  color: #111;
  padding: 10px 12px;
  text-decoration: none;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 400;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  white-space: normal; /* Permite que el texto haga wrap */
  word-wrap: break-word; /* Rompe palabras largas si es necesario */
  line-height: 1.4;
}

.dropdown-menu a:hover {
  background: rgba(0,0,0,0.08);
}
}

/* ===================================
   Performance Optimizations
   =================================== */
.hero-bg,
.floating-shapes,
.gradient-mesh {
  will-change: transform;
}

.service-card,
.benefit-card,
.portfolio-card,
.testimonial-card {
  will-change: transform;
}

/* GPU Acceleration */
.btn-primary,
.btn-outline,
.magnetic-btn {
  transform: translateZ(0);
  backface-visibility: hidden;
}
