/**
 * Widget Hero — VIP Travel
 *
 * Hero a pantalla completa (ancho y alto) con fondo de imagen o video,
 * capa de overlay configurable, contenido alineable y barra de servicios
 * en marquee infinito (CSS puro, sin JS).
 */

/* =============================================================================
 * CONTENEDOR
 * ============================================================================= */
.vt-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* Ancho completo de pantalla, aunque esté dentro de un contenedor de Elementor. */
.vt-hero--full-width {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Alto = pantalla visible (descontando el espacio que reserva el header fijo).
   svh evita el salto de la barra de direcciones en móviles. */
.vt-hero--full-height {
  min-height: calc(100vh - var(--vt-header-space, 92px));
  min-height: calc(100svh - var(--vt-header-space, 92px));
}

/* El hero sube hasta el borde superior, anulando el espacio que .site-content
   reserva para el header: así la pastilla flotante queda ENCIMA de la foto.
   Al no descontar nada, el alto completo pasa a ser la pantalla entera. */
.vt-hero--under-header {
  margin-top: calc(-1 * var(--vt-header-space, 92px));
}

.vt-hero--under-header.vt-hero--full-height {
  min-height: 100vh;
  min-height: 100svh;
}

/* =============================================================================
 * FONDO (imagen / video)
 * ============================================================================= */
.vt-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.vt-hero__bg img,
.vt-hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Fallback móvil: si hay imagen para móvil, el video se oculta ahí (rendimiento). */
.vt-hero__fallback { display: none; }

@media (max-width: 782px) {
  .vt-hero__bg--has-fallback .vt-hero__video { display: none; }
  .vt-hero__bg--has-fallback .vt-hero__fallback { display: block; }
}

/* =============================================================================
 * OVERLAY (gradiente o color — se configura desde Elementor)
 * ============================================================================= */
.vt-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* =============================================================================
 * CONTENIDO
 * ============================================================================= */
.vt-hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  width: 100%;
  max-width: var(--vt-container, 1200px);
  margin-inline: auto;
  padding: 100px 20px;
}

/* Alineación vertical */
.vt-hero--v-top    .vt-hero__inner { align-items: flex-start; }
.vt-hero--v-middle .vt-hero__inner { align-items: center; }
.vt-hero--v-bottom .vt-hero__inner { align-items: flex-end; }

/* Alineación horizontal */
.vt-hero--h-left   .vt-hero__inner { justify-content: flex-start; }
.vt-hero--h-center .vt-hero__inner { justify-content: center; }
.vt-hero--h-right  .vt-hero__inner { justify-content: flex-end; }

.vt-hero--h-left   .vt-hero__content { text-align: left; }
.vt-hero--h-center .vt-hero__content { text-align: center; margin-inline: auto; }
.vt-hero--h-right  .vt-hero__content { text-align: right; }

/* Si hay marquee, dejamos aire abajo para que no tape el contenido. */
.vt-hero--has-marquee .vt-hero__inner { padding-bottom: 140px; }

.vt-hero__content { max-width: 800px; }

.vt-hero__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vt-accent, #5694a9);
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .1);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.vt-hero__title {
  font-family: var(--vt-font-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}

/* Palabra destacada: <em> NO va en cursiva, sólo cambia de color (como la maqueta). */
.vt-hero__title em {
  font-style: normal;
  color: var(--vt-accent, #5694a9);
}

.vt-hero__subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .85);
  margin: 0 0 36px;
  max-width: 560px;
}

.vt-hero--h-center .vt-hero__subtitle { margin-inline: auto; }
.vt-hero--h-right  .vt-hero__subtitle { margin-left: auto; }

/* Botones */
.vt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.vt-hero--h-center .vt-hero__actions { justify-content: center; }
.vt-hero--h-right  .vt-hero__actions { justify-content: flex-end; }

.vt-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  transition: all .25s ease;
  cursor: pointer;
}

.vt-hero__btn--primary {
  background: var(--vt-accent, #5694a9);
  border-color: var(--vt-accent, #5694a9);
  color: #fff;
}

.vt-hero__btn--primary:hover {
  background: var(--vt-accent-dark, #427a8d);
  border-color: var(--vt-accent-dark, #427a8d);
  color: #fff;
  transform: translateY(-2px);
}

.vt-hero__btn--ghost {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .7);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.vt-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, .2);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

/* =============================================================================
 * MARQUEE DE SERVICIOS (icono + texto, loop infinito)
 * -----------------------------------------------------------------------------
 * El track se divide en DOS MITADES idénticas. Al desplazarlo -50% la segunda
 * mitad queda exactamente donde estaba la primera → loop sin costura.
 *
 * Cada mitad debe cubrir al menos el ancho de la pantalla o quedan huecos: de
 * eso se encarga main.js, que mide un grupo y lo clona las veces necesarias,
 * ajustando también la duración para mantener la velocidad constante.
 *
 * La separación es uniforme incluso en el empalme entre grupos: el 'gap' separa
 * los items dentro del grupo y el 'padding-right' hace de gap entre grupos.
 * ============================================================================= */
.vt-marquee {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-block: 18px;
  /* Difuminado sutil en los bordes para que entren/salgan suave, sin apagar los
     iconos demasiado pronto. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

/* Dentro del hero, va anclado abajo y a lo ancho. */
.vt-hero .vt-marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.vt-marquee__track {
  display: flex;
  width: max-content;
  animation: vt-marquee-scroll var(--vt-marquee-duration, 30s) linear infinite;
}

.vt-marquee--reverse .vt-marquee__track { animation-direction: reverse; }
.vt-marquee--pause:hover .vt-marquee__track { animation-play-state: paused; }

.vt-marquee__group {
  display: flex;
  align-items: center;
  gap: var(--vt-marquee-gap, 48px);
  padding-right: var(--vt-marquee-gap, 48px);
  flex-shrink: 0;
}

@keyframes vt-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.vt-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .25s ease;
}

a.vt-marquee__item:hover { color: var(--vt-accent, #5694a9); }

.vt-marquee__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.vt-marquee__icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Accesibilidad: sin animación si el usuario la desactivó en su sistema. */
@media (prefers-reduced-motion: reduce) {
  .vt-marquee__track { animation: none; }
  .vt-marquee { overflow-x: auto; }
}

/* =============================================================================
 * RESPONSIVE
 * ============================================================================= */
@media (max-width: 782px) {
  .vt-hero__inner { padding: 80px 20px; }
  .vt-hero--has-marquee .vt-hero__inner { padding-bottom: 120px; }
  .vt-hero__subtitle { font-size: 1rem; }
  .vt-hero__btn { padding: 12px 24px; font-size: 14px; }
  .vt-marquee { padding-block: 14px; }
  .vt-marquee__item { font-size: 13.5px; }
  .vt-marquee__icon { font-size: 19px; }
}
