/* =================== VARIABLES CSS =================== */
:root {
  --primary: #003366;
  --secondary: #f5f5f5;
  --light: #fff;
  --dark: #222;
  --gray: #e0e0e0;
  --accent: #003366;
}

/* =================== RESET Y BASE =================== */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 100px;
}

/* =================== ANIMACIONES PROFESIONALES =================== */
/* Keyframes base para animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Clases base para elementos animados */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1);
}

.animate-fade-in.visible {
  opacity: 1;
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

.animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* =================== ELEMENTOS ANIMADOS =================== */
/* Animaciones para elementos específicos */
.hero h1 {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
}

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

.hero p {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
  transition-delay: 0.3s;
}

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

.cta-buttons {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
  transition-delay: 0.6s;
}

.cta-buttons.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animaciones para secciones */
section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

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

/* Animaciones para títulos h2 */
h2 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

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

/* Animaciones para párrafos */
p {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

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

/* Animaciones para imágenes */
img {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

img.visible {
  opacity: 1;
  transform: scale(1);
}

/* Animaciones para elementos de lista */
li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

li.visible {
  opacity: 1;
  transform: translateX(0);
}

/* =================== HEADER =================== */
header {
  background: linear-gradient(135deg, #19507a, var(--primary));
  color: #fff;
  padding: 1.2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

header:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

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

.logo img {
  height: 64px;
  width: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: filter 0.3s cubic-bezier(.4,0,.2,1);
}

.logo img:hover {
  filter: brightness(1.1) drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1002;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  padding: 0.5rem;
  border-radius: 8px;
  position: relative;
  width: 44px;
  height: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}

.menu-toggle.active {
  transform: rotate(90deg);
  color: #fff;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* Animación de entrada para elementos del menú */
nav ul li {
  opacity: 0;
  transform: translateY(-20px);
  animation: menuItemFadeIn 0.6s cubic-bezier(.4,0,.2,1) forwards;
}

nav ul li:nth-child(1) { animation-delay: 0.1s; }
nav ul li:nth-child(2) { animation-delay: 0.2s; }
nav ul li:nth-child(3) { animation-delay: 0.3s; }
nav ul li:nth-child(4) { animation-delay: 0.4s; }
nav ul li:nth-child(5) { animation-delay: 0.5s; }
nav ul li:nth-child(6) { animation-delay: 0.6s; }
nav ul li:nth-child(7) { animation-delay: 0.7s; }
nav ul li:nth-child(8) { animation-delay: 0.8s; }

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

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes menuRipple {
  to {
    transform: scale(6);
    opacity: 0;
  }
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

/* Efecto de subrayado animado */
nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fff, var(--gray));
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  transform: translateX(-50%);
}

/* Efecto de fondo sutil */
nav a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
  border-radius: 8px;
}

nav a:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

nav a:hover::before {
  width: 80%;
}

nav a:hover::after {
  opacity: 1;
}

/* Efecto de click/active */
nav a:active {
  transform: translateY(0) scale(1.02);
  transition: transform 0.1s cubic-bezier(.4,0,.2,1);
}



/* =================== HERO SECTION =================== */
.hero {
  background: var(--primary) url('../images/revisandobateria.png') center bottom/cover no-repeat;
  color: #fff;
  padding: 7rem 0 6rem 0;
  text-align: center;
  position: relative;
  background-attachment: scroll;
}

/* Mantener fixed solo en desktop para mejor experiencia */
@media (min-width: 1024px) and (hover: hover) {
  .hero {
  background-attachment: fixed;
  }
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(25, 80, 122, 0.7);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  transition: opacity 0.4s;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =================== BOTONES CTA =================== */
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.cta-btn {
  background: #fff;
  color: var(--primary);
  padding: 1rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px #0001;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0002;
}

.chat-btn {
  background: var(--primary);
  color: #fff;
}

.chat-btn:hover {
  background: #19507a;
  color: #fff;
}

.whatsapp-btn {
  background: #25D366;
  color: #fff;
}

.whatsapp-btn:hover {
  background: #128C7E;
  color: #fff;
}

.phone-btn {
  background: #007BFF;
  color: #fff;
}

.phone-btn:hover {
  background: #0056b3;
  color: #fff;
}

/* =================== SECCIONES GENERALES =================== */
section {
  padding: 2.5rem 0;
}

h2 {
  color: #2563eb; /* Azul más claro y moderno */
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-align: center;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Estado inicial para animación de aparición */
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(.4,0,.2,1);
  display: block;
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
}

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

/* Subrayado animado */
h2::after {
  content: "";
  display: block;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8 80%);
  margin: 0.7rem auto 0 auto;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1);
}

/* Efectos hover para desktop */
h2:hover::after {
  width: 40%;
}

h2:hover {
  color: #1d4ed8;
  transform: translateY(-2px);
}

/* Efectos táctiles para móvil */
h2:active {
  transform: translateY(0) scale(0.98);
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.05);
}

h2:active::after {
  width: 60%;
}

h3 {
  color: #3b82f6; /* Azul más claro */
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  /* Animaciones igual que h2 */
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(.4,0,.2,1);
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.3rem;
  border-radius: 6px;
}

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

h3::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8 80%);
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1);
}

