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

body {
  font-family: 'Poppins', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Header Notice */
.header-notice {
  background: blue;
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Skip Link para accesibilidad */
.skip-link {
  position: absolute;
  left: 6px;
  top: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
  transform: translateY(-300%);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  transform: none;
  clip-path: none;
}

/* Navegación */
.navbar {
    background: #F0C419;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #0062cc;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 15px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 12px 18px;
  border-radius: 6px;
  display: block;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #0062cc;
  background-color: rgba(0, 98, 204, 0.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

/* ✚ FIX MENÚ: ya no usamos display:none. Usamos opacity+visibility
   con un retardo de 0,3s al cerrar (gracia) para que no se pliegue
   antes de tiempo. */
.dropdown-menu, .sub-menu {
  position: absolute;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  list-style: none;
  padding: 8px 0;
  margin-top: 5px;
  min-width: 220px;
  border-radius: 8px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.3s;
}

/* ✚ FIX MENÚ: puente invisible que cubre el hueco de 5px entre el
   enlace y el menú. El hover no se pierde al cruzarlo. */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

/* ✚ FIX MENÚ: puente lateral para el submenú "Especiales" */
.sub-menu::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10px;
  width: 10px;
}

/* ✚ FIX MENÚ: posición base del submenú (antes solo se aplicaba al hover) */
.sub-menu {
  top: 0;
  left: 100%;
  margin-left: 2px;
  margin-top: 0;
}

.dropdown:hover > .dropdown-menu,
.dropdown-sub:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* Al abrir, sin retardo */
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

.dropdown-sub {
  position: relative;
}

.dropdown-menu .nav-link, 
.sub-menu .nav-link {
  padding: 12px 20px;
  border-radius: 0;
  color: #333;
}

.dropdown-menu .nav-link:hover, 
.sub-menu .nav-link:hover {
  background-color: #f8f9fa;
  color: #0062cc;
}

/* Contenido Principal */
.main-content-modern {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero Slider Section */
.hero-slider-section {
  width: 100%;
  height: 500px;
  margin-bottom: 60px;
}

.hero-swiper {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.swiper-slide {
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.swiper-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 20px;
}

/* ✚ MEJORA: Animación de entrada del contenido del hero al activarse el slide */
.hero-swiper .swiper-slide-active .hero-content {
  animation: heroFadeInUp 0.8s ease forwards;
}

@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.swiper-button-next, .swiper-button-prev {
  color: #ffffff;
  --swiper-navigation-size: 30px;
}

.swiper-button-next:after, .swiper-button-prev:after {
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.8);
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.swiper-pagination-bullet-active {
  background-color: #0062cc;
  transform: scale(1.2);
}

.hero-button {
  background: linear-gradient(135deg, #0062cc, #004499);
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,98,204,0.3);
}

/* Cards Section */
.cards-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(30px);
  /* ✚ MEJORA: transition para que la animación de entrada sea suave */
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ✚ MEJORA: hover solo cuando la tarjeta ya es visible */
.card.is-visible:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  /* ✚ MEJORA: transición para el efecto zoom */
  transition: transform 0.5s ease;
}

/* ✚ MEJORA: zoom sutil en la imagen al pasar el ratón */
.card:hover .card-image {
  transform: scale(1.05);
}

.card-title {
  font-size: 1.3rem;
  color: #0062cc;
  margin: 20px 20px 10px;
}

.card-text {
  color: #666;
  margin: 0 20px 20px;
  line-height: 1.5;
}

.card-link {
  display: inline-block;
  margin: 0 20px 20px;
  color: #ff6b35;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.card-link:hover {
  border-bottom-color: #ff6b35;
}

/* Eco Section */
.eco-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  margin-bottom: 60px;
  /* ✚ MEJORA: animación de entrada al hacer scroll */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.eco-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 8px;
}

.eco-text h2 {
  font-size: 2rem;
  color: #4caf50;
  margin-bottom: 20px;
}

.eco-text p {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #333;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-section h3 {
  color: #0062cc;
  margin-bottom: 15px;
}

.footer-section p,
.footer-section li {
  color: #ccc;
  line-height: 1.6;
}

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

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #0062cc;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #555;
  color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 20px 0;
    gap: 0;
  }

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

  .nav-link {
    padding: 14px 20px;
    border-radius: 0;
    width: 100%;
  }

  .hero-section,
  .eco-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .cards-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main-content-modern {
    padding: 20px 10px;
  }

  .hero-section,
  .eco-section {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }
}

/* ✚ MEJORA: Accesibilidad - respeta la preferencia de reducir el movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ✚ MOBILE: ajustes adicionales */
@media (max-width: 768px) {
  /* Desplegables por toque: lista anidada en vez de flotante */
  .dropdown-menu, .sub-menu {
    position: static;
    min-width: 100%;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    background-color: #f8f9fa;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    display: none;
  }
  .dropdown.open > .dropdown-menu,
  .dropdown-sub.open > .sub-menu {
    display: block;
  }
  /* Los puentes invisibles del hover no hacen falta en táctil */
  .dropdown-menu::before,
  .sub-menu::before {
    display: none;
  }
  .sub-menu {
    margin-left: 12px;
  }

  /* Slider más contenido en móvil */
  .hero-slider-section {
    height: 400px;
    margin-bottom: 40px;
  }

  /* Mapa a medida de pantalla pequeña */
  #mapa-future-wash {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .hero-slider-section {
    height: 340px;
  }
  .card-actions {
    flex-direction: column;
  }
  .btn-accion {
    text-align: center;
  }
}