.header {
  display: flex;
}

/* Evitar desplazamiento horizontal cuando aparece/desaparece la scrollbar
   Usa scrollbar-gutter (soporte moderno) y overflow-y como fallback */
html {
  scrollbar-gutter: stable;
}

body {
  /* Fallback para navegadores sin scrollbar-gutter: reserva siempre espacio para la scrollbar */
  overflow-y: scroll;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* Cabecera por encima del carrusel (menús y desplegables visibles) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(18, 18, 18, 0.92);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar {
  position: relative;
  z-index: 1030;
  overflow: visible;
  background-color: rgb(254 254 254) !important;;
}

.navbar .container-fluid {
  align-items: center;
}

/* Carrusel siempre debajo del menú en el apilamiento */
.carousel-bajo-menu {
  position: relative;
  z-index: 0;
}

.carousel-bajo-menu .carousel-control-prev,
.carousel-bajo-menu .carousel-control-next {
  z-index: 1;
}

/* Bloque central: enlaces + buscador seguidos */
.navbar-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.nav-item {
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
  color: #333;
  transition: transform .4s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: #333;
  transition: left .8s;
}

.nav-item:hover {
  transform: translateY(-3px);
}

.nav-item:hover::after {
  left: 0;
}

.navbar .navbar-buscar {
  margin-top: 0;
}
.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #000000 !important;
  padding: 0.6rem 1rem !important;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s ease;
}

@media (min-width: 992px) {
  .navbar .navbar-menu {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: min(62vw, 780px);
    margin-top: 0 !important;
    overflow: visible;
  }
.navbar .navbar-menu-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
  }

  .navbar .navbar-menu .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0 !important;
  }

  .navbar .navbar-buscar {
    max-width: 280px;
    min-width: 200px;
  }

  .navbar .dropdown-menu {
    z-index: 1040;
  }
}
@media (max-width: 991.98px) {
  .navbar .navbar-menu {
    margin-top: 0.75rem;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background-color: var(--bs-body-bg);
    position: relative;
    z-index: 1030;
  }

  .navbar-menu-inner {
    align-items: center;
  }

  .navbar .navbar-buscar {
    width: 100%;
    max-width: 420px;
    justify-content: center;
  }
}

.carousel-item img {
  width: 100%;
  height: 700px;
  object-fit: cover;
  object-position: center;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.575);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  bottom: 8%;
  max-width: 510px;
  margin: 0 auto;
}
.carousel-caption h5 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 2vw, 1.1rem);
  letter-spacing: 2px;
  margin-bottom: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}


.carousel-item {
  position: relative;
  width: 100%;

}
@media (min-width: 769px) and (max-width: 991.98px) {
  .carousel-item img {
    height: 420px;
    /* paso intermedio para tablets */
  }
}

@media (max-width: 768px) {
  .carousel-item img {
    height: 250px;
    /* más chico en celular */
  }

  /*banner*/
  .site-banner {
    min-height: 160px;
    padding: 1rem 0;
  }

  .site-banner .banner-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 400px) {
  .navbar-brand img {
    width: 90px;
    height: 90px;
  }
}


/* Quitar la flecha (caret) que Bootstrap añade a los enlaces con .dropdown-toggle (aplica a cualquier navbar) */
.navbar .dropdown-toggle::after {
  display: none !important;
}

/* Centrar el menú en pantallas grandes (desktop) usando la zona colapsable genérica */
@media (min-width: 992px) {
  .navbar .navbar-collapse {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
  }

  .navbar .navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 1rem !important;
    align-items: center !important;
  }
   .navbar .nav-link {
    text-align: center !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Estilos para el banner debajo del carrusel */
.site-banner {
  position: relative;
 
  /* cambia por tu imagen */
  background-size: cover;
  background:  linear-gradient(135deg, #111111 0%, #1f1f1f 100%);
  background-position: center center;
  color: #ffffff;
  display: flex;
  align-items: center;
  min-height: 140px;
}

.site-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  /* overlay para legibilidad */
}

.site-banner .container {
  position: relative;
  /* sitúa el contenido por encima del overlay */
  z-index: 2;
}

.site-banner .banner-title {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.site-banner .banner-sub {
  margin-bottom: 0.75rem;
  opacity: 0.95;
}


/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  width: 58px;
  height: 58px;
  bottom: 24px;
  right: 24px;
  background-color: #25D366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  z-index: 2000;
  text-decoration: none !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.whatsapp-float i {
  font-size: 1.75rem;
}
.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}
@media (max-width: 575.98px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 18px;
    right: 18px;
  }
  .whatsapp-float i {
    font-size: 1.5rem;
  }
}