/* ============================================================
   Atheria Room Hero — Single-room hero with overlay, breadcrumb,
   title/intro, bottom anchor links + scroll indicator.
   Structural only; all colors come from tokens or inline vars
   the widget writes from its Style controls.
   ============================================================ */

.ath-room-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: var(--ath-room-hero-h, calc(100vh - var(--ath-header-h, 80px)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  color: var(--ath-room-hero-text, #F4FCFB);
}

/* ── Background image ── */
.ath-room-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ath-room-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Overlay (darkening gradient for legibility) ── */
.ath-room-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, var(--ath-room-hero-ov-top, 0.45)) 0%,
      rgba(0, 0, 0, var(--ath-room-hero-ov-mid, 0.35)) 45%,
      rgba(0, 0, 0, var(--ath-room-hero-ov-bot, 0.65)) 100%
    );
  pointer-events: none;
}

/* ── Content layer ── */
.ath-room-hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--ath-room-hero-maxw, 1280px);
  margin-inline: auto;
  padding: clamp(2rem, 1.5rem + 4vw, 5rem) clamp(1.25rem, 0.5rem + 3vw, 4rem);
  padding-left: var(--ath-room-hero-offset, clamp(1.25rem, 0.5rem + 3vw, 4rem));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  flex: 1 1 auto;
  justify-content: center;
}

