/* ============================================================
   Atheria Rooms — Hero Slider styles
   ============================================================ */

/* ============================================================
   Atheria Rooms Hero — GSAP Slider
   ============================================================ */

/* ===== Outer hero ===== */
.ath-hero-slider {
  position: relative !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  height: calc(100vh - var(--ath-header-h, 80px)) !important;
  min-height: calc(100vh - var(--ath-header-h, 80px)) !important;
  overflow: hidden !important;
  isolation: isolate;
  padding: 0 !important;
  opacity: 0;
  animation: ath-hero-failsafe 0s linear 3s forwards;
}
.ath-hero-slider.ath-hero-loading {
  opacity: 0;
}
.ath-hero-slider.is-ready {
  opacity: 1;
  animation: none;
  transition: opacity 0.8s ease-out;
}
body.elementor-editor-active .ath-hero-slider {
  opacity: 1 !important;
  animation: none !important;
}
@keyframes ath-hero-failsafe {
  to { opacity: 1; }
}

/* ===== Slides — all stacked absolutely on top of each other ===== */
.ath-hero-slider__slide,
.elementor-element.ath-hero-slider__slide {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}
/* JS sets these z-indexes dynamically; CSS gives defaults */
.ath-hero-slider__slide:nth-of-type(1) { z-index: 4; }
.ath-hero-slider__slide:nth-of-type(2) { z-index: 3; }
.ath-hero-slider__slide:nth-of-type(3) { z-index: 2; }
.ath-hero-slider__slide:nth-of-type(4) { z-index: 1; }
.ath-hero-slider__slide:nth-of-type(n+5) { z-index: 1; }

/* Inner .e-con-inner of each slide */
.ath-hero-slider__slide > .e-con-inner {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

/* ===== Slide image — fills entire slide ===== */
.ath-hero-slider__slide-img,
.elementor-element.ath-hero-slider__slide-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  background-size: cover !important;
  background-position: 50% 50% !important;
  background-repeat: no-repeat !important;
}
.ath-hero-slider__slide-img > .elementor-widget-container,
.ath-hero-slider__slide-img .elementor-image,
.ath-hero-slider__slide-img figure,
.ath-hero-slider__slide-img a {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
.ath-hero-slider__slide-img img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  max-width: none !important;
}

/* Darkening overlay — a ::after on the image itself (not a separate
   element) so it automatically follows the SAME opacity animation the
   existing JS already runs on .slide-img per-slide. A separate sibling
   div was never told about by that JS, so it stayed permanently visible
   and (since slide 1 always keeps the highest z-index) visibly leaked
   over every other slide's image AND text. */
.ath-hero-slider__slide-img::after {
  content: "";
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(36, 60, 76, 0.15) 0%, rgba(36, 60, 76, 0.6) 100%);
  opacity: 0.35; /* fallback — overridden by the overlay_opacity control */
}

/* ===== Slide text — bottom-left, hidden initially ===== */
.ath-hero-slider__slide-text,
.elementor-element.ath-hero-slider__slide-text {
  position: relative !important;
  z-index: 5 !important;
  align-self: flex-start !important;
  margin-right: auto !important;
  width: 80% !important;
  max-width: 1005px !important;
  padding: 0 0 7vh 12vw !important;
  opacity: 0;
}
/* First slide's text visible by default (before JS runs) */
.ath-hero-slider__slide:nth-of-type(1) .ath-hero-slider__slide-text { opacity: 1; }

/* Heading — Elementor controls typography & color, we just position */
.ath-hero-slider__header,
.ath-hero-slider__header .elementor-heading-title {
  text-transform: capitalize;
  margin: 0 0 2.5rem 0 !important;
}

/* CTA inline — original has horizontal line before text */
.ath-hero-slider__cta .elementor-button {
  position: relative !important;
  margin-left: 65px;
  text-transform: uppercase;
  letter-spacing: 6px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: #F4FCFB !important;
}
.ath-hero-slider__cta .elementor-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -55px;
  transform: translateY(-50%);
  width: 40px;
  height: 1px;
  background-color: #F4FCFB;
}