/* Efectos hover para desktop */
h3:hover::after {
  width: 40%;
}

h3:hover {
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* Efectos táctiles para móvil */
h3:active {
  transform: translateY(0) scale(0.98);
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.05);
}

h3:active::after {
  width: 50%;
}

/* =================== GRIDS Y LAYOUTS =================== */
.beneficios, .cobertura, .testimonios {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: flex-start;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

.beneficio, .zona, .testimonio {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  padding: 1.5rem 1.2rem;
  flex: 1 1 250px;
  min-width: 220px;
  max-width: 350px;
  margin: 0.3rem;
  width: 100%;
  /* Animaciones */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
}

.beneficio.visible, .zona.visible, .testimonio.visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  padding: 0.8rem;
  margin: 0.2rem 0;
  width: 100%;
  height: auto;
  min-height: unset;
  flex: none;
  /* Animaciones */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

.faq-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.zona h3 {
  color: #3b82f6; /* Azul más claro */
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
}

.zona h3:hover {
  color: #1d4ed8;
  transform: translateY(-1px);
}

.zona h3:active {
  transform: translateY(0) scale(0.98);
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.05);
}

.beneficio i, .zona i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.zona {
  text-align: center;
}

.zona p {
  color: #666;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* =================== MARCAS =================== */
.marcas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  justify-items: center;
  align-items: center;
  margin: 0 auto;
  max-width: 900px;
}

.marca {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 180px;
  transition: box-shadow 0.2s;
  width: 100%;
  /* Animaciones */
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
}

.marca.visible {
  opacity: 1;
  transform: scale(1);
}

.marca img {
  width: 120px;
  max-width: 180px;
  height: auto;
  margin-bottom: 1.2rem;
  filter: grayscale(0.05);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
  padding: 0.5rem;
  object-fit: contain;
  display: block;
  /* Animación de aparición al hacer scroll */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

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

.marca h3 {
  color: #3b82f6; /* Azul más claro */
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
}

.marca h3:hover {
  color: #1d4ed8;
  transform: translateY(-1px);
}

.marca h3:active {
  transform: translateY(0) scale(0.98);
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.05);
}

.marca:hover {
  box-shadow: 0 4px 16px #00336622;
}

/* =================== FORMULARIO =================== */
.formulario {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  max-width: 500px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

iframe {
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  max-width: 100%;
}

.formulario label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 500;
}

.formulario input, .formulario textarea {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--gray);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--light);
}

.formulario button {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.formulario button:hover {
  background: #222;
  color: #fff;
}

/* =================== FAQ =================== */
.faq-item {
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: unset;
}

.faq-item:hover {
  box-shadow: 0 4px 16px #0002;
  transform: translateY(-2px);
}

.faq-question {
  font-weight: bold;
  margin: 0;
  padding: 0;
  color: #3b82f6; /* Azul más claro */
  font-size: 1rem;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 2rem;
  position: relative;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  border-radius: 6px;
  padding: 0.5rem 2rem 0.5rem 0.5rem;
}

.faq-question:hover {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.05);
}

.faq-item:active .faq-question {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6; /* Azul más claro */
  transition: all 0.3s ease;
}

.faq-question:hover::after {
  color: #1d4ed8;
}

.faq-item.active .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
  display: none;
  color: var(--dark);
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0;
  margin: 0.6rem 0 0 0;
}

.faq-item.active .faq-answer {
  display: block;
}

/* =================== TESTIMONIOS =================== */
.testimonios {
  gap: 1.5rem;
}

