/* ==========================================================================
   Black Cauldron Cup — Demo Site Styles
   ========================================================================== */

:root {
  /* Black Cauldron Cup — derived from the official logo:
     near-black cauldron body, teal drip, purple Maleficent horns,
     yellow-green text outline glow, crisp white fills */
  --color-bg: #080810;
  --color-bg-alt: #0c0b18;
  --color-surface: #111124;
  --color-surface-alt: #171630;
  --color-border: #2a2450;
  --color-text: #eeeaf8;
  --color-text-muted: #7a74a0;

  /* Logo teal — the dripping liquid */
  --color-primary: #2ee8c8;
  --color-primary-dark: #1ab8a0;

  /* Logo yellow-green — text outline glow */
  --color-accent: #d4f03a;
  --color-accent-2: #eeff6e;
  /* brighter pop */

  /* Logo purple — Maleficent horns */
  --color-purple: #6b3fa0;
  --color-purple-light: #9b6dcc;

  /* Teal alias used for links / highlights */
  --color-eerie: #2ee8c8;
  --color-teal: #1ab8a0;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.80);
  --max-width: 1100px;
  --font-heading: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  background:
    radial-gradient(ellipse 700px 400px at 30% 60%, rgba(107, 63, 160, 0.12), transparent 55%),
    radial-gradient(ellipse 600px 350px at 70% 20%, rgba(46, 232, 200, 0.06), transparent 50%),
    var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

a {
  color: var(--color-eerie);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-2);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--color-border);
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.section-subheading {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* ---------- Placeholder image blocks (no real assets needed) ---------- */
.placeholder-img {
  background: repeating-linear-gradient(135deg,
      var(--color-surface-alt),
      var(--color-surface-alt) 10px,
      var(--color-surface) 10px,
      var(--color-surface) 20px);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
  width: 100%;
}

.placeholder-img.logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 0.55rem;
  padding: 2px;
}

/* Real logo images */
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.placeholder-img.hero-img {
  aspect-ratio: 16 / 7;
}

.placeholder-img.avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.placeholder-img.sponsor-img {
  aspect-ratio: 3 / 2;
}

.placeholder-img.icon-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  font-size: 0.5rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 3, 8, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 1.2rem;
  padding: 6px 10px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-primary);
  color: #080810;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #080810;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
}

.btn-accent {
  background: var(--color-accent);
  color: #04030a;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Hero (full-bleed gradient + texture) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  overflow: hidden;

  /* Base gradient — deep purple-black to near-black */
  background:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(46, 232, 200, 0.035) 3px,
      rgba(46, 232, 200, 0.035) 4px),
    linear-gradient(160deg,
      #0a0820 0%,
      #130e30 25%,
      #1a0f3a 45%,
      #0d1a28 70%,
      #060c18 100%);
}

/* Radial glow in the centre — teal cauldron light */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 50% 55%,
      rgba(46, 232, 200, 0.12) 0%,
      rgba(107, 63, 160, 0.15) 45%,
      transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Dark gradient overlay for legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(8, 8, 16, 0.45) 0%,
      rgba(8, 8, 16, 0.10) 40%,
      rgba(8, 8, 16, 0.55) 100%);
  z-index: 1;
}

/* Text / content layer */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  width: 100%;
  padding: 100px 32px 64px;
  /* top clears the sticky nav with breathing room */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: min(560px, 85vw);
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 32px rgba(46, 232, 200, 0.40)) drop-shadow(0 0 12px rgba(107, 63, 160, 0.50));
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  background: linear-gradient(120deg, var(--color-accent-2) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 12px;
  text-shadow: none;
  filter: drop-shadow(0 0 24px rgba(46, 232, 200, 0.50));
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.65);
  paint-order: stroke fill;
}