/* ── Breadcrumb ── */
.ath-room-hero__crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: clamp(0.62rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ath-room-hero__crumb {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.85em;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  line-height: 1;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

a.ath-room-hero__crumb:hover,
a.ath-room-hero__crumb:focus-visible {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
  outline: 0;
}

.ath-room-hero__crumb-sep {
  opacity: 0.6;
  font-size: 0.85em;
}

/* ── Title + intro ── */
.ath-room-hero__title {
  margin: 0;
  font-size: var(--ath-room-hero-title-size, clamp(2.5rem, 1.2rem + 6vw, 6rem));
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.ath-room-hero__intro {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  line-height: 1.6;
  text-transform: var(--ath-room-hero-intro-tt, none);
  opacity: 0.92;
}

/* ── Bottom bar (scroll indicator + anchor links) ── */
.ath-room-hero__bar {
  position: relative;
  z-index: 3;
  width: 100%;
  overflow: visible;
  max-width: var(--ath-room-hero-maxw, 1280px);
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 0.5rem + 3vw, 4rem) clamp(1.5rem, 1rem + 2vw, 2.75rem);
  padding-left: var(--ath-room-hero-bar-offset, var(--ath-room-hero-offset, clamp(1.25rem, 0.5rem + 3vw, 4rem)));
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  min-height: 2.5rem;
}

/* Scroll sits at the far-left edge, out of the links' flow, so the first
   link lines up exactly under the title regardless of the offset. */
.ath-room-hero__scroll-wrap {
  position: absolute;
  left: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

/* Scroll indicator */
.ath-room-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(0.62rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  border-radius: 0 !important;
  text-decoration: none;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}

.ath-room-hero__scroll-icon {
  width: 1.1em;
  height: 1.7em;
  border: 1px solid currentColor;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
}

.ath-room-hero__scroll-icon::after {
  content: "";
  position: absolute;
  top: 0.28em;
  left: 50%;
  width: 2px;
  height: 0.45em;
  margin-left: -1px;
  background: currentColor;
  border-radius: 2px;
  animation: ath-room-hero-scroll 1.6s ease-in-out infinite;
}

@keyframes ath-room-hero-scroll {
  0%   { transform: translateY(0);     opacity: 1; }
  70%  { transform: translateY(0.55em); opacity: 0; }
  100% { transform: translateY(0);     opacity: 0; }
}

/* Anchor links */
.ath-room-hero__links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.75rem, 0.4rem + 1.2vw, 2.5rem);
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-right: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  scroll-padding-right: 1rem;
}
.ath-room-hero__links::-webkit-scrollbar { display: none; }
.ath-room-hero__link { scroll-snap-align: start; }

.ath-room-hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: clamp(0.66rem, 0.6rem + 0.2vw, 0.78rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.25rem 0;
  position: relative;
  transition: opacity 0.25s ease;
}

.ath-room-hero__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.ath-room-hero__link:hover::after,
.ath-room-hero__link:focus-visible::after {
  width: 100%;
}

.ath-room-hero__link:focus-visible {
  outline: 0;
}

.ath-room-hero__link-arrow {
  font-size: 0.9em;
  transition: transform 0.25s ease;
}

.ath-room-hero__link:hover .ath-room-hero__link-arrow {
  transform: translateY(2px);
}

/* ── Responsive ── */

/* Tablet: keep the centred-right content offset; bottom bar stays in one row
   with scroll on the far left and links inline (Image 2). */
@media (min-width: 768px) and (max-width: 1024px) {
  .ath-room-hero {
    --ath-room-hero-offset: 36%;
    --ath-room-hero-bar-offset: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  }
  .ath-room-hero__links {
    gap: clamp(0.75rem, 0.3rem + 1.2vw, 1.75rem);
    flex-wrap: nowrap;
  }
  .ath-room-hero__bar { align-items: center; }
}

/* Mobile: content goes full-width left; links stack vertically, right-aligned,
   with the scroll indicator pinned bottom-left (Image 1). */
@media (max-width: 767px) {
  .ath-room-hero {
    --ath-room-hero-offset: clamp(1rem, 0.5rem + 2vw, 1.5rem);
    min-height: var(--ath-room-hero-h-mobile, 100svh);
    max-height: 100svh;
    justify-content: space-between;
  }
  .ath-room-hero__inner {
    justify-content: flex-start;
    padding-top: clamp(2rem, 5vh, 3.5rem);
    padding-bottom: 0;
    padding-left: clamp(1rem, 0.5rem + 2vw, 1.5rem) !important;
    padding-right: clamp(1rem, 0.5rem + 2vw, 1.5rem);
    flex: 1 1 auto;
    gap: clamp(0.6rem, 1.5vh, 1rem);
  }
  .ath-room-hero__title {
    font-size: clamp(2rem, 1.2rem + 5vw, 3rem);
  }
  .ath-room-hero__intro {
    font-size: 0.85rem;
    max-width: 100%;
  }
  .ath-room-hero__overlay {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, calc(var(--ath-room-hero-ov-top, 0.45) + 0.1)) 0%,
        rgba(0, 0, 0, calc(var(--ath-room-hero-ov-mid, 0.35) + 0.1)) 45%,
        rgba(0, 0, 0, calc(var(--ath-room-hero-ov-bot, 0.65) + 0.05)) 100%
      );
  }
  .ath-room-hero__bar {
    flex-shrink: 0;
    padding-left: clamp(1rem, 0.5rem + 2vw, 1.5rem);
    padding-right: clamp(1rem, 0.5rem + 2vw, 1.5rem);
    padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
    align-items: flex-end;
    justify-content: space-between;
    min-height: auto;
    margin-top: 0;
    position: relative;
  }
  .ath-room-hero__links {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    margin-left: 0;
  }
  .ath-room-hero__link {
    flex-direction: row-reverse;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }
  .ath-room-hero__scroll-wrap {
    position: relative;
    left: auto;
    bottom: auto;
  }
  .ath-room-hero__scroll { gap: 0; }
  .ath-room-hero__scroll-label { display: none; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ath-room-hero__scroll-icon::after { animation: none; }
  .ath-room-hero__link,
  .ath-room-hero__link-arrow,
  .ath-room-hero__crumb { transition: none; }
}

/* ── Editor: keep everything visible, neutralise full-bleed ── */
body.elementor-editor-active .ath-room-hero,
.elementor-editor-active .ath-room-hero {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-height: 70vh;
}

/* ── Conflict guard: prevent Elementor's own entrance animation
   from hiding the whole widget via elementor-invisible ── */
.elementor-widget-atheria_room_hero.elementor-invisible {
  visibility: visible !important;
}
