/* ================================
   HERO EMGRAND – CARRUSEL + STICKY NAV
================================ */

/* Si tienes un header fijo, ajusta estas variables */
:root {
  --mg-header-h-desktop: 80px;
  --mg-header-h-mobile: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.emg-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  color: #fff;
  background: #000;

  /* IMPORTANTÍSIMO: sticky se rompe con overflow hidden/clip en padres */
  overflow: visible !important;
}

/* Swiper sólo como fondo */
.emg-hero__swiper {
  width: 100%;
  position: relative;
  z-index: 0;
}

.emg-hero__slide {
  position: relative;
  min-height: 580px;
  background-size: cover;
  background-position: center;
}

/* Degradado negro a la izquierda (desktop) */
.emg-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.8) 28%,
    rgba(0, 0, 0, 0) 65%
  );
  z-index: 1;
}

/* Video de fondo */
.emg-hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* OVERLAY encima de todo */
.emg-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
}

/* -----------------------------
   ZONA SUPERIOR
------------------------------ */
.emg-hero__top {
  position: relative;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 0 16px 78px;
  align-items: center;
}

.emg-hero__title {
  text-transform: uppercase;
  margin: 0 0 10px;
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 64px;
  line-height: 64px;
}

.emg-hero__subtitle {
  line-height: 1.5;
  margin: 0;
  max-width: 360px;
}

.emg-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 16px;
  width: 126px;
  height: 48px;
}

.emg-hero__btn--header {
  width: 177px;
  height: 48px;
  font-weight: 700;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 0px;
  text-align: center;
  vertical-align: middle;
  max-width: 100%;
  white-space: nowrap;
}

.emg-hero__btn--light {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.emg-hero__btn--light:hover {
  background: #f5f5f5;
}

/* ================================
   STICKY NAV (FUERA DEL HERO)
================================ */
.emg-sticky-nav {
  position: sticky;
  top: 0;
  z-index: 99999;
  background: #0b0c0c;
  width: 100%;
  will-change: transform;
  max-width: 100%;
  margin-top: 0;
}

.emg-sticky-nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0px;
}

.emg-hero__bottom {
  padding: 14px 0;
  background: #0b0c0c;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  position: relative;
}

.emg-hero__bottom > a {
  justify-self: end;
}

/* Botón marca + flecha (se usa en desktop y mobile) */
.emg-hero__nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
  color: #ffffff;
  cursor: default; /* desktop no abre */
}

.emg-hero__brand {
  font-family: var(--font-geely);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 24px;
  line-height: 40px;
  letter-spacing: 8px;
  vertical-align: middle;
  color: #c9c0b7;

  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icono flecha (mobile) */
.emg-hero__nav-icon {
  display: none;
}

/* Navegación desktop */
.emg-hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.emg-hero__nav-link {
  text-decoration: none;
  color: #ffffff;
  opacity: 0.75;
  transition:
    opacity 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
}

.emg-hero__nav-link:hover {
  opacity: 1;
  color: #00a3ff;
}

.emg-hero__btn--outline {
  border-color: #ffffff;
  color: #ffffff;
}
.emg-hero__btn--outline:hover {
  background: #ffffff;
  color: #000000;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1151px) {
  .emg-sticky-nav__inner {
    padding: 0px 16px;
  }
  .emg-hero__nav {
    gap: 15px;
  }
  .emg-hero__btn--header {
    font-size: 14px;
    width: 146px;
  }
  .emg-hero__brand {
    font-size: 20px;
  }
}
/* Tablet */
@media (max-width: 1024px) {
  .emg-hero__title {
    font-size: 48px;
  }
  .emg-hero__brand {
    max-width: 340px;
  }
}

/* Mobile */
@media (max-width: 1013px) {
  .emg-sticky-nav {
    top: 0;
  }

  .emg-hero__slide {
    min-height: 580px;
  }

  /* Degradado vertical mobile */
  .emg-hero__slide::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.75) 40%,
      rgba(0, 0, 0, 0.95) 100%
    );
  }

  .emg-hero__top {
    max-width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 44px;
  }

  .emg-hero__title {
    font-size: 40px;
  }
  .emg-hero__subtitle {
    font-size: 16px;
    max-width: 100%;
  }
  .emg-hero__btn--light {
    align-self: flex-start;
  }

  /* Barra sticky en mobile: layout compacto */
  .emg-hero__bottom {
    padding: 16px 24px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .emg-hero__brand {
    font-size: 16px;
    line-height: 40px;
    letter-spacing: 1px;
  }

  /* Toggle habilitado en mobile */
  .emg-hero__nav-toggle {
    cursor: pointer;
    justify-content: flex-start;
  }

  .emg-hero__nav-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg); /* abajo */
    transition: transform 0.2s ease;
    margin-top: -2px;
  }

  .emg-hero__bottom.is-nav-open .emg-hero__nav-icon {
    transform: rotate(-135deg); /* arriba */
  }

  /* Menú desplegable */
  .emg-hero__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0;
    background: #ffffff;
    display: none;
    flex-direction: column;
    padding: 0;
    z-index: 5;
    gap: 0;
  }
  .emg-hero__bottom.is-nav-open .emg-hero__nav {
    display: flex;
  }

  .emg-hero__nav-link {
    color: #000000;
    opacity: 1;
    padding: 14px 20px;
    border-bottom: 1px solid #e3e3e3;
    font-size: 12px;
    line-height: 18px;
  }
  .emg-hero__nav-link:hover {
    background: #f5f5f5;
    color: #000000;
  }

  .emg-hero__btn--outline {
    white-space: nowrap;
    padding-inline: 18px;
    font-size: 14px;
    line-height: 40px;
    width: 142px;
  }
}

/* Mobile pequeño */
@media (max-width: 480px) {
  .emg-hero__title {
    font-size: 40px;
  }
  .emg-sticky-nav__inner {
    padding: 0px;
  }

  .emg-hero__brand {
    font-size: 14px;
    line-height: 40px;
  }

  .emg-hero__btn--light {
    font-size: 14px;
    line-height: 40px;
    width: 110px;
  }

  .emg-hero__btn--outline {
    font-size: 12px;
    line-height: 40px;
    width: fit-content;
  }
}