/* ===== NAVIGATION (auto-built by JS) ===== */
.ath-hero-slider__navigation {
  position: absolute;
  top: 50%;
  right: 5vw;
  transform: translateY(-50%);
  width: 21px;
  height: 400px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ath-hero-slider__count-stack {
  position: relative;
  width: 100%;
  min-height: 1.6rem;
}
.ath-hero-slider__count-stack--top {
  /* top stack */
}
.ath-hero-slider__count-stack--bottom {
  /* bottom stack */
}
.ath-hero-slider__count {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  color: #F4FCFB;
  font-family: Manrope, system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: .1em;
  line-height: 1;
}
.ath-hero-slider__count.is-active { opacity: 1; }

/* Progress bar */
.ath-hero-slider__bar {
  position: relative;
  width: 2px;
  height: 250px;
}
.ath-hero-slider__bar-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(244, 252, 251, .25);
  z-index: 1;
}
.ath-hero-slider__bar-dynamic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #F4FCFB;
  transform-origin: top center;
  transform: scaleY(0);
  z-index: 2;
}

/* ===== CORNER CTA (pill button bottom-right) ===== */
.ath-hero-slider__corner-cta,
.elementor-element.ath-hero-slider__corner-cta {
  position: absolute !important;
  bottom: 3rem !important;
  right: 3rem !important;
  z-index: 15 !important;
  width: auto !important;
}
.ath-hero-slider__corner-cta-btn,
.ath-hero-slider__corner-cta .elementor-button {
  border-radius: 999px !important;
  padding: 1rem 1.75rem !important;
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
  .ath-hero-slider__slide-text { width: 88% !important; padding: 0 0 6vh 6vw !important; }
  .ath-hero-slider__header { margin-bottom: 1.75rem !important; }
  .ath-hero-slider__cta .elementor-button { margin-left: 50px; letter-spacing: 4px; }
  .ath-hero-slider__cta .elementor-button::before { left: -45px; width: 32px; }
  .ath-hero-slider__navigation { right: 3vw; height: 320px; }
  .ath-hero-slider__bar { height: 180px; }
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {
  .ath-hero-slider { height: calc(100svh - var(--ath-header-h, 64px)) !important; min-height: calc(100svh - var(--ath-header-h, 64px)) !important; }
  .ath-hero-slider__slide-text {
    width: 100% !important;
    padding: 0 1.5rem 12rem 1.5rem !important;
  }
  .ath-hero-slider__header { margin-bottom: 1.25rem !important; }
  .ath-hero-slider__cta .elementor-button {
    margin-left: 36px;
    letter-spacing: 3px;
    font-size: .85rem;
  }
  .ath-hero-slider__cta .elementor-button::before {
    left: -28px;
    width: 20px;
  }
  .ath-hero-slider__navigation { right: 1rem; height: 220px; }
  .ath-hero-slider__bar { height: 120px; }
  .ath-hero-slider__corner-cta {
    bottom: calc(1.5rem + env(safe-area-inset-bottom)) !important;
    right: 1.5rem !important;
  }
  .ath-hero-slider__corner-cta-btn,
  .ath-hero-slider__corner-cta .elementor-button { padding: .7rem 1.1rem !important; font-size: .8rem !important; }
}

/* ===== EDITOR SAFETY — show all slides as flat tiles, hide nav ===== */
body.elementor-editor-active .ath-hero-slider {
  height: auto !important;
  min-height: auto !important;
  display: block !important;
}
body.elementor-editor-active .ath-hero-slider__slide {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  height: 60vh !important;
  margin-bottom: 1rem !important;
  opacity: 1 !important;
  z-index: auto !important;
}
body.elementor-editor-active .ath-hero-slider__slide-text {
  opacity: 1 !important;
  transform: none !important;
}
body.elementor-editor-active .ath-hero-slider__navigation { display: none !important; }
body.elementor-editor-active .ath-hero-slider__corner-cta {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  margin: 1rem !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .ath-hero-slider__slide-img img { transition: none !important; transform: none !important; }
  .ath-hero-slider__bar-dynamic { transform: scaleY(0) !important; }
  .ath-hero-slider.is-ready { transition: none !important; }
}
