/* ============================================================
   AMEU home page hero: full-width photo slides with an even dark
   tint, a large centred headline, two call-to-action buttons,
   side tabs and progress-bar slide indicators.
   Loaded only on the home page (index.php).
   ============================================================ */

/* overflow: hidden stops the tucked-away part of the side tabs from widening the page */
.hx-wrap { position: relative; overflow: hidden; }

.hx {
  position: relative;
  height: clamp(460px, 78vh, 660px);
  overflow: hidden;
  background: var(--green-dark);
  color: #fff;
  isolation: isolate;
}
.hx:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

/* ---- Slides ---- */
.hx-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.hx-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.1s ease; }

.hx-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center;
  transform: scale(1.1);
  transition: transform 8s ease-out;
}
.hx-slide.is-active .hx-img { transform: scale(1); }   /* slow zoom: a moving, video-like feel */
.hx-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, var(--green-mid), var(--green-dark) 70%); }

/* Even dark tint across the whole photo, a little deeper at the bottom for the controls */
.hx-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(4,24,13,.50) 0%, rgba(4,24,13,.42) 40%, rgba(4,24,13,.78) 100%);
}

/* ---- Text ---- */
.hx-text {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 clamp(16px, 14vw, 240px) 72px;
}
.hx-kicker {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}
.hx-kicker::before, .hx-kicker::after { content: ''; width: 36px; height: 2px; background: var(--gold); }
.hx-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  font-weight: 700; line-height: 1.08;
  color: #fff;
  max-width: 920px;
  text-shadow: 0 3px 24px rgba(0,0,0,.45);
  overflow-wrap: anywhere;
}
.hx-sub {
  margin-top: 18px;
  font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.6;
  color: rgba(255,255,255,.92);
  max-width: 640px;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hx-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 30px;
  border-radius: 4px; border: 2px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.hx-btn:hover { transform: translateY(-2px); }
.hx-btn--primary { background: var(--gold); color: var(--green-dark); }
.hx-btn--primary:hover { background: var(--gold-light); color: var(--green-dark); }
.hx-btn--ghost { border-color: rgba(255,255,255,.85); color: #fff; background: rgba(255,255,255,.06); }
.hx-btn--ghost:hover { background: #fff; color: var(--green-dark); border-color: #fff; }

/* Text rises in each time its slide appears */
.hx-slide.is-active .hx-kicker,
.hx-slide.is-active .hx-title,
.hx-slide.is-active .hx-sub,
.hx-slide.is-active .hx-ctas { animation: hxUp .9s cubic-bezier(.2,.7,.2,1) both; }
.hx-slide.is-active .hx-title { animation-delay: .12s; }
.hx-slide.is-active .hx-sub   { animation-delay: .26s; }
.hx-slide.is-active .hx-ctas  { animation-delay: .40s; }
@keyframes hxUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---- Controls: progress bars, arrows, pause ---- */
.hx-controls {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.hx-ctrl {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff;
  font-size: 13px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.hx-ctrl:hover { background: var(--gold); border-color: var(--gold); color: var(--green-dark); }
.hx-dots { display: flex; gap: 6px; margin: 0 6px; }
.hx-dot { width: 42px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.hx-bar { position: relative; display: block; width: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.hx-dot:hover .hx-bar { background: rgba(255,255,255,.6); }
.hx-dot.is-active .hx-bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--gold);
  transform-origin: left;
  animation: hxFill var(--hx-delay, 7s) linear forwards;
}
@keyframes hxFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Paused by the button, or while the mouse is over the banner */
.hx.is-paused .hx-dot.is-active .hx-bar::after { animation-play-state: paused; }
@media (hover: hover) {
  .hx-wrap:hover .hx-dot.is-active .hx-bar::after,
  .hx-wrap:focus-within .hx-dot.is-active .hx-bar::after { animation-play-state: paused; }
}
.hx.is-static .hx-dot.is-active .hx-bar::after { animation: none; transform: none; }
.hx.is-static .hx-pause { display: none; }

/* ---- Side tabs: show the icon, slide out on hover ---- */
.hx-tabs {
  position: absolute; right: 0; top: 50%; z-index: 6;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.hx-tab {
  display: flex; align-items: center; gap: 14px;
  width: 230px; padding: 0 20px 0 0; height: 54px;
  background: rgba(255,255,255,.94); color: var(--green-dark);
  border-radius: 6px 0 0 6px;
  box-shadow: 0 6px 22px rgba(0,0,0,.22);
  font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  transform: translateX(calc(100% - 56px));
  transition: transform .3s ease, background .2s, color .2s;
}
.hx-tab i {
  flex: none; width: 56px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--green-dark); font-size: 17px;
  border-radius: 6px 0 0 6px;
}
.hx-tab:hover, .hx-tab:focus-visible { transform: none; background: var(--green-dark); color: #fff; }

.hx-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Tablets and phones ---- */
@media (max-width: 768px) {
  .hx { height: 540px; }
  .hx-text { padding: 0 20px 76px; }
  .hx-kicker { font-size: 10.5px; letter-spacing: .16em; gap: 10px; margin-bottom: 14px; }
  .hx-kicker::before, .hx-kicker::after { width: 20px; }
  .hx-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hx-ctas { margin-top: 24px; width: 100%; max-width: 360px; }
  .hx-btn { flex: 1 1 100%; min-height: 48px; padding: 0 18px; }
  .hx-controls { bottom: 16px; gap: 8px; }
  .hx-ctrl { width: 36px; height: 36px; }
  .hx-dot { width: 30px; }

  /* Side tabs become a 2 x 2 row of buttons under the banner */
  .hx-tabs {
    position: static; transform: none;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
    background: rgba(255,255,255,.12);
  }
  .hx-tab {
    width: auto; height: auto; min-height: 56px; padding: 10px 12px; gap: 10px;
    transform: none; border-radius: 0; box-shadow: none;
    background: var(--green-dark); color: #fff;
    font-size: 12px; letter-spacing: .05em; white-space: normal;
  }
  .hx-tab i { width: auto; height: auto; background: none; color: var(--gold); font-size: 16px; }
  .hx-tab:hover, .hx-tab:focus-visible { background: var(--green-primary); }
}
@media (max-width: 380px) {
  .hx { height: 520px; }
  .hx-ctrl.hx-arrow { display: none; }   /* swipe instead; keeps the row from crowding */
}

@media (prefers-reduced-motion: reduce) {
  .hx-img, .hx-slide.is-active .hx-img { transform: none; transition: none; }
}