.hero-eyebrow {
  color: var(--color-accent);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.hero p.tagline {
  max-width: 580px;
  margin: 0 auto 12px;
  color: rgba(238, 234, 248, 0.80);
  font-size: 1.12rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.hero .meta {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0;
  text-shadow: 0 0 12px rgba(46, 232, 200, 0.5);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* ---------- Notice banner ---------- */
.notice {
  background: rgba(133, 198, 32, 0.09);
  border: 1px solid var(--color-primary);
  color: var(--color-eerie);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  text-align: center;
  font-size: 0.9rem;
  max-width: 720px;
  margin: 0 auto 36px;
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.card {
  background: linear-gradient(160deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(133, 198, 32, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 16px rgba(133, 198, 32, 0.08);
}

.event-card .prize {
  display: inline-block;
  background: rgba(133, 198, 32, 0.15);
  color: var(--color-eerie);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 10px 0 16px;
}

.event-card .event-time {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.side-event-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.side-event-card .price {
  color: var(--color-accent);
  font-weight: 700;
  float: right;
}

.side-event-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.person-card {
  text-align: center;
}

.person-card h4 {
  margin-bottom: 2px;
}

.person-card .role {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.sponsor-card {
  text-align: center;
}

.sponsor-card .sponsor-name {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.vendor-option {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.vendor-option .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 6px 0 14px;
}

.vendor-option ul {
  text-align: left;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
  padding-left: 18px;
  flex-grow: 1;
}

/* ---------- Venue ---------- */

/* Outer row: left = venue info+map, right = hotel card */
.venue-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .venue-location {
    grid-template-columns: 1fr;
  }
}

/* Left column: stacks venue text above map */
.venue-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.venue-info h3 {
  margin-top: 0;
}

.venue-address {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.hotel-name {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0 0 14px;
}

.hotel-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.hotel-block h3 {
  margin-top: 0;
}

.hotel-block dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 0.88rem;
}

.hotel-block dt {
  color: var(--color-text-muted);
}

.hotel-block dd {
  margin: 0;
}


/* ---------- Featured Artist ---------- */
.artist-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .artist-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.artist-photo-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-border), 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(107, 63, 160, 0.25);
}

.artist-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.4s ease;
}

.artist-photo-wrap:hover .artist-photo {
  transform: scale(1.03);
}

.artist-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.artist-name {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--color-text);
  margin: 0 0 16px;
}

.artist-bio {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0 0 28px;
  max-width: 580px;
}

.artist-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Card Gallery Popover ---------- */

/* Popover container: fixed size, flex column, clips overflow so ONLY strip scrolls */
.popover-box--gallery {
  width: 85vw;
  max-width: 85vw;
  height: 85vh;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: linear-gradient(160deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
}

/* Minimal header row with title + close button */
.card-gallery__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* Reposition close button for the no-padding header */
.popover-box--gallery .popover-close {
  top: 12px;
  right: 16px;
}

/* Two-pane body: viewer left, thumbnail grid right */
.card-gallery {
  flex: 1;
  min-height: 0;
  /* critical flex fix */
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
}

/* Left column: stacks viewer (fills space) and footer (fixed) */
.card-gallery__left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* ≥1100px: wider thumbnail panel → 3 columns */
@media (min-width: 1100px) {
  .card-gallery {
    grid-template-columns: 1fr 340px;
  }

  .card-gallery__strip {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Mobile: stack, thumbnails scroll horizontally */
@media (max-width: 700px) {
  .popover-box--gallery {
    width: 96vw;
    max-width: 96vw;
    height: 90vh;
    max-height: 90vh;
  }

  .card-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 130px;
  }

  .card-gallery__strip {
    grid-template-columns: repeat(6, 1fr) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-top: 1px solid var(--color-border) !important;
    border-left: none !important;
  }
}

/* LEFT: card viewer — transparent, no border, card fills it */
.card-gallery__viewer {
  flex: 1;
  /* fills all left-column space above the footer */
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  padding: 20px 16px 16px 20px;
}

.card-gallery__main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  /* opacity controlled by JS — no CSS transition here to avoid blink */
  opacity: 0;
  display: block;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
}

.card-gallery__main-img.loaded {
  opacity: 1;
}

/* RIGHT: scrollable thumbnail grid — only element that scrolls */
.card-gallery__strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 12px 10px 12px 8px;
  border-left: 1px solid var(--color-border);
  background: rgba(8, 8, 16, 0.3);

  scrollbar-width: thin;
  scrollbar-color: rgba(46, 232, 200, 0.35) transparent;
}

.card-gallery__strip::-webkit-scrollbar {
  width: 4px;
}

.card-gallery__strip::-webkit-scrollbar-track {
  background: transparent;
}

.card-gallery__strip::-webkit-scrollbar-thumb {
  background: rgba(46, 232, 200, 0.35);
  border-radius: 999px;
}

.card-gallery__strip::-webkit-scrollbar-thumb:hover {
  background: rgba(46, 232, 200, 0.65);
}

/* Individual thumbnail */
.gallery-thumb {
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  background: var(--color-surface);
}

.gallery-thumb:hover {
  border-color: rgba(46, 232, 200, 0.7);
  box-shadow: 0 0 0 1px rgba(46, 232, 200, 0.35), 0 4px 16px rgba(0, 0, 0, 0.6);
  transform: scale(1.03);
  z-index: 2;
  position: relative;
}

.gallery-thumb.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(46, 232, 200, 0.45), 0 4px 14px rgba(0, 0, 0, 0.6);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  /* show whole card, no crop */
  background: #0a0818;
  /* dark fill behind card corners */
  display: block;
}

.gallery-thumb:hover img {
  transform: none;
}

.gallery-thumb span {
  display: none;
}

/* BOTTOM: full-width card name footer */
.card-gallery__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(8, 8, 16, 0.6);
  border-top: 1px solid var(--color-border);
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

.card-gallery__footer.has-card {
  color: var(--color-primary);
  text-shadow: 0 0 24px rgba(46, 232, 200, 0.45);
}

/* ---------- Contact ---------- */
.contact-box {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-email {
  display: inline-block;
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid rgba(46, 232, 200, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.contact-email:hover {
  color: var(--color-accent-2);
  border-color: var(--color-accent);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(46, 232, 200, 0.55);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.social-links a {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--color-text);
  font-size: 0.85rem;
}

.social-links a:hover {
  border-color: var(--color-eerie);
  color: var(--color-eerie);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 32px 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--color-text-muted);
}



/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-eerie);
  color: var(--color-text);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Page header (FAQ / Vendor pages) ---------- */
.page-header {
  padding: 56px 0 24px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
}

.faq-item h3 {
  color: var(--color-eerie);
  font-size: 1.05rem;
}

.faq-item p {
  color: var(--color-text-muted);
  margin: 0;
}

.faq-item a {
  color: var(--color-accent);
}

.back-link {
  display: inline-block;
  margin: 30px 0 10px;
}

.loading-msg {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    display: none;
    gap: 14px;
  }

  .nav-links.open {
    display: flex;
  }
}

/* ---------- Event card action row ---------- */
.event-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.event-card-actions .btn {
  flex: 1;
}

/* Make event cards flex-column so actions always sit at the bottom */
.event-card {
  display: flex;
  flex-direction: column;
}

.event-card p {
  flex-grow: 1;
}

/* ---------- Event Detail Popovers ---------- */
.popover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 16, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.popover-overlay.open {
  display: flex;
}

.popover-box {
  background: linear-gradient(160deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(46, 232, 200, 0.08);
  animation: popoverIn 0.22s ease;
}

@keyframes popoverIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-box h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--color-primary);
  padding-right: 28px;
  /* room for close button */
}

.popover-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.popover-close:hover {
  color: var(--color-text);
}

/* Key / Value info grid */
.popover-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 24px;
  font-size: 0.92rem;
}

.popover-info dt {
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.popover-info dd {
  margin: 0;
  color: var(--color-text);
}

.popover-info a {
  color: var(--color-primary);
}

/* Prize structure heading */
.popover-prize-heading {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin: 0 0 12px;
}

/* Outer prize list */
.popover-prizes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.popover-prizes>li>strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 4px;
}

/* Inner bullet list */
.popover-prizes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--color-text-muted);
}

