/**
 * Albassirah home course hero rotator (IOGKF pattern).
 * Gutenberg course slides stay above this stack.
 *
 * Stack: photos z0 · overlay z1 · gradient z2 · content z3 · nav z4
 */

.alb-home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100svh - 112px);
  min-height: calc(100vh - 112px);
  display: flex;
  align-items: center;
  background-color: var(--wp--preset--color--base, #f7f4ee);
}

.alb-home-hero.alb-hero-bg-active {
  background-image: none !important;
}

/* Prevent WP block layout margin-top from pushing background & overlay elements */
.alb-home-hero > .alb-home-hero__bg,
.alb-home-hero > .alb-home-hero__overlay,
.alb-home-hero__bg,
.alb-home-hero__overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.alb-home-hero::before {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.alb-home-hero > .alb-home-hero__content,
.alb-home-hero > .wp-block-group {
  margin-top: 0 !important;
}

.alb-home-hero__bg {
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.alb-home-hero__bg-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center center;
  transform: scale(1);
  transform-origin: center center;
  opacity: 0;
  transition-property: opacity;
  transition-timing-function: ease-in-out;
  will-change: opacity;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.alb-home-hero__bg-slide.is-active {
  opacity: 1;
}

.alb-home-hero__overlay {
  z-index: 1;
  pointer-events: none;
  display: none;
}

/* Content above masks */
.alb-home-hero > .wp-block-group,
.alb-home-hero .alb-home-hero__content,
.alb-home-hero.alb-hero-bg-active > .wp-block-group,
.alb-home-hero.alb-hero-bg-active .alb-home-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
}

.alb-home-hero__content {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wp--preset--spacing--50, 1.5rem);
  padding-right: var(--wp--preset--spacing--50, 1.5rem);
  padding-top: clamp(3rem, 6.5vw, 5rem);
  padding-bottom: clamp(3rem, 6.5vw, 5rem);
}

.alb-home-hero__content .alb-hero-copy {
  max-width: 34rem;
  margin: 0;
  text-align: left;
}

.alb-home-course-slides {
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wp--preset--spacing--50, 1.5rem);
  padding-right: var(--wp--preset--spacing--50, 1.5rem);
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: clamp(340px, 44vh, 480px);
}

.alb-home-course-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 58rem;
  margin: 0;
  margin-right: auto;
  margin-left: 0;
  padding: 0;
  color: var(--wp--preset--color--contrast, #0E1C2B);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.75s step-end;
  will-change: opacity, transform;
}

.alb-home-course-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), transform 0.85s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.alb-home-hero .alb-home-course-kicker,
.alb-home-course-kicker {
  color: var(--wp--preset--color--primary, #0B4F8A) !important;
  font-family: var(--wp--preset--font-family--source-sans-3, "Source Sans 3", sans-serif) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  margin: 0 0 0.85rem 0 !important;
}

.alb-home-hero .alb-home-course-title,
.alb-home-course-title {
  margin: 0 0 1.15rem 0 !important;
  color: var(--wp--preset--color--contrast, #0E1C2B) !important;
  font-family: var(--wp--preset--font-family--literata, "Literata", serif) !important;
  font-size: clamp(1.85rem, 2.8vw, 2.65rem) !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.025em !important;
  text-transform: none !important;
  max-width: 58rem !important;
}

.alb-home-hero .alb-home-course-meta,
.alb-home-course-meta {
  color: var(--wp--preset--color--muted, #44576B) !important;
  font-family: var(--wp--preset--font-family--source-serif-4, "Source Serif 4", serif) !important;
  font-size: clamp(1rem, 1.15vw, 1.125rem) !important;
  line-height: 1.6 !important;
  margin: 0 0 0.35rem 0 !important;
  max-width: 58rem !important;
}

.alb-home-hero .alb-home-course-schedule,
.alb-home-course-schedule {
  color: var(--wp--preset--color--primary, #0B4F8A) !important;
  font-family: var(--wp--preset--font-family--source-sans-3, "Source Sans 3", sans-serif) !important;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem) !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  margin: 0.4rem 0 1.25rem 0 !important;
  max-width: 58rem !important;
}

.alb-home-hero .wp-block-buttons,
.alb-home-course-slide .wp-block-buttons {
  margin-top: var(--wp--preset--spacing--50, 1.5rem) !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  justify-content: flex-start !important;
  align-self: flex-start !important;
  width: 100% !important;
  max-width: 58rem !important;
}

.alb-home-hero .wp-block-button,
.alb-home-course-slide .wp-block-button {
  margin-left: 0 !important;
  margin-right: auto !important;
  padding-left: 0 !important;
}

.alb-home-hero .wp-block-button__link,
.alb-home-course-slide .wp-block-button__link {
  margin-left: 0 !important;
}

/* Dots */
.alb-home-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  list-style: none;
  background: rgba(247, 244, 238, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  pointer-events: auto;
  opacity: 0.45;
  box-shadow: 0 2px 8px rgba(6, 46, 82, 0.04);
  transition: opacity 0.25s ease;
}

.alb-home-hero:hover .alb-home-hero__dots {
  opacity: 0.8;
}

.alb-home-hero__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 46, 82, 0.25);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.alb-home-hero__dot.is-active {
  width: 20px;
  border-radius: 4px;
  background: var(--wp--preset--color--primary-dark, #062e52);
}

.alb-home-hero__dot:hover,
.alb-home-hero__dot:focus-visible {
  background: var(--wp--preset--color--primary, #0b4f8a);
  outline: none;
}

/* Arrows — Discreet luxury glass treatment with reduced opacity */
.alb-home-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--wp--preset--color--primary-dark, #062e52);
  font-size: 20px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.2;
  box-shadow: 0 2px 8px rgba(6, 46, 82, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reveal arrows smoothly when hovering over the hero area or focused */
.alb-home-hero:hover .alb-home-hero__arrow,
.alb-home-hero__arrow:focus-visible {
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.45);
}

.alb-home-hero__arrow:hover {
  opacity: 0.85 !important;
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--wp--preset--color--primary, #0b4f8a) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-50%) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(6, 46, 82, 0.1) !important;
  outline: none;
}

.alb-home-hero__arrow--prev {
  left: 1.5rem;
  padding-right: 2px;
}

.alb-home-hero__arrow--next {
  right: 1.5rem;
  padding-left: 2px;
}

@media (max-width: 781px) {
  .alb-home-hero__arrow {
    display: none; /* Keep mobile view clean and unobstructed; use bottom pill dots */
  }

  .alb-home-hero__dots {
    bottom: 0.75rem;
  }

  .alb-home-hero {
    min-height: 480px;
  }

  .alb-home-hero__content {
    text-align: center !important;
  }

  .alb-home-hero__content .alb-hero-copy,
  .alb-hero-split .alb-hero-copy,
  .alb-home-course-slides {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .alb-home-course-slide {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .alb-home-hero__content .alb-hero-kicker,
  .alb-home-hero__content h1,
  .alb-home-hero__content .alb-hero-lead,
  .alb-hero-split .alb-hero-kicker,
  .alb-hero-split h1,
  .alb-hero-split .alb-hero-lead,
  .alb-home-course-kicker,
  .alb-home-course-title,
  .alb-home-course-meta,
  .alb-home-course-schedule {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .alb-home-hero__content .wp-block-buttons,
  .alb-hero-split .wp-block-buttons,
  .alb-home-course-slide .wp-block-buttons {
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .alb-home-course-title {
    font-size: clamp(1.45rem, 5.5vw, 2.2rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alb-home-hero__bg-slide,
  .alb-home-course-slide {
    transition: none !important;
  }
}