.testimonio {
  text-align: center;
  font-style: italic;
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  /* Animación de aparición al hacer scroll */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

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

.testimonio strong {
  display: block;
  margin-top: 1rem;
  color: #3b82f6; /* Azul más claro */
  font-style: normal;
  transition: color 0.3s cubic-bezier(.4,0,.2,1);
}

.testimonio:hover strong {
  color: #1d4ed8;
}

.testimonio:active strong {
  color: #1d4ed8;
}

/* =================== FOOTER =================== */
footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 2rem 0 1rem 0;
  margin-top: 2rem;
}

.footer-links {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: #fff;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* =================== CHAT WIDGET =================== */
#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#chatbot-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #003366;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    transition: all 0.3s ease;
}

#chatbot-btn:hover {
    background: #19507a;
    transform: scale(1.05);
}

#chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
}

#chatbot-window.open {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

#chatbot-header {
    background: #003366;
    color: white;
    padding: 16px;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.bot-msg, .user-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 14px;
}

.bot-msg {
    background: #e0f2fe;
    color: #22223b;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    white-space: pre-wrap; /* Preserva saltos de línea y espacios */
}

.user-msg {
    background: #003366;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

#chatbot-form {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    margin-right: 8px;
}

#chatbot-input:focus {
    border-color: #003366;
}

#chatbot-form button {
    background: #003366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

#chatbot-form button:hover {
    background: #19507a;
}

/* =================== USER FORM =================== */
#chatbot-user-form {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

#chatbot-user-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #22223b;
}

#chatbot-user-form input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
}

#chatbot-user-form input:focus {
    border-color: #003366;
}

/* =================== BUTTON STYLES =================== */
.btn {
    background: #003366;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: #19507a;
    transform: translateY(-1px);
}

