/* =========================================================
   Futsal Hero + Banner (shared styles)
   Use for both the full page and the homepage banner injection
   ========================================================= */

/* ---- Layout fixes so the banner never overlaps following sections ---- */
#event-banner {
  display: block;
  position: relative;
  z-index: 0;
  margin-top: clamp(16px, 3vw, 32px);
  margin-bottom: clamp(28px, 4vw, 64px); /* pushes next section down */
}

/* Also add a small top margin for whatever follows the hero inside the banner */
#event-banner + * {
  margin-top: clamp(16px, 3vw, 40px);
}

/* ---- Hero base ---- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* Height */
  min-height: clamp(520px, 70vh, 760px);

  /* Fallback background (if no image) */
  background: #0b0e14;

  /* Important: keep effects inside the section only */
  overflow: hidden;
  isolation: isolate; /* prevents backdrop-filter from sampling outside */
}

/* Compact variant (good for homepage banner) */
.hero.hero--compact {
  min-height: clamp(360px, 50vh, 560px);
}

/* Futsal hero with background image (works on page and banner) */
#futsal-hero {
  background: url("/assets/images/events/aviation-futsal-tournament/intro.jpg")
    center / cover no-repeat;
  perspective: 1000px; /* harmless without 3D anim; keeps depth if needed later */
}

/* Overlay on top of the background image */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 120% at 50% 50%,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.78) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Content sits above the overlay */
#futsal-hero .container {
  position: relative;
  z-index: 2;
}

/* ---- Title (simple; no 3D animation) ---- */
.fx-3d-tilt {
  /* keep the class to avoid touching HTML; just style simply */
  animation: none !important;
  text-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

/* ---- "Registration opens On" & date ---- */
#futsal-hero .lead {
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 700;
}

#futsal-hero .text-primary{
  color: rgb(93, 161, 216) !important; /* light blue */
}

#futsal-hero p.small {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 1.25rem;
}
#futsal-hero #fc-target-text.time-pill {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  padding: 0.45rem 0.75rem;
}
/* Make Nepal time clearly visible (override Bootstrap’s secondary) */
#futsal-hero p.small .text-secondary {
  color: #cfe2ff !important; /* light blue */
  opacity: 1 !important;
}

/* ---- Countdown blocks (blue, rounded, responsive) ---- */
.futsal-cc {
  /* prevent tiny gaps on some grids */
  margin-left: 0;
  margin-right: 0;
}

.futsal-cc .time-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  /* size/shape */
  aspect-ratio: 1 / 1;         /* perfect squares */
  border-radius: 1rem;         /* slightly more rounded for premium look */
  min-width: 130px;            /* mobile-friendly */

  /* visual */
  background: rgba(var(--bs-primary-rgb, 13,110,253), 0.22);
  border: 1px solid rgba(var(--bs-primary-rgb, 13,110,253), 0.45);
  color: #fff;

  /* effects */
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);

  padding: 1.25rem;
  height: 100%;
}

.futsal-cc .time-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  font-weight: 800;
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  line-height: 1;
}

.futsal-cc .label {
  opacity: 0.95;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 768px) {
  .futsal-cc .time-box {
    min-width: 180px;
  }
}

/* ---- Highlight the exact opening time pill ---- */
.time-pill {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  background: rgba(var(--bs-primary-rgb, 13,110,253), 0.18); /* primary tint */
  border: 1px solid rgba(var(--bs-primary-rgb, 13,110,253), 0.45);
}

/* ---- OPEN banner (bigger, primary, translucent) ---- */
#futsal-countdown-open-banner {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  padding: 1rem 1.25rem;
  color: #fff;
  background: rgba(var(--bs-primary-rgb, 13,110,253), 0.25);
  border: 1px solid rgba(var(--bs-primary-rgb, 13,110,253), 0.45);
  backdrop-filter: blur(6px);
  margin-top: 1.25rem;
}

#futsal-countdown-open-banner .btn {
  font-weight: 600;
  backdrop-filter: blur(2px);
}

/* ---- Extra safety: make any hero section push content below it ---- */
.hero + * {
  margin-top: clamp(16px, 3vw, 40px);
}


/* ===== Celebration overlay (optimized, multi-line) ===== */
.ga-celebrate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  contain: paint;                 /* isolate repaints */
}

/* Container animates (big → shrink → fade) using GPU transforms */
.ga-celebrate-message {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate3d(-50%, 0, 0) scale(1.6);
  will-change: transform, opacity;
  color: #fff;
  text-align: center;
  opacity: 0;
  animation: ga-shrink-hold-fade 3000ms cubic-bezier(.22,.61,.36,1) both;
  text-shadow: 0 6px 14px rgba(0,0,0,.35);
}

/* Title + subtitle */
.ga-celebrate-title {
  font-weight: 900;
  letter-spacing: .02em;
  font-size: clamp(1.35rem, 4.8vw, 2.2rem);
  line-height: 1.15;
}
.ga-celebrate-subtitle {
  margin-top: .35rem;
  font-weight: 800;
  font-size: clamp(1rem, 3.8vw, 1.6rem);
  line-height: 1.1;
  opacity: .98;
}

/* Keyframes */
@keyframes ga-shrink-hold-fade {
  /* big → small quickly */
  0%   { opacity: 0; transform: translate3d(-50%, 0, 0) scale(2); }
  10%  {opacity: 0; transform: translate3d(-50%, 0, 0) scale(2); }
  40%  { opacity: 1; transform: translate3d(-50%, 0, 0) scale(0.95); }
  80%  { opacity: 1; transform: translate3d(-50%, 0, 0) scale(0.95); }
  100% { opacity: 0; transform: translate3d(-50%, 0, 0) scale(0.85); }
}


/* Confetti pieces (GPU) */
.ga-confetto {
  position: absolute;
  top: -10vh;
  left: var(--x, 50vw);
  width: var(--w, 8px);
  height: var(--h, 24px);
  background: var(--c, #fff);
  opacity: .95;
  border-radius: 2px;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0) rotate(var(--r, 0deg));
  animation: ga-confetti-fall var(--dur, 3s) linear var(--delay, 0s) both;
}

@keyframes ga-confetti-fall {
  to {
    transform: translate3d(0, 120vh, 0) rotate(calc(var(--r, 0deg) + 360deg));
    opacity: .98;
  }
}


/* Fade-in for the OPEN banner */
.ga-fade-in {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  will-change: transform, opacity;
  animation: ga-banner-fade 720ms cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes ga-banner-fade {
  0%   { opacity: 0; transform: translate3d(0, 12px, 0); }
  60%  { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ga-fade-in { animation: none; opacity: 1; transform: none; }
}




/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ga-confetto { animation: none; }
  .ga-celebrate-message { animation-duration: 900ms; }
}



