/* ══════════════════════════════════════════
   TRAVEL BOX — hero-scroll-expand.css
   Hero con video que se expande controlado por scroll.
   Requiere: hero-scroll-expand.js
   Usa variables de main.css (--color-gold, --font-display, etc.)
══════════════════════════════════════════ */

.hero.hero-expand {
  display: block;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  min-height: 100dvh;
  background-color: #071E2E;
}

.hero-expand-outer {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Fondo que se desvanece a medida que el video crece */
.hero-expand-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

.hero-expand-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,30,46,0.35) 0%, rgba(7,30,46,0.6) 100%);
}

.hero-expand-container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-expand-frame {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Caja del video — el tamaño (width/height) lo controla el JS inline */
.hero-expand-media {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  will-change: width, height;
}

.hero-expand-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}

.hero-expand-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.18) 0%,
    transparent 30%,
    transparent 65%,
    rgba(0,0,0,0.28) 100%);
}

.hero-expand-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 16px;
}

/* Fila del título — las palabras se separan con el scroll */
.hero-expand-title-row {
  position: relative;
  z-index: 3;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-title-clean {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  color: #FFFFFF;
  line-height: 1.0;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}

.hero-title-word,
.hero-cycle-wrap {
  will-change: transform;
}

.hero-cycle-wrap {
  display: inline-block;
  overflow: hidden;
  height: 1.05em;
}

.hero-cycle {
  display: block;
  color: var(--color-gold);
  animation: cycleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cycleIn {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes cycleOut {
  from { transform: translateY(0);     opacity: 1; }
  to   { transform: translateY(-60px); opacity: 0; }
}

.hero-pre {
  font-family: var(--font-tag);
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 4px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  margin: 0;
}

/* Contenido que aparece cuando el video termina de expandirse */
.hero-expand-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px calc(var(--navbar-h) + 20px);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.hero-expand-content.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-expand-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Evita cualquier scroll residual mientras el video se expande */
body.hero-expand-locked {
  overflow: hidden;
  height: 100dvh;
}

@media (max-width: 768px) {
  .hero-title-clean { gap: 8px; }
  .hero-expand-content { padding: 28px 20px calc(var(--navbar-h) + 16px); }
}
