/* CrossBOX hero — scoped to landing only (#cb-hero) · mockup v6 */
#cb-hero {
  --cb-hero-rojo: #D60000;
  --cb-hero-bg: #000;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--cb-hero-bg);
  background-image: url(../images/video/hero-poster.jpg);
  background-size: cover;
  background-position: center;
  color: #F4F4F4;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* Fade suave del video hacia el body (#000) — cubre el corte inferior */
#cb-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.06) 22%,
    rgba(0, 0, 0, 0.28) 48%,
    rgba(0, 0, 0, 0.7) 78%,
    #000 100%
  );
}

#cb-hero .cb-hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background-color: var(--cb-hero-bg);
  background-image: url(../images/video/hero-poster.jpg);
  background-size: cover;
  background-position: center;
}

#cb-hero .cb-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
  border: none;
  outline: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Solo el breakpoint activo: el otro no se apila ni se ve */
#cb-hero .cb-hero__video--mobile {
  display: block;
}

#cb-hero .cb-hero__video--desktop {
  display: none;
}

@media (min-width: 768px) {
  #cb-hero .cb-hero__video--mobile {
    display: none;
  }
  #cb-hero .cb-hero__video--desktop {
    display: block;
  }
}

#cb-hero .cb-hero__video:not(.is-active) {
  display: none !important;
}

#cb-hero .cb-hero__video.is-ready {
  opacity: 1;
}

#cb-hero .cb-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.28) 42%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

#cb-hero .cb-hero__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
}

/* Sobre el video: barra transparente. Al scrollear: negro opaco (tapa el contenido). */
#cb-hero #ftco-navbar.ftco-navbar-light {
  position: relative;
  top: 0;
  left: auto;
  right: auto;
  z-index: 6;
  background: transparent !important;
}

/*
 * El transparent !important de arriba gana a .ftco-navbar-light.scrolled
 * de style.css (menos específico). Hay que reponer el fondo negro acá.
 * margin-top: 0 anula el slide -130px de style.css para que tape al instante.
 */
#cb-hero #ftco-navbar.ftco-navbar-light.scrolled {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 40;
  margin-top: 0 !important;
  background: #000 !important;
  background-color: #000 !important;
  box-shadow: none;
}

#cb-hero #ftco-navbar.ftco-navbar-light.scrolled .nav-item > .nav-link,
#cb-hero #ftco-navbar.ftco-navbar-light.scrolled .nav-link,
#cb-hero #ftco-navbar.ftco-navbar-light.scrolled .nav-link h6 {
  color: #fff !important;
}

/*
 * Mobile nav — overlay full-screen negro, links centrados.
 * Solo #cb-hero + <lg (navbar-expand-lg). Desktop sin cambios de layout.
 *
 * overflow:hidden en #cb-hero recorta position:fixed (Safari/WebKit): el
 * toggler y el overlay solo se veían sobre el video. El clip del video
 * queda en .cb-hero__media. Nav siempre fixed al viewport.
 * z-index > FAB WhatsApp (1000) para que el overlay lo tape al abrir.
 */
@media (max-width: 991.98px) {
  #cb-hero {
    overflow: visible;
  }

  #cb-hero .cb-hero__nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
  }

  #cb-hero #ftco-navbar.ftco-navbar-light,
  #cb-hero #ftco-navbar.ftco-navbar-light.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1100;
    margin-top: 0 !important;
  }

  /* Menu siempre por encima del overlay negro (abre/cierra) */
  #cb-hero #ftco-navbar .navbar-toggler {
    position: relative;
    z-index: 1120;
    color: #fff !important;
  }

  /* Overlay full viewport: tapa video, resto de la landing y el FAB */
  #cb-hero #ftco-nav.navbar-collapse {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0;
    padding: 4.5rem 1.5rem 2rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #000;
    box-shadow: none;
    z-index: 1110;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Bootstrap anima height; lo anulamos para overlay estable */
  #cb-hero #ftco-nav.collapsing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh !important;
    height: 100dvh !important;
    transition: none;
    transform: none;
    visibility: visible;
  }

  #cb-hero #ftco-nav.collapse:not(.show) {
    display: none;
  }

  #cb-hero #ftco-nav.collapse.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #cb-hero.is-nav-open {
    overflow: visible;
  }

  #cb-hero #ftco-nav .navbar-nav {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100%;
    max-width: 22rem;
    align-items: center !important;
  }

  #cb-hero #ftco-nav .nav-item {
    width: 100%;
    border-bottom: none;
  }

  #cb-hero #ftco-nav .nav-item > .nav-link,
  #cb-hero #ftco-nav .nav-link,
  #cb-hero #ftco-navbar.scrolled #ftco-nav .nav-item > .nav-link,
  #cb-hero #ftco-navbar.scrolled #ftco-nav .nav-link {
    color: #fff !important;
    opacity: 1 !important;
    padding: 0.85rem 0.5rem !important;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-align: center;
  }

  #cb-hero #ftco-nav .nav-link h6 {
    margin: 0;
    color: inherit !important;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: inherit;
  }

  #cb-hero #ftco-nav .nav-link:hover,
  #cb-hero #ftco-nav .nav-link:focus {
    color: #ff2a2a !important;
  }
}

