/* Homepage presentation layer. The PHP event logic and shared design system
   remain untouched; this file adds the visual motion and responsive polish. */
.xv-featured.xv-hero {
  isolation: isolate;
  background: linear-gradient(120deg, #041c3a 0%, #082e52 48%, #087f6b 100%);
}


.xv-featured.xv-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(540px 280px at 84% 18%, rgba(52, 211, 153, .18), transparent 70%),
    radial-gradient(460px 300px at 8% 86%, rgba(245, 158, 11, .10), transparent 72%);
  animation: xvHeroGlow 9s ease-in-out infinite alternate;
}

.xv-hero-slide .xv-featured-bg {
  transform: scale(1.045);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter 1.1s ease;
  filter: saturate(.94) contrast(1.04);
}
.xv-hero-slide.is-active .xv-featured-bg {
  animation: xvHeroKenBurns 8s ease-out both;
}
.xv-hero-slide .xv-featured-inner { position: relative; z-index: 2; }

/* Stagger the content so each slide arrives with a clear visual hierarchy. */
.xv-hero-slide.is-active .xv-featured-inner > * {
  opacity: 0;
  animation: xvHeroReveal .65s cubic-bezier(.22,.8,.25,1) forwards;
}
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(1) { animation-delay: .08s; }
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(2) { animation-delay: .16s; }
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(3) { animation-delay: .24s; }
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(4) { animation-delay: .32s; }
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(5) { animation-delay: .40s; }
.xv-hero-slide.is-active .xv-featured-inner > *:nth-child(6) { animation-delay: .48s; }

.xv-hero-status { box-shadow: 0 8px 22px rgba(0,0,0,.16); }

/* Glass navigation controls: readable over any banner, with a clear gold
   hover state and a keyboard focus ring that stays visible on dark photos. */
