/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
  /* Colores principales */
  --primary: #1e3a5f;
  --primary-light: #4a90d9;
  --primary-dark: #0d1f33;
  --primary-foreground: #ffffff;
  
  /* Colores secundarios */
  --secondary: #f8fafc;
  --secondary-dark: #e2e8f0;
  
  /* Colores de texto */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  /* Otros */
  --background: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
  
  /* Espaciado */
  --container-max: 1200px;
  --section-padding: 6rem;
  
  /* Tipografía */
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transiciones */
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--background);
  line-height: 1.6;
}

/* ==========================================
   UTILIDADES
   ========================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.section-label.light {
  color: var(--primary-light);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-title.light {
  color: var(--primary-foreground);
}

.section-title .highlight {
  color: var(--primary-light);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, 0.8);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--shadow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-foreground);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-full {
  width: 100%;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px var(--shadow);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  width: auto;
  height: 40px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-foreground);
  transition: var(--transition);
}

.header.scrolled .logo-text {
  color: var(--primary);
}

.logo-highlight {
  color: var(--primary-light);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-light);
  transition: var(--transition);
}

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

.header.scrolled .nav-link {
  color: var(--text-primary);
}

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

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--primary-foreground);
  transition: var(--transition);
}

.header.scrolled .mobile-menu-btn span {
  background-color: var(--primary);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.hero-circle-1 {
  top: 25%;
  left: -5rem;
  width: 24rem;
  height: 24rem;
  background-color: rgba(74, 144, 217, 0.2);
}

.hero-circle-2 {
  bottom: 25%;
  right: -5rem;
  width: 20rem;
  height: 20rem;
  background-color: rgba(13, 31, 51, 0.3);
}

.hero-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-ring-1 {
  width: 800px;
  height: 800px;
}

.hero-ring-2 {
  width: 600px;
  height: 600px;
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-top: 5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--primary-foreground);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  color: var(--primary-light);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 5rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-foreground);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-mouse {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.scroll-dot {
  width: 0.375rem;
  height: 0.75rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 0.25rem;
}

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

/* ==========================================
   ABOUT
   ========================================== */
.about {
  padding: var(--section-padding) 0;
  background-color: var(--secondary);
}

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

.about-content {
  max-width: 560px;
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
}

.about-features {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  background-color: rgba(74, 144, 217, 0.1);
  color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.feature h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 2rem;
  border-radius: 1rem;
  color: var(--primary-foreground);
}

.about-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

/* ==========================================
   APPROACH
   ========================================== */
.approach {
  padding: var(--section-padding) 0;
  background-color: var(--background);
}

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

.approach-card {
  background-color: var(--secondary);
  padding: 2rem;
  border-radius: 1rem;
  position: relative;
  transition: var(--transition);
  border: 1px solid transparent;
}

.approach-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--primary-light);
}

.approach-card-number {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(74, 144, 217, 0.15);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

.approach-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.approach-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ==========================================
   SERVICES
   ========================================== */
.services {
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

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

.service-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  position: relative;
}

.service-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.service-card.featured {
  background-color: var(--primary-foreground);
  border-color: transparent;
}

.service-card.featured:hover {
  background-color: var(--primary-foreground);
}

.service-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.5rem;
  background-color: var(--primary-light);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-foreground);
  margin-bottom: 0.75rem;
}

.service-card.featured h3 {
  color: var(--text-primary);
}

.service-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.service-card.featured p {
  color: var(--text-secondary);
}

.service-features {
  list-style: none;
}

.service-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.service-card.featured .service-features li {
  color: var(--text-secondary);
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 600;
}

/* ==========================================
   METHODOLOGY
   ========================================== */
.methodology {
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 255, 255, 0.2);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-left: 6rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-number {
  position: absolute;
  left: 0;
  width: 4rem;
  height: 4rem;
  background-color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 10px 30px var(--shadow-lg);
  z-index: 10;
}

.timeline-content {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 1;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-foreground);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact {
  padding: var(--section-padding) 0;
  background-color: var(--secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

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

.contact-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.contact-form-wrapper {
  background-color: var(--background);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 40px var(--shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background-color: var(--background);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

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

.error-message {
  font-size: 0.8125rem;
  color: #dc2626;
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #dc2626;
}

.form-group.error .error-message {
  display: block;
}

.contact-form .btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 1rem 2rem;
  margin-top: 0.5rem;
}

.contact-form .btn-primary:hover {
  background-color: var(--primary-dark);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background-color: var(--primary-dark);
  color: var(--primary-foreground);
  padding: 4rem 0 2rem;
}

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

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  font-size: 0.9375rem;
  max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

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

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

/* ==========================================
   ANIMACIONES
   ========================================== */
.animate-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.animate-fade-up-delay-1 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.animate-fade-up-delay-2 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.animate-fade-up-delay-3 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.6s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .approach-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 10px 30px var(--shadow);
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav-link {
    color: var(--text-primary);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .approach-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline-line {
    left: 1.5rem;
  }
  
  .timeline-item {
    padding-left: 5rem;
  }
  
  .timeline-number {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
  /* Soporte visual para errores del formulario */
.form-group.error input, 
.form-group.error textarea {
    border-color: #dc2626;
}

.error-message {
    color: #dc2626;
    font-size: 0.8125rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}
 /* ==================== ESTILOS BOTÓN WHATSAPP ==================== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999; /* Asegura que flote por encima de secciones, sliders y menús */
  transition: all 0.3s ease;
}


}
/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP REAL
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366 !important; /* Fuerza el color verde nativo */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 999999 !important; /* Lo pone por encima de absolutamente todo */
  transition: all 0.3s ease-in-out;
  text-decoration: none;
}

/* Animación sutil al pasar el mouse por encima */
.whatsapp-float:hover {
  background-color: #128c7e !important;
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.5);
}

/* Centrado explícito para el icono SVG interno */
.whatsapp-float svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: #ffffff !important;
}

/* Optimización para teléfonos móviles */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}