/* =================== SCROLLBAR =================== */
#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* =================== RESPONSIVE DESIGN =================== */
@media (max-width: 1024px) {
  .container {
    width: 95%;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .marcas {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 80px;
  }
  
  /* Efectos táctiles mejorados para títulos en móvil */
  h2, h3 {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    tap-highlight-color: rgba(59, 130, 246, 0.1);
  }
  
  h2:active, h3:active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(29, 78, 216, 0.05));
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  }
  
  header {
    padding: 0.8rem 0;
  }
  
  .logo img {
    height: 50px;
  }
  
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: menuPulse 2s infinite;
  }
  
  .menu-toggle:hover {
    transform: scale(1.1);
    animation: none;
  }
  
  .menu-toggle.active {
    animation: none;
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    z-index: 1004;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
  }
  
  @keyframes menuPulse {
    0%, 100% { 
      transform: scale(1);
      opacity: 1;
    }
    50% { 
      transform: scale(1.05);
      opacity: 0.9;
    }
  }
  
  /* Overlay de fondo para menú móvil */
  nav ul::before {
    content: "";
    position: fixed;
    top: 80px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    background: rgba(59, 130, 246, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 998;
    backdrop-filter: blur(8px);
    pointer-events: none;
  }
  
  nav ul.active::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  nav ul {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 80px);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    transition: right 0.4s cubic-bezier(.4,0,.2,1);
    z-index: 1001;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    padding: 4rem 1rem 2rem 1rem;
    overflow-y: auto;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
  
  nav ul.active {
    right: 0;
  }
  
  nav ul li {
    opacity: 0;
    transform: translateX(50px);
    animation: none;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1002;
    pointer-events: auto;
  }
  
  nav ul.active li {
    animation: mobileMenuSlideIn 0.6s cubic-bezier(.4,0,.2,1) forwards;
  }
  
  nav ul.active li:nth-child(1) { animation-delay: 0.1s; }
  nav ul.active li:nth-child(2) { animation-delay: 0.15s; }
  nav ul.active li:nth-child(3) { animation-delay: 0.2s; }
  nav ul.active li:nth-child(4) { animation-delay: 0.25s; }
  nav ul.active li:nth-child(5) { animation-delay: 0.3s; }
  nav ul.active li:nth-child(6) { animation-delay: 0.35s; }
  nav ul.active li:nth-child(7) { animation-delay: 0.4s; }
  nav ul.active li:nth-child(8) { animation-delay: 0.45s; }
  
  @keyframes mobileMenuSlideIn {
    0% {
      opacity: 0;
      transform: translateX(50px) scale(0.9);
    }
    50% {
      opacity: 0.7;
      transform: translateX(-5px) scale(1.02);
    }
    100% {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }
  
  nav a {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    width: 100%;
    text-align: center;
    display: block;
    min-height: 44px;
    touch-action: manipulation;
    border: 2px solid transparent;
    position: relative;
    z-index: 1002;
    pointer-events: auto;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    overflow: hidden;
  }
  
  /* Efecto de brillo sutil */
  nav a::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 cubic-bezier(.4,0,.2,1);
  }
  
  nav a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: #fff;
  }
  
  nav a:hover::before {
    left: 100%;
  }
  
  nav a:active {
    transform: translateY(-1px) scale(1.01);
    background: rgba(255,255,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  
  /* Efectos específicos para dispositivos táctiles */
  @media (hover: none) and (pointer: coarse) {
    nav a {
      background: rgba(255,255,255,0.15);
    }
    
    nav a:active {
      background: rgba(255,255,255,0.4);
      transform: scale(0.98);
      transition: all 0.1s cubic-bezier(.4,0,.2,1);
    }
  }
  .hero {
    padding: 5rem 0 4rem 0;
    background-attachment: scroll;
  }
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  .cta-buttons {
    gap: 0.8rem;
  }
  .cta-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    min-width: 120px;
  }
  h2 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    padding: 0 1rem;
  }
  section {
    padding: 2rem 0;
  }
  .beneficios, .cobertura, .testimonios {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .faq {
    gap: 0.2rem;
  }
  .beneficio, .zona, .testimonio {
    max-width: 100%;
    margin: 0 0 0.5rem 0;
    padding: 1.2rem 1rem;
  }
  .faq-item {
    margin: 0;
    padding: 0.6rem;
  }
  .zona h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
  }
  .zona i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }
  .zona p {
    font-size: 0.9rem;
  }
  .marcas {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 0 1rem;
  }
  .marca {
    min-width: auto;
    min-height: 150px;
    padding: 1.5rem 1rem;
  }
  .marca img {
    width: 80px;
  }
  .formulario {
    margin: 0 1rem;
    padding: 2rem 1rem;
  }
  iframe {
    margin: 0 1rem;
    width: calc(100% - 2rem);
  }
  .footer-links {
    font-size: 0.8rem;
  }
  .footer-links a {
    margin: 0 0.5rem;
    display: inline-block;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 70px;
  }
  
  /* Ajustar overlay para pantallas pequeñas */
  nav ul::before {
    top: 70px;
    height: calc(100vh - 70px);
  }
  
  header {
    padding: 0.6rem 0;
  }
  
  .container {
    width: 100%;
    padding: 0 1rem;
  }
  
  .logo img {
    height: 45px;
  }
  
  .menu-toggle {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  
  nav ul {
    top: 70px;
    height: calc(100vh - 70px);
    width: 90%;
    max-width: 280px;
    gap: 1.2rem;
    padding: 2rem 0.8rem 1.5rem 0.8rem;
  }
  
  nav a {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }
  
  .hero {
    padding: 4rem 0 3rem 0;
  }
  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }
  .hero p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  .cta-buttons {
    flex-direction: column;
    gap: 0.6rem;
  }
  .cta-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    min-width: 100px;
    width: 200px;
  }
  h2 {
    font-size: 1.4rem;
  }
  section {
    padding: 2rem 0;
  }
  .marcas {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0 0.5rem;
  }
  .marca {
    min-height: 120px;
    padding: 1rem;
  }
  .marca img {
    width: 60px;
  }
  .beneficio, .zona, .testimonio {
    padding: 1rem 0.8rem;
    margin-bottom: 0.4rem;
  }
  .faq-item {
    padding: 0.5rem;
    margin: 0;
  }
  .zona h3 {
    font-size: 1.1rem;
  }
  .zona i {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
  }
  .zona p {
    font-size: 0.85rem;
  }
  .faq-question {
    font-size: 0.9rem;
    padding-right: 1.5rem;
  }
  .faq-question::after {
    font-size: 1.2rem;
  }
  .faq-answer {
    font-size: 0.85rem;
  }
  iframe {
    height: 600px;
    margin: 0 0.5rem;
    width: calc(100% - 1rem);
  }
  
  /* Chat responsive */
  #chatbot-widget {
    bottom: 10px;
    right: 10px;
  }
  
  #chatbot-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 100px);
    bottom: 70px;
    right: -10px;
  }
  
  #chatbot-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
} 