/* After Hours Hero Video (Homepage Full-Bleed)
   - Rendered by the "After Hours: Hero Video" widget (homepage only)
*/
.ah-hero-video {
  position: relative;
  width: calc(100vw - (100vw - 100%));
  height: var(--ah-hero-height, 90vh);
  min-height: 520px;
  overflow: hidden;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ah-hero-video.ah-hero-contained {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 768px) {
  .ah-hero-video {
    /* Mobile sizing: reduce hero height so it isn't overly tall on phones.
       Target ~5:4 (W:H) by using a height around 80vw (i.e., 4/5 of viewport width).
    */
    height: 80vw;
    max-height: 60vh;
    min-height: 0;
  }
}

.ah-hero-video__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%);
}

.ah-hero-video__video::-webkit-media-controls { display: none !important; }

/* ===========================
   After Hours Hero Overlay System
   - Scoped to the Hero Video widget output only
   =========================== */

.ah-hero-video.ah-hero-has-overlay .ah-hero-video__video { z-index: 1; }
.ah-hero-video.ah-hero-has-overlay::after { z-index: 2; }

.ah-hero-video .ah-hero-video__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
}

.ah-hero-video.ah-ov-vis-hover_tap .ah-hero-video__overlay,
.ah-hero-video.ah-ov-vis-delay .ah-hero-video__overlay {
  opacity: 0;
  transition: opacity 250ms ease;
}

.ah-hero-video.ah-ov-vis-hover_tap:hover .ah-hero-video__overlay,
.ah-hero-video.ah-ov-vis-hover_tap.ah-ov-menu-open .ah-hero-video__overlay,
.ah-hero-video.ah-ov-vis-always .ah-hero-video__overlay,
.ah-hero-video.ah-ov-vis-delay.ah-ov-revealed .ah-hero-video__overlay {
  opacity: 1;
}

.ah-hero-video.ah-ov-pointer-capture .ah-hero-video__overlay { pointer-events: auto; }

/* Optional video dimmer/scrim (per-widget via CSS vars) */
.ah-hero-video .ah-hero-video__dimmer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(var(--ah-ov-dimmer-rgb, 0,0,0), var(--ah-ov-dimmer-opacity, 0.18));
}

.ah-hero-video .ah-hero-video__dimmer--gradient {
  background: linear-gradient(
    to bottom,
    rgba(var(--ah-ov-dimmer-rgb, 0,0,0), 0.06),
    rgba(var(--ah-ov-dimmer-rgb, 0,0,0), var(--ah-ov-dimmer-opacity, 0.18))
  );
}

.ah-hero-video .ah-hero-video__dimmer--vignette {
  background: radial-gradient(
    ellipse at center,
    rgba(var(--ah-ov-dimmer-rgb, 0,0,0), 0.03) 0%,
    rgba(var(--ah-ov-dimmer-rgb, 0,0,0), var(--ah-ov-dimmer-opacity, 0.18)) 100%
  );
}

/* Overlay logo */
.ah-hero-video .ah-hero-video__logo {
  position: absolute;
  width: var(--ah-ov-logo-w, 180px);
  max-width: var(--ah-ov-logo-maxw, 2000px);
  opacity: var(--ah-ov-logo-opacity, 1);
  pointer-events: auto;
}

.ah-hero-video .ah-hero-video__logo-img {
  display: block;
  width: 100%;
  height: auto;
}

.ah-hero-video .ah-hero-video__logo-link { display: inline-block; }

/* ------------------------------------------------------------
   Overlay logo animations (optional)
------------------------------------------------------------ */

