/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  width: 100%;
}

.hero__media {
  width: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.mobile-menu__link {
  position: relative;
  display: inline-block;
  padding: 0.9rem 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.mobile-menu__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.55rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--color-primary);

  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.mobile-menu__link:hover,
.mobile-menu__link.is-active {
  color: var(--color-primary);
}

.mobile-menu__link:hover::after,
.mobile-menu__link.is-active::after {
  transform: scaleX(1);
}

/* =========================================================
   HERO CAROUSEL
   ========================================================= */

.hero-carousel {
  position: relative;
  overflow: hidden;
}

.hero-carousel__viewport {
  position: relative;
  overflow: hidden;
}

.hero-carousel__track {
  display: flex;
  width: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
}

.hero__media--video {
  position: relative;
  background: #111;
}

.hero__video {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
}

.hero__media--video::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.34) 42%,
      rgba(0, 0, 0, 0.08) 100%);
}

.hero-video-card {
  position: absolute;
  left: clamp(1.25rem, 7vw, 6rem);
  bottom: clamp(4.5rem, 10vw, 8rem);
  z-index: 2;
  width: min(100% - 2rem, 560px);
  color: #fff;
}

.hero-video-card__eyebrow {
  margin: 0 0 0.55rem;
  color: var(--color-primary);
  font-size: clamp(0.85rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-video-card__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5.2vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
}

.hero-video-card__text {
  max-width: 520px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  line-height: 1.35;
}

.hero-video-card__btn {
  margin-top: 1.4rem;
}

.hero-carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background var(--transition-base),
    color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.hero-carousel__nav:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.hero-carousel__nav--prev {
  left: clamp(0.75rem, 2vw, 1.5rem);
}

.hero-carousel__nav--next {
  right: clamp(0.75rem, 2vw, 1.5rem);
}

.hero-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  z-index: 5;
  display: flex;
  gap: 0.65rem;
  transform: translateX(-50%);
}

.hero-carousel__dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition:
    width var(--transition-base),
    background var(--transition-base),
    transform var(--transition-base);
}

.hero-carousel__dot.is-active {
  width: 34px;
  background: var(--color-primary);
}

.hero-carousel__dot:hover {
  transform: translateY(-2px);
}

/* =========================
   TABLET / MOBILE
   ========================= */

@media (max-width: 900px) {
  .hero-carousel__nav {
    display: none;
  }

  .hero-video-card {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 4.2rem;
    width: auto;
  }

  .hero__media--video::after {
    background:
      linear-gradient(to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.38) 52%,
        rgba(0, 0, 0, 0.1) 100%);
  }

  .hero-video-card__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .hero-video-card__text {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .hero-video-card__btn {
    width: 100%;
    max-width: 310px;
    justify-content: center;
  }

  .hero-carousel__dots {
    bottom: 1rem;
  }
}

/* =========================================================
   HERO VIDEO PLAYING STATE
   ========================================================= */

.hero__media--video.is-playing .hero-video-card {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
}

.hero-video-card {
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease,
    transform 0.28s ease;
}

.hero__media--video.is-playing::after {
  opacity: 0;
}

.hero__media--video::after {
  transition: opacity 0.3s ease;
}

/* Controles de video */
.hero-video-controls {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 6;
  display: flex;
  gap: 0.65rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.hero__media--video.is-playing .hero-video-controls,
.hero__media--video:hover .hero-video-controls {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-video-controls__btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-primary);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition:
    transform var(--transition-base),
    background var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}

.hero-video-controls__btn:hover {
  transform: translateY(-2px);
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.hero-video-controls__btn i {
  font-size: 1rem;
  line-height: 1;
}

/* En móvil dejamos los controles accesibles y no tan encima */
@media (max-width: 900px) {
  .hero-video-controls {
    right: 1rem;
    bottom: 3.6rem;
  }

  .hero-video-controls__btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 640px) {
  .hero__media--video.is-playing .hero-video-card {
    display: none;
  }

  .hero-video-controls {
    left: 50%;
    right: auto;
    bottom: 3.4rem;
    transform: translateX(-50%) translateY(8px);
  }

  .hero__media--video.is-playing .hero-video-controls,
  .hero__media--video:hover .hero-video-controls {
    transform: translateX(-50%) translateY(0);
  }
}

/* =========================================================
   HERO VIDEO MOBILE - SOLO VIDEO + CONTROLES
   ========================================================= */

@media (max-width: 640px) {
  .hero__media--video .hero-video-card {
    display: none;
  }

  .hero__media--video::after {
    background: rgba(0, 0, 0, 0.18);
  }

  .hero-video-controls {
    left: 50%;
    right: auto;
    bottom: 3.8rem;
    z-index: 8;
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
  }

  .hero__media--video.is-playing .hero-video-controls,
  .hero__media--video:hover .hero-video-controls {
    transform: translateX(-50%);
  }

  .hero-video-controls__btn {
    width: 50px;
    height: 50px;
  }

  .hero-carousel__dots {
    bottom: 1rem;
  }
}