.xv-hero-arrow {
  width: 48px;
  height: 48px;
  background: rgba(4, 28, 58, .62);
  border: 1px solid rgba(255, 255, 255, .34);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease,
              border-color .2s ease, color .2s ease;
}
.xv-hero-arrow:hover {
  background: #f5b301;
  border-color: #f5b301;
  color: #06243f;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}
.xv-hero-arrow:active { transform: translateY(-50%) scale(.96); }
.xv-hero-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(245, 179, 1, .35), 0 10px 28px rgba(0, 0, 0, .28);
}
.xv-hero-arrow svg { width: 20px; height: 20px; display: block; }
.xv-hero-arrow--prev { left: clamp(14px, 2vw, 24px); }
.xv-hero-arrow--next { right: clamp(14px, 2vw, 24px); }
.xv-hero-dots { padding: 0; gap: 6px; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; }
.xv-hero-dot,
.xv-hero-dot.is-active { width: 5px !important; height: 5px !important; min-height: 5px !important; padding: 0 !important; line-height: 0 !important; border-radius: 0; background: rgba(255,255,255,.62); box-shadow: none; }
.xv-hero-dot.is-active { background: #f5b301; }

/* Compact quick-action tiles: keep the four navigation choices useful
   without letting them dominate the top of the homepage. */
.hp-sq .xv-stats-inner { gap: 12px; }
.hp-sq .xv-stat--link { height: 72px; min-height: 72px; padding: 10px 13px; gap: 10px; }
.hp-sq .xv-stat--link .xv-stat-icon { width: 34px; height: 34px; flex-basis: 34px; }
.hp-sq .xv-stat--link .xv-stat-icon svg { width: 18px; height: 18px; }
.hp-sq .xv-stat-title { font-size: 14px; line-height: 1.2; }
.hp-sq .xv-stat-sub { font-size: 11px; margin-top: 2px; }
.hp-sq .xv-stat-arrow { width: 24px; height: 24px; }

@keyframes xvHeroReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes xvHeroKenBurns {
  from { transform: scale(1.045); }
  to { transform: scale(1.10); }
}
@keyframes xvHeroGlow {
  from { opacity: .72; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 860px) {
  .xv-hero-slide.is-active .xv-featured-inner > * { animation-duration: .55s; }
  .xv-hero-slide .xv-featured-bg { transform: scale(1.03); }
}
@media (max-width: 640px) {
  .xv-featured.xv-hero::after { background: radial-gradient(360px 240px at 80% 10%, rgba(52,211,153,.16), transparent 70%); }
  .xv-hero-arrow { width: 40px; height: 40px; }
  .xv-hero-arrow svg { width: 18px; height: 18px; }
  .xv-hero-dots { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .xv-featured.xv-hero::after,
  .xv-hero-slide.is-active .xv-featured-bg,
  .xv-hero-slide.is-active .xv-featured-inner > * { animation: none; opacity: 1; transform: none; }
  .xv-hero-slide .xv-featured-bg { transition: none; }
}

/* ============================================================
   HOMEPAGE FIRST-SCREEN COMPOSITION
   The hero is sized from the viewport, the real navbar height and the
   shortcut-card strip. The cards overlap the hero by a known amount, so the
   formula below leaves the same small gap under the cards on every device.
   ============================================================ */
body.ev-page {
  --xv-home-nav-h: 81px;
  --xv-home-cards-h: 72px;
  --xv-home-overlap: 52px;
  --xv-home-gap: clamp(12px, 2.2svh, 24px);
}

.xv-featured.xv-hero {
  height: calc(100vh - var(--xv-home-nav-h) - var(--xv-home-cards-h) + var(--xv-home-overlap) - var(--xv-home-gap));
  height: calc(100svh - var(--xv-home-nav-h) - var(--xv-home-cards-h) + var(--xv-home-overlap) - var(--xv-home-gap));
  min-height: 0;
}

.xv-hero-slides,
.xv-hero-slide { height: 100%; min-height: 0; }

.xv-hero-slide .xv-featured-inner {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    clamp(18px, 3.5svh, 48px)
    clamp(18px, 3vw, 32px)
    calc(var(--xv-home-overlap) + clamp(14px, 2.2svh, 28px));
}

/* Keep the badge its natural width inside the new flex column. */
.xv-hero-slide .xv-hero-status { align-self: flex-start; }

/* Cards stay attached to the bottom of the hero on every screen. */
.xv-stats.hp-sq { margin-top: calc(-1 * var(--xv-home-overlap)); }

/* Four cards in one row on tablet/laptop widths, two rows on narrow screens.
   The compact card sizing keeps the strip height predictable so it remains
   visible in the first viewport. */
@media (max-width: 1180px) {
  body.ev-page { --xv-home-nav-h: 69px; }
}
@media (max-width: 1024px) {
  body.ev-page { --xv-home-cards-h: 64px; }
  .hp-sq .xv-stats-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-sq .xv-stat--link {
    height: 64px;
    min-height: 64px;
    padding: 8px 10px;
    gap: 8px;
    overflow: hidden;
  }
  .hp-sq .xv-stat--link .xv-stat-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .hp-sq .xv-stat--link .xv-stat-icon svg { width: 14px; height: 14px; }
  .hp-sq .xv-stat-title {
    font-size: 11.5px;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hp-sq .xv-stat-sub {
    font-size: 9.5px;
    line-height: 1.25;
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hp-sq .xv-stat-arrow { width: 16px; height: 16px; }
  .hp-sq .xv-stat-arrow svg { width: 14px; height: 14px; }
}
@media (max-width: 720px) {
  body.ev-page {
    --xv-home-nav-h: 65px;
    --xv-home-cards-h: 140px;
  }
  .hp-sq .xv-stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.ev-page { --xv-home-overlap: 36px; }
}
@media (max-width: 420px) {
  body.ev-page { --xv-home-nav-h: 61px; }
  .xv-featured-actions { gap: 8px; }
  .xv-featured-actions .xv-btn { flex: 1 1 0; min-width: 0; padding: 10px 10px; font-size: 12px; }
  .xv-featured-title { font-size: clamp(21px, 6.8vw, 26px); }
  .xv-featured-desc { font-size: 12.5px; line-height: 1.5; -webkit-line-clamp: 2; }
  .xv-featured-meta { gap: 6px 10px; margin-bottom: 16px; }
}
@media (max-width: 360px) {
  .hp-sq .xv-stat--link { padding: 7px 8px; gap: 6px; }
  .hp-sq .xv-stat--link .xv-stat-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .hp-sq .xv-stat--link .xv-stat-icon svg { width: 12px; height: 12px; }
  .hp-sq .xv-stat-arrow { display: none; }
  .hp-sq .xv-stat-title { font-size: 10.5px; }
  .hp-sq .xv-stat-sub { font-size: 9px; }
}

/* Short viewports (landscape phones and the reference crop): compact the copy
   and keep the four shortcut cards in a single row so the complete first
   screen composition still fits without clipping. */
@media (max-height: 560px) {
  body.ev-page {
    --xv-home-overlap: 32px;
    --xv-home-gap: 8px;
  }
  .xv-hero-slide .xv-featured-inner {
    padding-top: 10px;
    padding-bottom: calc(var(--xv-home-overlap) + 8px);
  }
  .xv-hero-status { margin-bottom: 4px; padding: 4px 8px; font-size: 9px; }
  .xv-featured-title {
    font-size: clamp(15px, 2vw, 22px);
    line-height: 1.06;
    margin-bottom: 4px;
  }
  .xv-featured-desc {
    font-size: clamp(9px, 1.15vw, 11px);
    line-height: 1.35;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  .xv-featured-meta { gap: 4px 9px; margin-bottom: 6px; }
  .xv-featured-meta > span { font-size: 9.5px; }
  .xv-featured-actions { gap: 6px; }
  .xv-featured-actions .xv-btn { padding: 6px 10px; font-size: 10px; min-height: 0; }
}
@media (max-height: 560px) and (min-width: 560px) and (max-width: 720px) {
  body.ev-page { --xv-home-cards-h: 64px; }
  .hp-sq .xv-stats-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-sq .xv-stat-arrow { display: none; }
}

/* Keep the carousel dots above the overlapping card strip. */
.xv-featured.xv-hero .xv-hero-dots { bottom: calc(var(--xv-home-overlap) + 14px); }

/* ============================================================
   LARGE-DESKTOP HERO TYPOGRAPHY
   Above the tablet breakpoint, let the content use more of the tall hero:
   larger title/description/meta and more substantial action buttons. This
   block is intentionally desktop-only so tablet and mobile layouts are
   unchanged.
   ============================================================ */
@media (min-width: 1181px) {
  .xv-featured.xv-hero .xv-hero-status {
    font-size: clamp(12px, .7vw, 13.5px);
    padding: 8px 14px;
    margin-bottom: clamp(18px, 1.4vw, 24px);
  }
  .xv-featured.xv-hero .xv-featured-title {
    font-size: clamp(46px, 3.8vw, 70px);
    line-height: 1.06;
    letter-spacing: -1.4px;
    max-width: clamp(740px, 58vw, 920px);
    margin-bottom: clamp(16px, 1.2vw, 22px);
  }
  .xv-featured.xv-hero .xv-featured-desc {
    font-size: clamp(17px, 1.25vw, 21px);
    line-height: 1.72;
    max-width: 780px;
    margin-bottom: clamp(20px, 1.6vw, 28px);
  }
  .xv-featured.xv-hero .xv-featured-meta {
    gap: clamp(10px, 1vw, 18px) clamp(18px, 1.6vw, 30px);
    margin-bottom: clamp(26px, 1.8vw, 34px);
  }
  .xv-featured.xv-hero .xv-featured-meta > span {
    font-size: clamp(14px, .85vw, 16.5px);
    gap: 8px;
  }
  .xv-featured.xv-hero .xv-featured-meta svg {
    width: clamp(14px, .9vw, 17px);
    height: clamp(14px, .9vw, 17px);
  }
  .xv-featured.xv-hero .xv-featured-actions { gap: clamp(12px, 1vw, 18px); }
  .xv-featured.xv-hero .xv-featured-actions .xv-btn {
    min-height: clamp(50px, 3.4vw, 58px);
    padding: clamp(14px, 1vw, 17px) clamp(26px, 1.8vw, 36px);
    font-size: clamp(15px, .95vw, 17px);
  }
  .xv-featured.xv-hero .xv-featured-actions .xv-btn svg {
    width: clamp(16px, 1vw, 19px);
    height: clamp(16px, 1vw, 19px);
  }
}