@keyframes ah-logo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ah-logo-zoom-in {
  from { opacity: 0; transform: scale(var(--ah-ov-logo-anim-zoom-from, 0.86)); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ah-logo-bounce-in {
  0% { opacity: 0; transform: translateY(var(--ah-ov-logo-anim-bounce-distance, 10px)) scale(var(--ah-ov-logo-anim-bounce-scale-from, 0.92)); }
  60% { opacity: 1; transform: translateY(0) scale(var(--ah-ov-logo-anim-bounce-scale-overshoot, 1.04)); }
  85% { transform: translateY(0) scale(0.99); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes ah-logo-slide-up {
  from { opacity: 0; transform: translateY(var(--ah-ov-logo-anim-slide-distance, 18px)); }
  to { opacity: 1; transform: translateY(0); }
}

.ah-hero-video .ah-logo-anim.ah-logo-anim--fade {
  animation: ah-logo-fade-in var(--ah-ov-logo-anim-duration, 900ms) var(--ah-ov-logo-anim-ease, ease-out) var(--ah-ov-logo-anim-delay, 0ms) both;
}

.ah-hero-video .ah-logo-anim.ah-logo-anim--zoom {
  animation: ah-logo-zoom-in var(--ah-ov-logo-anim-duration, 900ms) var(--ah-ov-logo-anim-ease, ease-out) var(--ah-ov-logo-anim-delay, 0ms) both;
}

.ah-hero-video .ah-logo-anim.ah-logo-anim--bounce {
  animation: ah-logo-bounce-in var(--ah-ov-logo-anim-duration, 900ms) var(--ah-ov-logo-anim-ease, ease-out) var(--ah-ov-logo-anim-delay, 0ms) both;
}

.ah-hero-video .ah-logo-anim.ah-logo-anim--slide-up {
  animation: ah-logo-slide-up var(--ah-ov-logo-anim-duration, 900ms) var(--ah-ov-logo-anim-ease, ease-out) var(--ah-ov-logo-anim-delay, 0ms) both;
}

.ah-hero-video .ah-logo-anim.ah-logo-anim-loop {
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@media (prefers-reduced-motion: reduce) {
  .ah-hero-video .ah-logo-rm {
    animation: none !important;
    transform: none !important;
  }
}

.ah-hero-video .ah-logo-layer-below { z-index: 4; }
.ah-hero-video .ah-logo-layer-above { z-index: 6; }

.ah-hero-video .ah-logo-pos-top-left { top: var(--ah-ov-logo-y, 18px); left: var(--ah-ov-logo-x, 18px); }
.ah-hero-video .ah-logo-pos-top-center { top: var(--ah-ov-logo-y, 18px); left: calc(50% + var(--ah-ov-logo-x, 0px)); transform: translateX(-50%); }
.ah-hero-video .ah-logo-pos-top-right { top: var(--ah-ov-logo-y, 18px); right: var(--ah-ov-logo-x, 18px); }
.ah-hero-video .ah-logo-pos-center-left { top: calc(50% + var(--ah-ov-logo-y, 0px)); left: var(--ah-ov-logo-x, 18px); transform: translateY(-50%); }
.ah-hero-video .ah-logo-pos-center { top: calc(50% + var(--ah-ov-logo-y, 0px)); left: calc(50% + var(--ah-ov-logo-x, 0px)); transform: translate(-50%, -50%); }
.ah-hero-video .ah-logo-pos-center-right { top: calc(50% + var(--ah-ov-logo-y, 0px)); right: var(--ah-ov-logo-x, 18px); transform: translateY(-50%); }
.ah-hero-video .ah-logo-pos-bottom-left { bottom: var(--ah-ov-logo-y, 18px); left: var(--ah-ov-logo-x, 18px); }
.ah-hero-video .ah-logo-pos-bottom-center { bottom: var(--ah-ov-logo-y, 18px); left: calc(50% + var(--ah-ov-logo-x, 0px)); transform: translateX(-50%); }
.ah-hero-video .ah-logo-pos-bottom-right { bottom: var(--ah-ov-logo-y, 18px); right: var(--ah-ov-logo-x, 18px); }

.ah-hero-video .ah-hero-overlay__inner { z-index: 5; }

.ah-hero-video .ah-hero-overlay__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Subtitle/CTA stack */
.ah-hero-video .ah-hero-overlay__stack {
  position: absolute;
  max-width: var(--ah-ov-subtitle-maxw, 640px);
}

/* Positions */
.ah-hero-video.ah-ov-pos-bottom-left .ah-hero-overlay__stack { left: 5vw; bottom: 8vh; }
.ah-hero-video.ah-ov-pos-bottom-center .ah-hero-overlay__stack { left: 50%; bottom: 8vh; transform: translateX(-50%); }
.ah-hero-video.ah-ov-pos-bottom-right .ah-hero-overlay__stack { right: 5vw; bottom: 8vh; }
.ah-hero-video.ah-ov-pos-center-left .ah-hero-overlay__stack { left: 5vw; top: 50%; transform: translateY(-50%); }
.ah-hero-video.ah-ov-pos-center .ah-hero-overlay__stack { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ah-hero-video.ah-ov-pos-center-right .ah-hero-overlay__stack { right: 5vw; top: 50%; transform: translateY(-50%); }

/* Text align */
.ah-hero-video.ah-ov-align-left .ah-hero-overlay__stack { text-align: left; }
.ah-hero-video.ah-ov-align-center .ah-hero-overlay__stack { text-align: center; }
.ah-hero-video.ah-ov-align-right .ah-hero-overlay__stack { text-align: right; }

.ah-hero-video .ah-hero-overlay__subtitle {
  display: block;
  color: var(--ah-ov-color, inherit);
  opacity: var(--ah-ov-opacity, 1);
  font-size: clamp(18px, 2vw, 38px);
  line-height: 1.1;
  letter-spacing: 0.2px;
  white-space: pre-line;
  margin: 0;
  padding: 0;
}

/* Subtitle background styles */
.ah-hero-video.ah-ov-bg-gradient .ah-hero-overlay__subtitle {
  padding: 14px 16px;
  background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0));
  border-radius: 10px;
}

.ah-hero-video.ah-ov-bg-panel .ah-hero-overlay__subtitle {
  padding: 14px 16px;
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
}

/* CTA */
.ah-hero-video .ah-hero-overlay__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  pointer-events: auto;
  margin-top: 14px;
  transition: filter 180ms ease, transform 180ms ease;
}

.ah-hero-video .ah-hero-overlay__cta:hover,
.ah-hero-video .ah-hero-overlay__cta:focus {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.ah-hero-video .ah-cta-style-primary { background: rgba(255,255,255,0.9); color: #000; }
.ah-hero-video .ah-cta-style-outline { background: transparent; border: 2px solid rgba(255,255,255,0.85); color: rgba(255,255,255,0.95); }
.ah-hero-video .ah-cta-style-ghost { background: rgba(0,0,0,0.25); color: rgba(255,255,255,0.95); }

.ah-hero-video .ah-cta-pos-top-right {
  position: absolute;
  top: 18px;
  right: 18px;
  margin-top: 0;
}

.ah-hero-video .ah-cta-pos-bottom-right {
  position: absolute;
  bottom: 18px;
  right: 18px;
  margin-top: 0;
}

/* Animations */
.ah-hero-video .ah-hero-overlay__subtitle {
  animation-duration: var(--ah-ov-anim-duration, 900ms);
  animation-delay: var(--ah-ov-anim-delay, 150ms);
  animation-fill-mode: both;
  animation-iteration-count: 1;
}

.ah-hero-video.ah-ov-repeat-loop .ah-hero-overlay__subtitle { animation-iteration-count: infinite; }

@keyframes ahFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: var(--ah-ov-opacity, 1); transform: translateY(0); }
}

@keyframes ahSlideLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: var(--ah-ov-opacity, 1); transform: translateX(0); }
}

@keyframes ahSlideRight {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: var(--ah-ov-opacity, 1); transform: translateX(0); }
}

