/* Paleta Clean & Light */
:root {
  --bg: #ffffff;
  --bg-alt: #f8faff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2d69ff;
  --primary-2: #4379ff;
  --accent: #00c08b;
  --danger: #ef4444;
  --card-bg: #ffffff;
  --border-light: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, .btn { font-weight: 700; letter-spacing: -0.02em; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; color: #0f172a; }
.section-title::after {
  content: ""; display: block; width: 60px; height: 4px; background: var(--primary); margin: 0.5rem auto 0; border-radius: 2px;
}

img.media { border-radius: .8rem; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: transform 0.3s ease; }
img.media:hover { transform: scale(1.02); }

/* Navbar Adaptive (Blue Hero) */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent; /* Transparente en Hero */
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  padding: 1rem 0;
}
.nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  padding: 0.6rem 0;
  border-bottom: none;
}
.navbar-brand .brand-logo { width: 42px; height: 42px; object-fit: cover; border-radius: .6rem; }

/* Texto Navbar (Estado Hero) */
.navbar-brand span { font-size: 1.25rem; letter-spacing: -0.01em; color: #fff; }
.navbar .nav-link {
  color: rgba(255,255,255,0.85); font-weight: 500; padding: 0.5rem 1rem; transition: color 0.2s;
}
.navbar .nav-link:hover { color: #fff; }

/* Texto Navbar (Estado Scrolled) */
.nav.scrolled .navbar-brand span { color: #0f172a; }
.nav.scrolled .nav-link { color: #64748b; }
.nav.scrolled .nav-link:hover { color: var(--primary); }

/* Botón Navbar */
.navbar .btn.btn-primary {
  background: #fff; border: none; padding: 0.6rem 1.4rem; color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s;
}
.navbar .btn.btn-primary:hover {
  transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); color: var(--primary);
}
/* Botón Navbar Scrolled */
.nav.scrolled .btn.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(45,105,255,0.25);
}
.nav.scrolled .btn.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(45,105,255,0.35); color: #fff;
}

/* Secciones */
.section { padding: 100px 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.container--narrow { max-width: 760px; }

/* Hero Blue Gradient */
.hero {
  /* Degradado de Azul Profundo a Blanco */
  background: linear-gradient(180deg, #172554 0%, #2563eb 50%, #ffffff 100%);
  padding: 140px 0 100px;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.1; margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.hero p { 
  font-size: 1.15rem; line-height: 1.7; max-width: 600px; 
  color: rgba(255, 255, 255, 0.9); 
}

.hero .badge-list li { color: #fff; }
.hero .badge-list li svg { color: #4ade80; } /* Check verde claro */

/* Botones en Hero */
.hero .btn--secondary { 
  background: rgba(255,255,255,0.1); 
  color: #fff; 
  border: 1px solid rgba(255,255,255,0.3); 
  backdrop-filter: blur(4px);
}
.hero .btn--secondary:hover { 
  background: #fff; 
  color: var(--primary); 
  border-color: #fff;
}

.muted { color: var(--muted); }
.badge-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; padding-left: 0; list-style: none; }
.badge-list li { color: #334155; font-weight: 500; }
.actions { display: flex; gap: .75rem; margin-top: 1rem; }
.btn { border-radius: .7rem; }
.btn--secondary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn--secondary:hover { background: var(--primary); color: #fff; }

/* Quiénes Somos Styles */
#nosotros {
  background: #fff;
  position: relative;
  z-index: 1;
}
#nosotros .media {
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#nosotros .media:hover {
  transform: scale(1.02) rotate(1deg);
}
#nosotros h3 {
  font-size: 2rem;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}
#nosotros h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 0.5rem;
}
#nosotros .about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 1.5rem;
}
#nosotros .about-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* Cards y Servicios Light */
.feature-card {
  background: var(--card-bg); border: 1px solid var(--border-light); padding: 2rem 1.5rem;
  border-radius: 1.2rem; transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%; position: relative; overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -5px rgba(0,0,0,0.1);
  border-color: var(--primary);
  background: #fff;
}
.feature-card .icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; background: rgba(45,105,255,0.08);
  color: var(--primary); border-radius: 50%; margin-bottom: 1.2rem;
  transition: transform 0.3s ease;
}
.feature-card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary); color: #fff;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #1e293b; }
.feature-card p { color: #334155; line-height: 1.6; font-size: 0.95rem; }

/* Pricing Cards (Tarifas) Light */
.pricing-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 1.2rem;
  padding: 2rem; position: relative; transition: all .3s ease;
  height: 100%; display: flex; flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.pricing-card:hover {
  transform: translateY(-5px); border-color: var(--primary-2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.pricing-card.popular {
  border: 2px solid var(--primary);
  background: #fff;
}
.badge-popular {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; padding: 0.35rem 1rem;
  border-radius: 20px; font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 4px 12px rgba(45,105,255,0.3);
}
.pricing-header { text-align: center; margin-bottom: 1.5rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 1.5rem; }
.pricing-header h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: #0f172a; }
.pricing-header .price { font-size: 1.1rem; color: var(--primary); font-weight: 600; }
.pricing-list { list-style: none; padding: 0; margin: 0; flex: 1; }
.pricing-list li {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.8rem; color: #334155; font-size: 0.95rem;
}
.pricing-list li svg { color: var(--accent); min-width: 16px; }

/* Footer Blue Integration */
.footer { 
  padding: 40px 0; 
  background: #172554; /* Mismo color que el fondo de Contacto */
  color: rgba(255,255,255,0.8); 
  border-top: none;
}

/* Contacto Blue Gradient (Bottom Up) */
#contacto {
  /* Degradado desde abajo (Azul Oscuro) hacia arriba (Blanco) */
  background: linear-gradient(to top, #172554 0%, #2563eb 60%, #ffffff 100%);
  position: relative;
}

/* Textos en Contacto (Adaptativo) */
#contacto .section-title { color: #0f172a; /* Título en zona blanca */ }

/* Contenido en zona azul */
#contacto p, 
#contacto .muted, 
#contacto label, 
#contacto a { 
  color: #fff !important; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}
#contacto a:hover { color: #cbd5e1 !important; text-decoration: underline; }

/* Formulario Glassmorphism en Contacto */
#contacto .field input, 
#contacto .field textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}
#contacto .field input::placeholder, 
#contacto .field textarea::placeholder { color: rgba(255,255,255,0.6); }

#contacto .field input:focus, 
#contacto .field textarea:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
  outline: none;
}

#contacto .error { color: #fca5a5; } /* Rojo pastel para fondo oscuro */
.footer .muted { color: #94a3b8; }

/* Revelar on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Telón (curtain) overlay */
#curtain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: radial-gradient(150% 100% at 50% 0%, rgba(45,105,255,0.65) 0%, rgba(11,18,32,0.95) 60%, rgba(11,18,32,1) 100%);
  transform: translateY(-100%);
}
#curtain.drop {
  animation: curtain-drop 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes curtain-drop {
  0% { transform: translateY(-100%); }
  45% { transform: translateY(0); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* WhatsApp float mejorado */
.whatsapp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(135deg, #25D366 0%, #21c05c 55%, #1aae52 100%);
  color: #fff; text-decoration: none;
  padding: .7rem 1rem; border-radius: 999px; box-shadow: 0 12px 28px rgba(33,192,92,.35);
  transform: translateY(0);
}
.whatsapp-float:hover { box-shadow: 0 16px 36px rgba(33,192,92,.45); }
.whatsapp-float::after {
  content: "Chatea ahora"; font-weight: 600; letter-spacing: .2px; opacity: .95;
}
.whatsapp-float .wa-label { display: none; }
.whatsapp-float svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }

/* Pulso y rebote sutil */
.whatsapp-float { animation: wa-pulse 2.6s ease-in-out infinite; }
@keyframes wa-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.03); }
}

