:root {
  --azul-marino: #0f2940;
  --blanco-calido: #f9f9f6;
  --celeste: #00a0df;
  --gris-texto: #555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--blanco-calido);
  color: var(--azul-marino);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
}

.nav-logo {
  width: 150px;
  height: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--azul-marino);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--celeste);
}

/* Hero principal */
.hero {
  position: relative;
  padding-top: 12rem;
  padding-bottom: 6rem;
  text-align: center;
  color: white;
  background: linear-gradient(145deg, #0b2239 0%, #0e3253 100%);
  overflow: hidden;
}

/* Logo con efecto flotante */
.hero-logo {
  width: 160px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

/* Contenido del hero */
.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.8s ease-in forwards;
  animation-delay: 0.1s;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #e0e8f0;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.8s ease-in forwards;
  animation-delay: 0.25s;
}

/* Botón principal */
.btn-primary {
  background: linear-gradient(90deg, var(--celeste) 0%, #007bff 100%);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.8s ease-in forwards;
  animation-delay: 0.4s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

/* Línea decorativa inferior */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--celeste), transparent);
}

/* ==== ANIMACIONES ==== */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==== MODO MÓVIL ==== */
@media (max-width: 768px) {
  .hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

/* Secciones generales */
.section {
  padding: 5rem 1rem;
  text-align: center;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Cards autos */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--azul-marino);
}

.card p {
  color: var(--gris-texto);
  padding: 0 1rem 1.5rem;
}

/* Beneficios */
.benefit-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.benefit {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  flex: 1 1 300px;
  transition: transform 0.3s ease;
}

.benefit:hover {
  transform: translateY(-5px);
}

/* Footer */
footer {
  background: var(--azul-marino);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

.footer-logo {
  width: 120px;
  margin-bottom: 1rem;
}

/* Botones secundarios */
.btn-secondary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.9rem 2rem;
  background: transparent;
  border: 2px solid var(--celeste);
  color: var(--celeste);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--celeste);
  color: white;
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: pulse 2.2s infinite;
  transition: transform 0.2s ease;
}

.whatsapp-float img {
  width: 48px;
  height: 48px;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

@keyframes pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37,211,102,0.6)); }
  70% { transform: scale(1.07); filter: drop-shadow(0 0 12px rgba(37,211,102,0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37,211,102,0.6)); }
}

/* Menú hamburguesa móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  height: 3px;
  width: 25px;
  background-color: var(--azul-marino);
  margin: 4px 0;
  border-radius: 5px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(255,255,255,0.95);
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
    display: none;
  }

  .nav-links.active { display: flex; }

  .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
  .menu-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Footer detalles */
footer p { margin: 0.3rem 0; color: #e0e8f0; }
footer a { color: var(--celeste); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ==== Carrusel general (cards) ==== */
.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 220px;
  border-bottom: 1px solid #eee;
}

.slides {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.slides img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}

.slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,41,64,0.6);
  color: white;
  border: none;
  font-size: 1.8rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

.slider button:hover { background: rgba(0,160,223,0.8); }
.slider .prev { left: 10px; }
.slider .next { right: 10px; }

/* ==== Detalle de Auto (página individual) ==== */
.auto-detalle {
  padding-top: 10rem;
  text-align: center;
}

.detalle-auto .slider {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.detalle-auto .slides {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.detalle-auto .slides img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  background: var(--blanco-calido);
  flex-shrink: 0;
}

.detalle-auto .prev, .detalle-auto .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,41,64,0.6);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

.detalle-auto .prev:hover, .detalle-auto .next:hover { background: var(--celeste); }
.detalle-auto .prev { left: 10px; }
.detalle-auto .next { right: 10px; }

/* Info principal del vehículo */
.auto-info {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.auto-info h1 {
  font-size: 2rem;
  color: var(--azul-marino);
  margin-bottom: 1rem;
  font-weight: 700;
}

.auto-info p.descripcion {
  color: var(--gris-texto);
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.auto-info .precio {
  display: inline-block;
  background: var(--azul-marino);
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

/* Botón de contacto */
.auto-info .btn-consultar {
  display: inline-block;
  background: linear-gradient(90deg, var(--celeste) 0%, #007bff 100%);
  color: #fff;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.auto-info .btn-consultar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,160,223,0.3);
}