.popover-prizes ul li {
  margin-bottom: 2px;
}

@media (max-width: 768px) {

  /* --- Tournament grid: one card per row on phones/small tablets --- */
  .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* ODE card: reset the 2-col span so it fits in the single-column grid */
  .ode-card {
    grid-column: span 1 !important;
  }

  /* --- Popover: prevent horizontal scrolling, bottom-sheet style --- */
  .popover-overlay {
    padding: 12px;
    /*align-items: flex-end;*/
  }

  .popover-box {
    padding: 24px 18px;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  /* Gallery popover stays centered, not bottom-sheet */
  .popover-box--gallery {
    align-self: center;
    border-radius: var(--radius-lg);
    max-height: 90vh;
    padding: 20px 14px 16px;
  }

  /* Allow dt labels to wrap so long text doesn't cause overflow */
  .popover-info dt {
    white-space: normal;
  }

  .event-card-actions {
    flex-direction: column;
  }
}

/* ---------- Popover section divider (Day 1 → Day 2) ---------- */
.popover-section-divider {
  grid-column: 1 / -1;
  /* span both dt and dd columns */
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
}

.popover-section-divider::before,
.popover-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      var(--color-primary) 30%,
      var(--color-primary) 70%,
      transparent);
  opacity: 0.45;
}

.popover-section-divider span {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
  opacity: 0.85;
}

/* ---------- On Demand Events card ---------- */
.ode-card {
  /* Span 2 columns in the 3-col tournament grid */
  grid-column: span 1;

  /* Override standard card border with a dashed teal border */
  border: 2px dashed rgba(46, 232, 200, 0.45) !important;
  background: linear-gradient(160deg,
      rgba(46, 232, 200, 0.04) 0%,
      var(--color-surface) 100%) !important;
  padding: 28px 32px;
}

.ode-header {
  margin-bottom: 20px;
}

.ode-header h3 {
  color: var(--color-primary);
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.ode-subtitle {
  color: var(--color-primary);
  opacity: 0.65;
  font-size: 0.9rem;
  margin: 0;
  font-style: italic;
}

/* Row list */
.ode-event-list {
  display: flex;
  flex-direction: column;
}

.ode-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.ode-event-row:last-child {
  border-bottom: 1px solid var(--color-border);
}

.ode-event-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ode-event-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

.ode-event-detail {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.ode-event-price {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.ode-footer {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}