@keyframes ahGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { text-shadow: 0 0 18px rgba(255,255,255,0.25); }
}

.ah-hero-video.ah-ov-anim-fade-up .ah-hero-overlay__subtitle { animation-name: ahFadeUp; }
.ah-hero-video.ah-ov-anim-slide-left .ah-hero-overlay__subtitle { animation-name: ahSlideLeft; }
.ah-hero-video.ah-ov-anim-slide-right .ah-hero-overlay__subtitle { animation-name: ahSlideRight; }
.ah-hero-video.ah-ov-anim-glow .ah-hero-overlay__subtitle { animation-name: ahGlow; }
.ah-hero-video.ah-ov-anim-typewriter .ah-hero-overlay__subtitle { animation-name: ahFadeUp; }

@media (prefers-reduced-motion: reduce) {
  .ah-hero-video.ah-ov-respect-rm .ah-hero-overlay__subtitle {
    animation: none !important;
    transition: none !important;
  }
}

/* Menu trigger + panel */
.ah-hero-video .ah-hero-overlay__menu-trigger {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 9;
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
  transition: filter 180ms ease;
}

.ah-hero-video .ah-hero-overlay__menu-trigger:hover,
.ah-hero-video .ah-hero-overlay__menu-trigger:focus { filter: brightness(1.15); }

.ah-hero-video .ah-trigger-icon-only {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ah-hero-video .ah-trigger-text-only {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.ah-hero-video .ah-hero-overlay__menu-panel {
  position: absolute;
  width: var(--ah-ov-menu-width, 320px);
  z-index: 10;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
  border-radius: 14px;
  overflow: hidden;
}

.ah-hero-video.ah-ov-menu-open .ah-hero-overlay__menu-panel { opacity: 1; transform: translateY(0); }

.ah-hero-video.ah-menu-pos-top-left .ah-hero-overlay__menu-panel { top: 70px; left: 18px; }
.ah-hero-video.ah-menu-pos-top-right .ah-hero-overlay__menu-panel { top: 70px; right: 18px; }
.ah-hero-video.ah-menu-pos-bottom-left .ah-hero-overlay__menu-panel { bottom: 18px; left: 18px; }
.ah-hero-video.ah-menu-pos-bottom-right .ah-hero-overlay__menu-panel { bottom: 18px; right: 18px; }
.ah-hero-video.ah-menu-pos-center .ah-hero-overlay__menu-panel { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.ah-hero-video.ah-menu-style-dark-translucent .ah-hero-overlay__menu-panel { background: rgba(0,0,0,0.55); }
.ah-hero-video.ah-menu-style-light-translucent .ah-hero-overlay__menu-panel { background: rgba(255,255,255,0.72); color: rgba(0,0,0,0.95); }
.ah-hero-video.ah-menu-style-solid-dark .ah-hero-overlay__menu-panel { background: rgba(0,0,0,0.9); }

.ah-hero-video .ah-hero-overlay__menu-list {
  list-style: none;
  margin: 0;
  padding: 10px;
}

.ah-hero-video .ah-hero-overlay__menu-item a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: filter 160ms ease, background 160ms ease;
}

.ah-hero-video .ah-hero-overlay__menu-item a:hover,
.ah-hero-video .ah-hero-overlay__menu-item a:focus {
  filter: brightness(1.1);
  background: rgba(255,255,255,0.08);
}
