/* Home-specific styles */

/* ─── Layout: página completa sin scroll ─────────────────────── */
body.page-home {
  height: 100vh;
  overflow: hidden;
}

body.page-home .slider-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ─── Header: overlay sobre el slider ───────────────────────── */
body.page-home header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
}

body.page-home .navbar {
  background: transparent !important;
  border-bottom: none !important;
}


/* ─── Hero Slider ────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Splide ocupa todo el contenedor */
.hero-slider .splide,
.hero-slider .splide__track,
.hero-slider .splide__list,
.hero-slider .splide__slide {
  height: 100%;
}

/* ─── Slide: imagen de fondo ─────────────────────────────────── */
.slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── Slide: overlay degradado ───────────────────────────────── */
.slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 6, 6, .88) 0%,
    rgba(6, 6, 6, .35) 45%,
    rgba(6, 6, 6, .10) 100%
  );
  z-index: 1;
}

/* ─── Slide: contenido texto (inferior izquierdo) ────────────── */
.slide__content {
  position: absolute;
  bottom: 88px;
  left: clamp(1.5rem, 5vw, 4rem);
  z-index: 2;
  max-width: min(520px, 80vw);
}

.slide__title {
  font-family: var(--font-headings);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.05;
  margin-bottom: .75rem;
}

.slide__text {
  font-family: var(--font-body);
  font-size: clamp(.875rem, 1.5vw, 1rem);
  color: rgba(252, 252, 252, .82);
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

/* El CTA del slide usa .btn .btn-primary (liquid glass global, en main.min.css) */

/* ─── Entrada del contenido del slide activo (se re-dispara al cambiar) ─── */
.hero-slider .splide__slide.is-active .slide__content > * {
  animation: heroRise .85s cubic-bezier(.22, .61, .36, 1) both;
}

.hero-slider .splide__slide.is-active .slide__content > *:nth-child(1) { animation-delay: .15s; }
.hero-slider .splide__slide.is-active .slide__content > *:nth-child(2) { animation-delay: .30s; }
.hero-slider .splide__slide.is-active .slide__content > *:nth-child(3) { animation-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  .hero-slider .splide__slide.is-active .slide__content > * { animation: none; }
}

/* ─── Paginación: bullets alargados (inferior centro) ───────── */
.hero-slider .splide__pagination {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-slider .splide__pagination__page {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, .3);
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  display: block;
  transition: background var(--transition), width var(--transition);
}

.hero-slider .splide__pagination__page:hover {
  background: rgba(255, 255, 255, .65);
}

.hero-slider .splide__pagination__page.is-active {
  background: var(--accent);
  width: 52px;
}

/* ─── Flechas prev / next ────────────────────────────────────── */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .30);
  color: var(--white);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  font-size: 1.25rem;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .40),
    0 8px 24px rgba(0, 0, 0, .28);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  line-height: 1;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .50);
  color: var(--white);
  transform: translateY(-50%) scale(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 10px 28px rgba(0, 0, 0, .35);
}

.slider-arrow--prev { left: clamp(1rem, 3vw, 2.5rem); }
.slider-arrow--next { right: clamp(1rem, 3vw, 2.5rem); }

/* ─── Botón Play / Pause (inferior derecho) ──────────────────── */
.slider-playpause {
  position: absolute;
  bottom: 22px;
  right: clamp(1rem, 3vw, 2.5rem);
  z-index: 10;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .30);
  color: var(--white);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  font-size: 1rem;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .40),
    0 8px 24px rgba(0, 0, 0, .28);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  line-height: 1;
}

.slider-playpause:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .50);
  color: var(--white);
  transform: scale(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 10px 28px rgba(0, 0, 0, .35);
}

/* ─── Barra de contacto inferior ────────────────────────────── */
.slider-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  flex-shrink: 0;
  height: 62px;
  background-color: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 0 1.5rem;
}

.slider-footer__item {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 400;
  color: rgba(252, 252, 252, .75);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.slider-footer__item i {
  color: var(--accent);
  font-size: .95rem;
  flex-shrink: 0;
}

a.slider-footer__item:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ─── Barra de progreso (bottom: 0 del slider) ───────────────── */
.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
  z-index: 11;
  overflow: hidden;
}

@keyframes sliderFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.slider-progress__bar {
  height: 100%;
  width: 100%;
  background: var(--accent-subtle);
  transform-origin: left center;
  transform: scaleX(0);
  animation: sliderFill 7s linear forwards;
}

.slider-progress__bar.is-paused {
  animation-play-state: paused;
}

/* ─── Responsive: ocultar texto en móvil pequeño ─────────────── */
@media (max-width: 650px) {
  .slider-footer {
    justify-content: space-evenly;
    gap: 0;
  }
  .slider-footer__item span {
    display: none;
  }
  .slider-footer__item i {
    font-size: 1.2rem;
  }
  .slide__content {
    bottom: 80px;
  }
}