/* Carousel Light */
.carousel {
  border-radius: 1.5rem; overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
  border: 1px solid var(--border-light);
}
.carousel .media { border-radius: 0; box-shadow: none; }
.carousel-control-prev, .carousel-control-next {
  width: 5%; background: rgba(255,255,255,0.1); backdrop-filter: blur(4px);
  transition: background 0.3s ease;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
  background: rgba(45,105,255,0.2);
}
.carousel .carousel-control-next-icon,
.carousel .carousel-control-prev-icon { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); width: 2.5rem; height: 2.5rem; }

/* Form Light */
.form { display: grid; gap: 1rem; }
.form__row { display: flex; gap: 1rem; }
.field label { display: block; margin-bottom: .35rem; color: #475569; font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: .7rem .9rem; border-radius: .7rem;
  border: 1px solid #cbd5e1; background: #f8fafc; color: #1e293b;
  transition: all 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(45,105,255,0.1);
}
.error { color: var(--danger); font-size: .85rem; }
.status { margin-left: .75rem; color: var(--accent); font-weight: 600; }

/* Brand hero image */
.brand-hero { max-width: 360px; width: 100%; border-radius: 1rem; }

/* Animación Grúa y Formulario */
.tow-animation-container {
  position: relative;
  overflow: hidden; /* Evita scroll horizontal cuando la grúa está fuera */
}

#tow-truck {
  position: absolute;
  bottom: 20px;
  right: 0;
  width: 280px;
  height: auto;
  z-index: 20;
  display: none;
  transform: translateX(120%); /* Inicialmente fuera a la derecha */
  pointer-events: none;
}

.tow-animation-container.animating #tow-truck {
  display: block;
  animation: truck-sequence 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tow-animation-container.animating #contact-form {
  animation: form-sequence 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes truck-sequence {
  0% { transform: translateX(120%); }
  35% { transform: translateX(5%); } /* Llega rápido */
  45% { transform: translateX(0%); } /* Ajuste final y pausa breve */
  100% { transform: translateX(-300%); } /* Se va a la izquierda lejos */
}

@keyframes form-sequence {
  0% { transform: translateX(0); opacity: 1; }
  45% { transform: translateX(0); opacity: 1; } /* Espera a la grúa */
  100% { transform: translateX(-300%); opacity: 0; } /* Se va con la grúa */
}

/* Utilidades */
.container { max-width: 1100px; }