#cb-hero .cb-hero__content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 920px;
  padding: 48px 22px 28px;
  margin: 0 auto;
}

#cb-hero .cb-hero__logo {
  display: block;
  width: min(420px, 90%);
  height: auto;
  margin: 0 auto 12px;
  opacity: 0;
  animation: cb-hero-fade-up 0.7s ease-out 0.15s forwards;
}

/* Desktop: logo más grande y bloque más compacto */
@media (min-width: 768px) {
  #cb-hero .cb-hero__content {
    padding: 36px 24px 20px;
  }

  #cb-hero .cb-hero__logo {
    width: min(520px, 52vw);
    margin-bottom: 12px;
  }
}

@media (max-width: 991.98px) {
  #cb-hero .cb-hero__content {
    padding-top: 72px;
  }
}

#cb-hero .cb-hero__sub {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 400;
  color: #eaeaea;
  font-size: 20px;
  line-height: 1.4;
  max-width: 34rem;
  margin: 0 auto;
  opacity: 0;
  animation: cb-hero-fade-up 0.7s ease-out 0.35s forwards;
}

#cb-hero .cb-hero__cta {
  display: inline-block;
  margin-top: 20px;
  background: var(--cb-hero-rojo);
  color: #fff !important;
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 21px;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(214, 0, 0, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  opacity: 0;
  animation: cb-hero-fade-up 0.7s ease-out 0.5s forwards;
}

#cb-hero .cb-hero__cta:hover,
#cb-hero .cb-hero__cta:focus {
  background: #f00000;
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(214, 0, 0, 0.5);
}

#cb-hero .cb-hero__micro {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 400;
  color: #e1e1e1;
  font-size: 13.5px;
  line-height: 1.3;
  max-width: 28rem;
  margin: 14px auto 0;
  opacity: 0;
  animation: cb-hero-fade-up 0.7s ease-out 0.65s forwards;
}

#cb-hero .cb-hero__micro--sedes {
  color: #c9c9c9;
  margin-top: 5px;
  animation-delay: 0.8s;
}

@keyframes cb-hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  #cb-hero .cb-hero__content {
    padding: 72px 20px 28px;
  }
  #cb-hero .cb-hero__logo {
    width: min(420px, 90%);
  }
  #cb-hero::after {
    height: 140px;
  }
  #cb-hero .cb-hero__sub {
    font-size: 15px;
    max-width: 260px;
  }
  #cb-hero .cb-hero__cta {
    font-size: 16px;
    padding: 12px 24px;
    margin-top: 18px;
  }
  #cb-hero .cb-hero__micro {
    font-size: 11px;
    max-width: 250px;
    margin-top: 12px;
  }
  #cb-hero .cb-hero__micro--sedes {
    margin-top: 5px;
  }
}

/* Reduced motion: static poster only, no autoplay / entrance motion */
@media (prefers-reduced-motion: reduce) {
  #cb-hero .cb-hero__media {
    display: none;
  }
  #cb-hero .cb-hero__logo,
  #cb-hero .cb-hero__sub,
  #cb-hero .cb-hero__cta,
  #cb-hero .cb-hero__micro {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

#cb-hero.is-static .cb-hero__media {
  display: none;
}

/* Evita scroll del body con el overlay mobile abierto */
html.cb-nav-open,
body.cb-nav-open {
  overflow: hidden;
}
