/* ============================================================
   EVESTIVAL WEB — SHARED CSS
   Design system lifted from the reference index.html and
   extended for all pages.
============================================================ */

/* ── Root variables (dark default) ──────────────────────── */
:root {
  --bg-base:        #09090b;
  --bg-surface:     #111113;
  --bg-card:        #18181b;
  --bg-card-hover:  #1f1f23;
  --accent-gold:    #f0a500;
  --accent-ember:   #e8522b;
  --accent-glow:    rgba(240,165,0,0.18);
  --text-primary:   #f4f0e8;
  --text-secondary: #9a9a9a;
  --text-muted:     #555;
  --border:         rgba(255,255,255,0.07);
  --border-hover:   rgba(240,165,0,0.35);
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      24px;
  --nav-h:          72px;
  --transition:     0.3s cubic-bezier(0.4,0,0.2,1);
  --success:        #6adf94;
  --error:          #f87171;
}

/* ── Light theme ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:        #faf9f7;
  --bg-surface:     #f2f0ec;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f7f5f1;
  --accent-gold:    #c87d00;
  --accent-ember:   #d4440e;
  --accent-glow:    rgba(200,125,0,0.14);
  --text-primary:   #1a1710;
  --text-secondary: #6b6660;
  --text-muted:     #aaa49e;
  --border:         rgba(0,0,0,0.09);
  --border-hover:   rgba(200,125,0,0.4);
}

/* Global theme transition */
*, *::before, *::after {
  transition:
    background-color 0.4s cubic-bezier(0.4,0,0.2,1),
    border-color     0.4s cubic-bezier(0.4,0,0.2,1),
    color            0.4s cubic-bezier(0.4,0,0.2,1),
    box-shadow       0.4s cubic-bezier(0.4,0,0.2,1);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img  { display: block; width: 100%; object-fit: cover; }
a    { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* Grain noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 9999;
}

/* ── Layout utilities ─────────────────────────────────────── */
.container   { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.section     { padding: 90px 0; }
.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; margin-bottom: 48px;
}
.section-label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-gold);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700; color: var(--text-primary);
  line-height: 1.2; margin-top: 8px;
}
.link-all {
  font-size: 0.84rem; color: var(--text-secondary);
  font-weight: 500; display: flex; align-items: center; gap: 6px;
  transition: color var(--transition), gap var(--transition);
}
.link-all:hover { color: var(--accent-gold); gap: 10px; }

/* ── Pill tags ────────────────────────────────────────────── */
.pill-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.70rem; font-weight: 600; letter-spacing: 0.04em;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; background: var(--accent-gold);
  color: #0a0a0a; font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.02em; border-radius: var(--radius-sm);
  border: none; transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: #ffc72c; transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(240,165,0,0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; background: transparent;
  color: var(--text-primary); font-size: 0.86rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.btn-outline:hover {
  border-color: var(--border-hover); background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}
[data-theme="light"] .btn-outline { color: var(--text-primary); border-color: rgba(0,0,0,0.18); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; background: rgba(248,113,113,0.15);
  color: var(--error); font-size: 0.84rem; font-weight: 500;
  border: 1px solid rgba(248,113,113,0.25); border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-danger:hover { background: rgba(248,113,113,0.25); }

/* ── Header / Nav ─────────────────────────────────────────── */
#header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 1200;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
  /* NOTE: do NOT add transform here — .nav-drawer is a position:fixed child of
     #header. Any transform on a parent overrides the viewport as the fixed
     containing block, collapsing the drawer to 0px height. */
}
#header.scrolled {
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-color: var(--border);
}
[data-theme="light"] #header.scrolled { background: rgba(250,249,247,0.9); }

/* ── Hero-nav mode ────────────────────────────────────────────────────────────
   When the nav is transparent (sitting on top of the hero image), force white
   text regardless of light/dark theme. Once the user scrolls and .scrolled
   kicks in with the frosted-glass background, these rules are overridden and
   theme-aware colours take over again.                                        */
#header:not(.scrolled) .logo-text {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
/* Nav-link colour over the hero — gold (brand) instead of low-contrast white.
   Only the tab links flip to gold; logo, theme toggle and avatar/sign-in
   stay as-is (per design call). Drop-shadow keeps them legible on busy
   imagery. Once .scrolled kicks in the theme-aware text colour takes over. */
#header:not(.scrolled) .nav-links a {
  color: var(--accent-gold);
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
#header:not(.scrolled) .nav-links a:hover,
#header:not(.scrolled) .nav-links a.nav-link--active {
  color: var(--accent-gold);
  filter: brightness(1.15);
}
/* Hamburger bars white over hero */
#header:not(.scrolled) .nav-hamburger span { background: #fff; }

.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg,var(--accent-gold),var(--accent-ember));
  border-radius: 10px; display: grid; place-items: center; font-size: 16px;
}
.logo-text {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em;
}
.logo-text span { color: var(--accent-gold); }

.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.nav-links a {
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary); letter-spacing: 0.02em;
  transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--accent-gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.nav-link--active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.nav-link--active::after { width: 100%; }

.nav-cta { display: flex; gap: 12px; align-items: center; }

/* Theme toggle */
#theme-toggle {
  position: relative; display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50px; padding: 4px; cursor: pointer;
  width: 64px; height: 32px; flex-shrink: 0;
  transition: border-color 0.4s, background 0.4s !important;
}
#theme-toggle:hover { border-color: var(--border-hover); }
#theme-toggle .toggle-thumb {
  position: absolute; top: 4px; left: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-gold); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), background 0.4s !important;
  display: grid; place-items: center;
}
[data-theme="light"] #theme-toggle .toggle-thumb { transform: translateX(32px); }
#theme-toggle .t-icon { flex: 1; display: grid; place-items: center; font-size: 13px; line-height: 1; z-index: 1; pointer-events: none; transition: opacity 0.3s !important; }
#theme-toggle .icon-moon { opacity: 1; }
#theme-toggle .icon-sun  { opacity: 0.4; }
[data-theme="light"] #theme-toggle .icon-moon { opacity: 0.4; }
[data-theme="light"] #theme-toggle .icon-sun  { opacity: 1; }

/* Language switcher */
.nav-lang { position: relative; }
/* Mobile lang pill: hidden on desktop, shown on mobile via media query */
.nav-lang--mobile { display: none; }
.nav-lang-option--active { color: var(--accent-gold) !important; }
.nav-lang-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: border-color var(--transition), color var(--transition);
  letter-spacing: 0.04em;
}
.nav-lang-btn:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.lang-code { font-size: 0.72rem; }
.lang-arrow { font-size: 0.6rem; opacity: 0.7; }
.nav-lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  min-width: 140px; z-index: 200; overflow: hidden;
}
.nav-lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 14px; text-align: left;
  font-size: 0.84rem; color: var(--text-secondary);
  background: transparent; border: none; cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.nav-lang-option:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-drawer-lang { display: flex; gap: 8px; padding: 12px 0 4px; flex-wrap: wrap; }
.nav-drawer-lang-btn {
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 0.8rem; cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.nav-drawer-lang-btn.active,
.nav-drawer-lang-btn:hover { border-color: var(--accent-gold); color: var(--text-primary); }

/* Avatar dropdown */
.nav-user { position: relative; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,var(--accent-gold),var(--accent-ember));
  border: 2px solid var(--accent-gold); color: #0a0a0a;
  font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center; cursor: pointer;
  transition: box-shadow var(--transition);
}
.nav-avatar:hover { box-shadow: 0 0 0 3px rgba(240,165,0,0.3); }
.nav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); min-width: 180px;
  padding: 8px 0; box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  z-index: 100;
}
.nav-dropdown-name {
  padding: 8px 16px 10px; font-size: 0.8rem;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  margin-bottom: 4px; font-weight: 500; letter-spacing: 0.02em;
}
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 9px 16px; font-size: 0.86rem;
  color: var(--text-secondary); background: none; border: none;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown a:hover, .nav-dropdown button:hover {
  color: var(--text-primary); background: rgba(255,255,255,0.04);
}

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px; cursor: pointer;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-surface); z-index: 1100; padding: 28px;
  overflow-y: auto;
  /* Force onto its own GPU compositing layer so the Firefox compositor
     respects z-index ordering relative to the hero GPU animation layer.
     transform:translateZ(0) is more reliable than will-change alone. */
  transform: translateZ(0);
  will-change: transform;
}
.nav-drawer-links { list-style: none; }
.nav-drawer-links li { border-bottom: 1px solid var(--border); }
.nav-drawer-links a,
.nav-drawer-links button {
  display: block; width: 100%; text-align: left;
  padding: 16px 0; font-size: 1.1rem; font-weight: 500;
  color: var(--text-secondary); background: none; border: none;
  transition: color var(--transition);
}
.nav-drawer-links a:hover,
.nav-drawer-links button:hover { color: var(--text-primary); }

/* ── Page padding offset for fixed header ─────────────────── */
.page-body { padding-top: var(--nav-h); }

/* ── Event cards ──────────────────────────────────────────── */
.events-grid {
  display: grid;
  /* Default: responsive auto-fill — 4 cols on desktop, 2-3 on tablet, 1 on phone */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
/* Anchors that wrap each card render as blocks by default. List view
   overrides this with display:flex below. */
.events-grid > a {
  display: block;
}
/* Force exactly 4 columns on wide desktops (≥1200px) for the main events list */
@media (min-width: 1200px) {
  .events-grid:not(.list-view):not(.events-grid--3col) {
    grid-template-columns: repeat(4, 1fr);
  }
  /* "Most Visited" / "Trending" homepage rows are 3-col by design */
  .events-grid--3col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.event-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none; color: inherit; display: block;
}
.event-card:hover {
  transform: translateY(-5px); border-color: var(--border-hover);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(240,165,0,0.08);
}

.card-img-wrap { position: relative; height: 200px; overflow: hidden; }
.card-img-wrap img {
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1) !important;
}
.event-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(9,9,11,0.65) 0%, transparent 55%);
}
.card-badge {
  position: absolute; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 6px;
}
.card-save {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(9,9,11,0.6); backdrop-filter: blur(8px);
  border: 1px solid var(--border); display: grid; place-items: center;
  cursor: pointer; color: var(--text-secondary);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.card-save svg { width: 14px; height: 14px; }
.card-save:hover { background: rgba(240,165,0,0.2); border-color: var(--accent-gold); color: var(--accent-gold); }
.card-save--saved { color: var(--accent-gold); border-color: var(--accent-gold); background: rgba(240,165,0,0.15); }

.card-body   { padding: 18px 18px 20px; }
.card-date   { font-size: 0.72rem; font-weight: 600; color: var(--accent-gold); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.card-title  { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin-bottom: 8px; transition: color var(--transition); }
.event-card:hover .card-title { color: var(--accent-gold); }
.card-meta   { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; color: var(--text-secondary); flex-wrap: wrap; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.card-price  { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.free        { color: var(--success); }
.card-rating { font-size: 0.78rem; color: var(--accent-gold); font-weight: 600; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 50px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.badge--soon { background: rgba(240,165,0,0.2); color: var(--accent-gold); }
.badge--past { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ── Category cards ───────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cat-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  height: 180px; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; align-items: flex-end;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.cat-card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1) !important; }
.cat-card:hover .cat-card-bg { transform: scale(1.08); }
.cat-card-overlay { position: absolute; inset: 0; transition: opacity var(--transition); }
.cat-card:hover .cat-card-overlay { opacity: 0.85; }
.cat-card-body { position: relative; z-index: 2; padding: 16px; width: 100%; }
.cat-icon  { font-size: 1.5rem; margin-bottom: 4px; }
.cat-name  { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: #fff; display: block; }
.cat-count { font-size: 0.72rem; color: rgba(255,255,255,0.6); display: block; margin-top: 2px; }

/* ── Skeleton loaders ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skeleton-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.skeleton-img  { height: 200px; border-radius: 0; }
.skeleton-body { padding: 18px; }
.skeleton-line { height: 14px; margin-bottom: 10px; }

/* ── Toast ────────────────────────────────────────────────── */
.eve-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); padding: 12px 24px;
  border-radius: var(--radius-md); font-size: 0.88rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 9000; pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s !important;
  opacity: 0;
}
.eve-toast--visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.eve-toast--success { border-color: rgba(106,223,148,0.4); color: var(--success); }
.eve-toast--error   { border-color: rgba(248,113,113,0.4); color: var(--error); }

/* ── Footer ───────────────────────────────────────────────── */
#footer {
  background: var(--bg-base); border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 0.84rem; color: var(--text-muted); margin-top: 12px; max-width: 240px; line-height: 1.7; }
.footer-col h4 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.84rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; font-size: 0.76rem; color: var(--text-muted); }

/* ── Reveal animations ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Hero (index.html) ────────────────────────────────────── */
#hero {
  position: relative; height: 100vh; min-height: 640px;
  display: flex; align-items: flex-end; padding-bottom: 80px; overflow: visible;
  /* Firefox Android GPU-layer fix: the heroZoom animation forces .hero-bg onto
     a compositor layer. Without an explicit stacking context on #hero, Firefox
     paints that layer ABOVE position:fixed elements (z-index is ignored for
     compositor ordering when there is no containing stacking context with a
     z-index value).
     Solution: give #hero an explicit z-index (0) so it participates in the
     document stacking order below the nav (z-index:1200) and drawer (1100),
     AND force #hero itself onto a GPU layer (transform:translateZ(0)) so the
     compositor respects the layer ordering rather than painting late. */
  isolation: isolate;
  z-index: 0;
  transform: translateZ(0);
}
/* Clips background image + overlays without clipping the location dropdown */
.hero-bg-clip {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?w=1800&q=85&auto=format');
  background-size: cover; background-position: center 30%;
  transform: scale(1.04); animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { from{transform:scale(1.04)} to{transform:scale(1.10)} }
.hero-overlay-1 {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,rgba(9,9,11,0.3) 0%,rgba(9,9,11,0.1) 35%,rgba(9,9,11,0.85) 75%,rgba(9,9,11,1) 100%);
}
.hero-overlay-2 {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%,rgba(240,165,0,0.08) 0%,transparent 60%);
}
[data-theme="light"] .hero-overlay-1 {
  background: linear-gradient(to bottom,rgba(250,249,247,0.15) 0%,rgba(250,249,247,0.05) 30%,rgba(250,249,247,0.8) 72%,rgba(250,249,247,1) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 960px; animation: heroFadeUp 0.9s ease 0.2s both; }
@keyframes heroFadeUp { from{opacity:0;transform:translateY(32px)} to{opacity:1;transform:translateY(0)} }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; background: rgba(240,165,0,0.12);
  border: 1px solid rgba(240,165,0,0.3); border-radius: 50px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-gold); margin-bottom: 22px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-gold);
  animation: pulseDot 2s ease infinite;
}
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.6)} }
.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 5.5vw, 7rem);
  font-weight: 900; line-height: 1.06; letter-spacing: -0.02em;
  color: var(--text-primary); margin-bottom: 18px;
}
.hero-headline em { font-style: italic; color: var(--accent-gold); }
.hero-subheading {
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  color: rgba(244,240,232,0.65); font-weight: 300;
  max-width: 620px; margin-bottom: 36px; line-height: 1.7;
}
[data-theme="light"] .hero-headline { color: var(--text-primary); }
/* .hero-headline em keeps var(--accent-gold) in both themes — it's a brand accent, not body text */
[data-theme="light"] .hero-subheading  { color: rgba(26,23,16,0.65); }

/* Hero search */
.hero-search {
  display: flex; align-items: stretch;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md); backdrop-filter: blur(16px);
  overflow: hidden; max-width: 820px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-search:focus-within {
  border-color: rgba(240,165,0,0.5); box-shadow: 0 0 0 4px rgba(240,165,0,0.1);
}
[data-theme="light"] .hero-search { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.14); }
.search-field {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; flex: 1; border-right: 1px solid rgba(255,255,255,0.1);
}
[data-theme="light"] .search-field { border-right-color: rgba(0,0,0,0.1); }
.search-field:last-of-type { border-right: none; }
.search-field svg { flex-shrink: 0; color: var(--text-muted); }

/* ── Geo auto-expand info banner ────────────────────────────────────── */
.geo-expand-banner {
  display: none;
  background: rgba(240,165,0,0.07);
  border: 1px solid rgba(240,165,0,0.28);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--accent-gold);
  line-height: 1.45;
}
[data-theme="light"] .geo-expand-banner {
  background: rgba(240,165,0,0.1);
  border-color: rgba(180,120,0,0.35);
  color: #9a7200;
}

/* ── Near-me chip — inline GPS shortcut ─────────────────────────────── */
.near-me-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 20px;
  border: 1px solid rgba(240,165,0,0.35);
  background: rgba(240,165,0,0.07);
  color: var(--accent-gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.73rem; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.near-me-chip:hover { background: rgba(240,165,0,0.18); border-color: var(--accent-gold); }
[data-theme="light"] .near-me-chip { background: rgba(240,165,0,0.1); border-color: rgba(180,120,0,0.4); color: #a07800; }
[data-theme="light"] .near-me-chip:hover { background: rgba(240,165,0,0.22); }
.near-me-pin {
  flex-shrink: 0;
  animation: pin-pulse 2.2s ease-in-out infinite;
}
.near-me-pin .pin-hole { fill: #0d0d0d; }
[data-theme="light"] .near-me-pin .pin-hole { fill: #f4f4f4; }
@keyframes pin-pulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0px rgba(240,165,0,0)); }
  50%       { transform: scale(1.22); filter: drop-shadow(0 0 5px rgba(240,165,0,0.65)); }
}
/* Hero: hide chip once user has typed a value */
.search-field--loc { position: relative; }
#hero-location:not(:placeholder-shown) ~ .near-me-chip { display: none; }
/* Hide chip when geo mode is active on events page */
.location-picker--active .near-me-chip { display: none; }
/* Also hide when filter-location has a typed value */
#filter-location:not(:placeholder-shown) ~ .near-me-chip { display: none; }
.search-field input {
  background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; width: 100%; padding: 16px 0;
}
.search-field input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 0 26px; background: var(--accent-gold);
  color: #0a0a0a; font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; font-weight: 700; border: none; cursor: pointer;
  white-space: nowrap; transition: background var(--transition);
}
.search-btn:hover { background: #ffc72c; }

/* Hero search wrapper — needed so the autocomplete dropdown can escape
   the overflow:hidden on .hero-search while still positioning correctly */
.hero-search-wrap {
  position: relative;
  max-width: 820px;
}

/* City autocomplete dropdown — dark cinematic style to match the hero */
.hero-loc-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(10, 10, 14, 0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(24px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 300;
  max-height: 280px;
  overflow-y: auto;
}
.hero-loc-dropdown--open { display: block; }
.hero-loc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.hero-loc-item:last-child { border-bottom: none; }
.hero-loc-item:hover,
.hero-loc-item--focused { background: rgba(240,165,0,0.08); }
.hero-loc-icon { font-size: 0.9rem; flex-shrink: 0; width: 20px; text-align: center; }
.hero-loc-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hero-loc-name {
  font-size: 0.86rem; font-weight: 500;
  color: rgba(244,240,232,0.92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-loc-sub {
  font-size: 0.76rem;
  color: rgba(244,240,232,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Hero stats */
.hero-stats { display: flex; align-items: center; gap: 28px; margin-top: 24px; }
.hero-stat strong { display: block; font-size: 1.35rem; font-weight: 700; color: var(--text-primary); font-family: 'Playfair Display', serif; }
.hero-stat span   { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.04em; }
.stat-divider { width: 1px; height: 34px; background: var(--border); }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 24px; right: 28px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); z-index: 2;
}
.scroll-line { width: 40px; height: 1px; background: var(--text-muted); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%; background: var(--accent-gold);
  animation: scrollSlide 2s ease infinite;
}
@keyframes scrollSlide { to { left: 100%; } }

/* ── CTA section ──────────────────────────────────────────── */
#cta {
  position: relative; padding: 110px 0; overflow: hidden; text-align: center;
}
.cta-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1470229722913-7c0e2dbbafd3?w=1600&q=80&auto=format');
  background-size: cover; background-position: center 40%;
}
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,rgba(9,9,11,0.96) 0%,rgba(20,15,5,0.92) 50%,rgba(9,9,11,0.96) 100%);
}
[data-theme="light"] .cta-overlay {
  background: linear-gradient(135deg,rgba(250,249,247,0.96) 0%,rgba(245,235,215,0.93) 50%,rgba(250,249,247,0.96) 100%);
}
.cta-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px; border-radius: 50%;
  border: 1px solid rgba(240,165,0,0.08); animation: ringPulse 4s ease infinite;
}
@keyframes ringPulse { 0%,100%{transform:translate(-50%,-50%) scale(1);opacity:1} 50%{transform:translate(-50%,-50%) scale(1.03);opacity:0.5} }
.cta-content { position: relative; z-index: 2; }
.cta-badge {
  display: inline-block; padding: 6px 18px;
  background: rgba(240,165,0,0.1); border: 1px solid rgba(240,165,0,0.2);
  border-radius: 50px; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-gold); margin-bottom: 22px;
}
.cta-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900;
  color: var(--text-primary); line-height: 1.1;
  max-width: 640px; margin: 0 auto 14px;
}
.cta-sub {
  font-size: 0.96rem; color: rgba(244,240,232,0.55);
  max-width: 420px; margin: 0 auto 36px; font-weight: 300; line-height: 1.7;
}
[data-theme="light"] .cta-sub { color: rgba(26,23,16,0.55); }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; background: var(--accent-gold);
  color: #0a0a0a; font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 700;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-cta:hover { background: #ffc72c; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(240,165,0,0.4); }

/* ── Newsletter ───────────────────────────────────────────── */
#newsletter { padding: 64px 0; background: var(--bg-surface); border-top: 1px solid var(--border); }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.newsletter-copy h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.newsletter-copy p { font-size: 0.88rem; color: var(--text-secondary); font-weight: 300; }
.newsletter-form {
  display: flex; flex: 1; max-width: 420px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color var(--transition);
}
.newsletter-form:focus-within { border-color: rgba(240,165,0,0.4); }
.newsletter-form input {
  flex: 1; background: var(--bg-card); border: none; outline: none;
  padding: 13px 16px; color: var(--text-primary);
  font-family: 'DM Sans', sans-serif; font-size: 0.86rem;
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form button {
  padding: 0 22px; background: var(--accent-gold);
  color: #0a0a0a; font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem; font-weight: 700; border: none; cursor: pointer;
  white-space: nowrap; transition: background var(--transition);
}
.newsletter-form button:hover { background: #ffc72c; }

/* ── Beta Early Access Banner ─────────────────────────────── */
#beta-banner {
  padding: 48px 0;
  background: linear-gradient(135deg, #09090b 0%, #1a1208 100%);
  border-top: 1px solid rgba(240,165,0,0.2);
  border-bottom: 1px solid rgba(240,165,0,0.2);
}
.beta-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 48px;
}
.beta-eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  color: var(--accent-gold); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 10px;
}
.beta-headline {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  font-weight: 700; color: #fff; margin: 0 0 10px;
}
.beta-sub {
  font-size: 0.9rem; color: rgba(255,255,255,0.6);
  line-height: 1.7; max-width: 480px; margin: 0;
}
.beta-form { flex-shrink: 0; width: 100%; max-width: 420px; }
.beta-field-wrap {
  display: flex;
  border: 1px solid rgba(240,165,0,0.4); border-radius: var(--radius-sm);
  overflow: hidden; transition: border-color var(--transition);
}
.beta-field-wrap:focus-within { border-color: var(--accent-gold); }
.beta-input {
  flex: 1; min-width: 0; background: rgba(255,255,255,0.05); border: none; outline: none;
  padding: 13px 16px; color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 0.86rem;
}
.beta-input::placeholder { color: rgba(255,255,255,0.35); }
.beta-btn {
  flex-shrink: 0;
  padding: 13px 20px; background: var(--accent-gold);
  color: #0a0a0a; font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem; font-weight: 600; border: none; cursor: pointer;
  white-space: nowrap; transition: background var(--transition);
}
.beta-btn:hover:not(:disabled) { background: #ffc72c; }
.beta-btn:disabled { opacity: 0.7; cursor: default; }
.beta-note {
  font-size: 0.8rem; margin: 8px 4px 0;
  min-height: 18px; color: rgba(255,255,255,0.5);
}
.beta-note--success { color: #6fcf97; }
.beta-note--error   { color: #eb5757; }

/* ── Page hero (non-home pages) ───────────────────────────── */
.page-hero {
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.page-hero p { font-size: 1rem; color: var(--text-secondary); font-weight: 300; }

/* ── Search/filter bar ────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 24px 0; border-bottom: 1px solid var(--border); margin-bottom: 36px;
}
.filter-bar input,
.filter-bar select {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem; outline: none;
  transition: border-color var(--transition);
}
.filter-bar input:focus,
.filter-bar select:focus { border-color: rgba(240,165,0,0.4); }
.filter-bar input.filter-search { flex: 1; min-width: 200px; }
.filter-bar select { min-width: 160px; }
.filter-bar select option { background: var(--bg-card); }
.filter-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.84rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: border-color var(--transition), color var(--transition);
}
.filter-toggle--active { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ── Location picker (wrapper around #filter-location) ────── */
.location-picker {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 160px;
}
.location-picker > #filter-location {
  width: 100%;
  padding-right: 36px; /* room for the ✕ button */
}
/* Active (geo mode on) — gold border matches the filter-toggle--active style */
.location-picker--active > #filter-location {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
/* Clear (✕) button — absolutely positioned inside the picker */
.loc-clear {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--accent-gold);
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: opacity var(--transition);
  opacity: 0.8;
  z-index: 1;
}
.loc-clear:hover { opacity: 1; }

/* ── Location autocomplete dropdown ──────────────────────── */
.location-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
}
.location-dropdown--open { display: block; }
.loc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.loc-item:not(:last-child) { border-bottom: 1px solid var(--border); }
.loc-item:hover,
.loc-item--focused {
  background: rgba(240,165,0,0.07);
}
.loc-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}
.loc-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.loc-name {
  font-size: 0.86rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loc-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Load more button ─────────────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 48px; }
.btn-load-more {
  padding: 12px 36px; background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.btn-load-more:hover { border-color: var(--border-hover); color: var(--accent-gold); background: rgba(240,165,0,0.05); }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state .empty-icon { font-size: 3rem; opacity: 0.5; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--text-primary); }
.empty-state p { font-size: 0.9rem; color: var(--text-secondary); max-width: 380px; }

/* ── Event detail ─────────────────────────────────────────── */
.detail-hero {
  position: relative; height: 480px; overflow: hidden;
}
.detail-hero img { height: 100%; }
.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(9,9,11,0.98) 0%,rgba(9,9,11,0.2) 60%,transparent 100%);
}
.detail-hero-body {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 36px 0;
}

/* ── Discovery pills (event hero meta) ───────────────────────
   Solid pill style with right-arrow → reads as a CTA, not a label.
   Sits over the dark hero — gold-tinted background, gold border. */
.detail-explore-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 14px;
}
.detail-explore-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(240, 165, 0, 0.18);
  border: 1px solid rgba(240, 165, 0, 0.45);
  color: var(--accent-gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem; font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.detail-explore-link:hover {
  background: rgba(240, 165, 0, 0.3);
  border-color: rgba(240, 165, 0, 0.7);
  transform: translateY(-1px);
}
.detail-explore-link .arrow {
  transition: transform 0.2s;
}
.detail-explore-link:hover .arrow {
  transform: translateX(3px);
}

/* ── "Where to next?" search block (below related events) ───
   Reuses the homepage hero-search widget (.hero-search-wrap +
   .hero-search), just centered inside its own section to catch
   the user at the moment of bounce. */
.next-search-section {
  background: var(--bg-surface);
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
}
.next-search-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  margin: 0 0 8px; text-align: center;
}
.next-search-section .next-search-tag {
  display: block; text-align: center;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 10px;
}
.next-search-section .next-search-sub {
  text-align: center; color: var(--text-secondary);
  font-size: 0.92rem; margin: 0 auto 28px; max-width: 560px;
}
/* Center the reused hero-search widget inside this section.
   .hero-search-wrap was originally 100%-wide inside the hero;
   here we cap it so it sits nicely in the lighter section. */
.next-search-section .hero-search-wrap {
  max-width: 820px;
  margin: 0 auto 20px;
}
/* Mirror the same Near-me-hide rule that the homepage has for #hero-location */
#next-location:not(:placeholder-shown) ~ .near-me-chip { display: none; }

.next-search-quick {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 12px;
}
.next-search-quick a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem; font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.next-search-quick a:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.detail-category { margin-bottom: 10px; }
.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700;
  color: #fff; line-height: 1.15; margin-bottom: 12px;
}
.detail-meta-row {
  display: flex; align-items: center; gap: 20px;
  font-size: 0.86rem; color: rgba(244,240,232,0.7); flex-wrap: wrap;
}
.detail-meta-row span { display: flex; align-items: center; gap: 6px; }

.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 48px 0; align-items: start; }

.detail-main {}
.detail-description {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 32px;
}
.detail-actions { display: flex; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; align-items: flex-start; }

/* Add-to-Calendar dropdown hover */
#cal-dropdown a:hover, #cal-dropdown button:hover {
  background: var(--bg-card);
}

.detail-sidebar {}
.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px;
}
.sidebar-card h4 {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 16px;
}
.sidebar-detail-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 14px;
}
.sidebar-detail-row:last-child { margin-bottom: 0; }
.sidebar-detail-row svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-gold); }
.sidebar-detail-row strong { color: var(--text-primary); }

/* Task 3 — Sidebar location row is an <a> element; resets anchor defaults + hover */
a.sidebar-location-link {
  text-decoration: none; color: inherit;
  transition: color var(--transition);
}
a.sidebar-location-link:hover,
a.sidebar-location-link:focus-visible {
  color: var(--accent-gold); outline: none;
}
a.sidebar-location-link:hover strong { color: var(--accent-gold); }

/* Rating stars */
.stars { display: flex; gap: 3px; }
.star { font-size: 1.1rem; color: var(--text-muted); cursor: default; transition: color var(--transition) !important; }
.star--filled { color: var(--accent-gold); }
.stars--interactive .star { cursor: pointer; }
.stars--interactive .star:hover { color: var(--accent-gold); }

/* Community Photos */
.community-photos-section { margin-top: 40px; }
.community-photos-section h3 {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  color: var(--text-primary);
}
.community-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.community-photo-item { display: flex; flex-direction: column; gap: 4px; }
.community-photo-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-surface); aspect-ratio: 1; }
.community-photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.community-photo-thumb:hover { transform: scale(1.04); }
.community-photo-pending {
  position: absolute; top: 6px; left: 6px;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(234,179,8,0.92); color: #422006;
  border-radius: 99px; padding: 2px 7px; pointer-events: none;
}
.community-photo-delete {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  font-size: 0.72rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.community-photo-wrap:hover .community-photo-delete { opacity: 1; }
.community-photo-caption { font-size: 0.72rem; color: var(--text-muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.community-photo-uploader { font-size: 0.7rem; color: var(--text-muted); }

/* Comments */
.comments-section { margin-top: 40px; }
.comments-section h3 {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  margin-bottom: 24px; color: var(--text-primary);
}
.comment-form { margin-bottom: 32px; }
.comment-form textarea {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; resize: vertical; min-height: 90px; outline: none;
  transition: border-color var(--transition);
}
.comment-form textarea:focus { border-color: rgba(240,165,0,0.4); }
.comment-form .form-footer { display: flex; justify-content: flex-end; margin-top: 10px; }
.comment-item {
  display: flex; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.comment-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,var(--accent-gold),var(--accent-ember));
  display: grid; place-items: center; font-weight: 700; font-size: 0.88rem; color: #0a0a0a;
}
.comment-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-meta strong { color: var(--text-secondary); }
.comment-body { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* Related events */
.related-section { padding: 56px 0; border-top: 1px solid var(--border); }
.related-section h3 {
  font-family: 'Playfair Display', serif; font-size: 1.6rem;
  margin-bottom: 28px; color: var(--text-primary);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Auth / Profile ───────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 28px 60px;
}
.auth-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 440px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.auth-box h2 {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  font-weight: 700; margin-bottom: 6px;
}
.auth-box .auth-sub { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 28px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.auth-tab {
  flex: 1; padding: 10px; background: transparent; border: none;
  color: var(--text-secondary); font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem; font-weight: 500; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.auth-tab--active { background: var(--accent-gold); color: #0a0a0a; font-weight: 600; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.80rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 7px; letter-spacing: 0.02em;
}
.form-group input {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus { border-color: rgba(240,165,0,0.45); }
.form-error { font-size: 0.80rem; color: var(--error); margin-top: 6px; }
.form-hint { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 6px; transition: color var(--transition); }
.form-hint--error { color: var(--error); }
.form-hint--ok    { color: var(--text-muted); opacity: 0.7; }
.form-submit { width: 100%; margin-top: 8px; padding: 13px; font-size: 0.92rem; }

/* Profile page (logged in) */
.profile-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg,var(--accent-gold),var(--accent-ember));
  display: grid; place-items: center; font-weight: 700; font-size: 1.8rem;
  color: #0a0a0a; margin-bottom: 18px;
}
.profile-name { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.profile-email { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 28px; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Email verification pending state ────────────────────── */
.verify-pending {
  text-align: center;
}
.verify-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  line-height: 1;
}
.verify-pending h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  margin-bottom: 10px;
}
.verify-email-addr {
  color: var(--accent-gold);
  word-break: break-all;
}
.verify-hint {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 10px 0 6px;
  line-height: 1.7;
}
.verify-spam {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.6;
}
.verify-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0 18px;
}
.verify-resend-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.verify-resend-btn {
  margin: 0 auto;
}
.verify-resend-msg {
  font-size: 0.78rem;
  color: var(--success);
  margin-top: 8px;
  text-align: center;
}
.verify-signin {
  font-size: 0.80rem;
  color: var(--text-muted);
  margin-top: 20px;
}
/* Inline not-verified notice inside the login error area */
.verify-inline-msg {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Profile: Change-password section ─────────────────────── */
.profile-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.profile-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Task 4 — Account tab: action cards replacing raw button row */
.profile-quick-links { display: flex; flex-direction: column; gap: 8px; }
.profile-quick-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  text-decoration: none; color: var(--text-primary); cursor: pointer; width: 100%;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  font-size: 0.9rem; font-weight: 500; font-family: inherit; text-align: left;
}
.profile-quick-link:hover {
  background: rgba(212,175,55,0.07); border-color: rgba(212,175,55,0.3);
  color: var(--accent-gold);
}
.profile-quick-link svg { flex-shrink: 0; color: var(--accent-gold); }
.profile-quick-link .plq-desc {
  display: block; font-size: 0.78rem; color: var(--text-muted);
  font-weight: 400; margin-top: 1px;
}
.profile-quick-link:hover .plq-desc { color: rgba(212,175,55,0.7); }

/* Task 2 — Danger zone */
.danger-zone {
  margin-top: 22px; padding: 16px 18px;
  border: 1px solid rgba(248,113,113,0.2); border-radius: var(--radius-sm);
  background: rgba(248,113,113,0.04);
}
.danger-zone-title {
  font-size: 0.70rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--error); margin-bottom: 6px;
}
.danger-zone-desc {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 12px;
}

/* Toggle switch for notification preferences */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 24px;
  background: var(--border); cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; transition: transform var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Task 2 — Delete account confirmation modal */
.delete-modal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.delete-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.delete-modal-dialog {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 32px; max-width: 420px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  transform: translateY(10px); transition: transform 0.2s;
}
.delete-modal-overlay.is-open .delete-modal-dialog { transform: translateY(0); }
.delete-modal-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(248,113,113,0.12); display: grid; place-items: center;
  color: var(--error); margin-bottom: 16px;
}
.delete-modal-title {
  font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.delete-modal-body {
  font-size: 0.87rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px;
}
.delete-modal-body strong { color: var(--text-primary); }
.delete-modal-recovery {
  font-size: 0.80rem; color: var(--text-muted); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 20px; line-height: 1.6;
}
.delete-modal-actions { display: flex; gap: 10px; }
.delete-modal-actions .btn-outline { flex: 1; }
.delete-modal-actions .btn-danger   { flex: 1; justify-content: center; }

.form-success {
  font-size: 0.80rem;
  color: var(--success);
  margin-top: 6px;
}

/* ── Password strength meter ──────────────────────────────── */
.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.pw-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.pw-strength-label {
  font-size: 0.70rem;
  font-weight: 700;
  min-width: 46px;
  text-align: right;
  letter-spacing: 0.03em;
}
.pw-rules {
  list-style: none;
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pw-rules li { transition: color 0.2s; }
.pw-rules li.rule-ok { color: var(--success); }

/* ── Honeypot field — visually and accessibly hidden ─────── */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  tab-index: -1;
}

/* ── Saved page ───────────────────────────────────────────── */
.saved-page { padding: 48px 0 80px; }

/* ── Featured festivals (homepage) ───────────────────────── */
.featured-grid {
  display: grid; grid-template-columns: 1.55fr 1fr;
  grid-template-rows: auto auto; gap: 22px;
}
.featured-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition);
}
.featured-card:hover { transform: translateY(-5px); box-shadow: 0 28px 70px rgba(0,0,0,0.55); }
.featured-card.large { grid-row: 1/3; height: 560px; }
.featured-card.small { height: 264px; }
.featured-card img { height: 100%; transition: transform 0.55s cubic-bezier(0.4,0,0.2,1) !important; }
.featured-card:hover img { transform: scale(1.05); }
.featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(9,9,11,0.95) 0%,rgba(9,9,11,0.3) 50%,transparent 100%);
}
[data-theme="light"] .featured-overlay {
  background: linear-gradient(to top,rgba(10,8,4,0.88) 0%,rgba(10,8,4,0.2) 50%,transparent 100%);
}
/* Title sits on the dark image overlay (both themes), but var(--text-primary)
   flips to dark in the light theme → unreadable. Keep it light. */
[data-theme="light"] .featured-title { color: #f4f0e8; }
.featured-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 26px; }
.featured-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.featured-title {
  font-family: 'Playfair Display', serif; font-weight: 700;
  color: var(--text-primary); line-height: 1.2;
}
.featured-card.large .featured-title { font-size: 1.9rem; }
.featured-card.small .featured-title { font-size: 1.25rem; }
.featured-desc { font-size: 0.82rem; color: rgba(244,240,232,0.65); margin-top: 8px; line-height: 1.6; }
.featured-card.small .featured-desc { display: none; }
.featured-meta { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 0.78rem; color: rgba(244,240,232,0.6); }
.featured-meta span { display: flex; align-items: center; gap: 5px; }
.featured-meta svg { width: 13px; height: 13px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cat-grid    { grid-template-columns: repeat(3, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .detail-sidebar { order: -1; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 62px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  /* Nav always frosted on mobile — transparent nav is invisible against ads/light backgrounds */
  #header {
    background: rgba(9,9,11,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: var(--border);
  }
  [data-theme="light"] #header { background: rgba(250,249,247,0.9); }

  /* Language pill — always visible between logo and hamburger on mobile */
  .nav-lang--mobile {
    display: flex; margin-left: auto; margin-right: 10px; position: relative;
  }
  /* Dropdown opens downward, right-aligned */
  .nav-lang--mobile .nav-lang-dropdown {
    right: 0; left: auto; min-width: 150px;
  }

  .hero-headline { font-size: clamp(2rem, 9vw, 3.2rem); }
  .hero-search { flex-direction: column; border-radius: var(--radius-sm); }
  .search-field { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  [data-theme="light"] .search-field { border-bottom-color: rgba(0,0,0,0.1); }
  .search-field:last-of-type { border-bottom: none; }
  .search-btn { padding: 14px; text-align: center; }
  .hero-stats { gap: 16px; }
  .hero-stat strong { font-size: 1.1rem; }
  /* Near-me chip: stays compact in the input row on mobile */

  .cat-grid    { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card.large { height: 360px; grid-row: auto; }
  .featured-card.small { height: 210px; }
  .related-grid { grid-template-columns: 1fr; }

  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
  .newsletter-form  { max-width: 100%; width: 100%; }
  .beta-inner       { flex-direction: column; align-items: flex-start; }
  .beta-form        { max-width: 100%; width: 100%; }
  .beta-field-wrap  { flex-direction: column; }
  .beta-input       { width: 100%; }
  .beta-btn         { width: 100%; padding: 14px 20px; }
  .beta-headline    { font-size: 1.4rem; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select, .filter-toggle { width: 100%; }
  .location-picker { width: 100%; }
  .location-picker > #filter-location { width: 100%; }
  .detail-hero { height: 300px; }
  .detail-body { padding: 28px 0; }
  .detail-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .cat-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 28px 20px; }
}

/* ============================================================
   EXTENSIONS — Feature additions
============================================================ */

/* ── Grid / List toggle ───────────────────────────────────── */
.view-toggle {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px;
}
.view-toggle-btn {
  position: relative;
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent; border: none; color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.view-toggle-btn svg { width: 16px; height: 16px; }
.view-toggle-btn.active,
.view-toggle-btn:hover { background: rgba(240,165,0,0.12); color: var(--accent-gold); }

/* Tooltip on hover */
.view-toggle-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.68rem; font-weight: 600;
  white-space: nowrap; padding: 4px 8px; border-radius: 5px;
  pointer-events: none; opacity: 0;
  transition: opacity 0.18s ease;
  letter-spacing: 0.03em;
}
.view-toggle-btn[data-tooltip]:hover::after { opacity: 1; }

/* ── Card description (hidden in grid, visible in list) ──── */
.card-desc {
  display: none;
  margin: 0;
}
/* Location elements are spans (cards) or anchors (detail page) — both clickable */
.card-location-link {
  color: inherit; text-decoration: none;
  cursor: pointer; display: inline-block;
}
.card-location-link:hover,
.card-location-link:focus-visible {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}
.detail-location-link {
  color: inherit; text-decoration: none; cursor: pointer;
}
.detail-location-link:hover,
.detail-location-link:focus-visible {
  color: var(--accent-gold);
  outline: none;
}

/* ── List view — horizontal row with prominent date + 2-line snippet ─ */
.events-grid.list-view {
  grid-template-columns: 1fr;
  gap: 14px;
}
.events-grid.list-view > a {
  display: flex;
  height: 188px;          /* explicit height so children can use height:100% */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.events-grid.list-view > a:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 36px rgba(0,0,0,0.40);
  transform: translateY(-2px);
}
.events-grid.list-view .event-card {
  display: contents;       /* invisible to layout — children become flex items */
}
.events-grid.list-view .card-img-wrap {
  flex: 0 0 260px;
  width: 260px;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
}
.events-grid.list-view .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.events-grid.list-view .card-body {
  flex: 1;
  min-width: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  overflow: hidden;
}
/* Prominent date in gold accent — uppercase, letter-spaced */
.events-grid.list-view .card-date {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.events-grid.list-view .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 2-line description snippet with ellipsis */
.events-grid.list-view .card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 auto 0;     /* pushes meta + footer to bottom */
}
.events-grid.list-view .card-meta {
  flex-wrap: nowrap;
  gap: 16px;
  font-size: 0.78rem;
  margin-top: 10px;
}
.events-grid.list-view .card-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Tablet (≤900px) — slightly tighter */
@media (max-width: 900px) {
  .events-grid.list-view > a       { height: 170px; }
  .events-grid.list-view .card-img-wrap { flex: 0 0 200px; width: 200px; }
  .events-grid.list-view .card-body     { padding: 14px 18px; }
  .events-grid.list-view .card-title    { font-size: 1.05rem; }
  .events-grid.list-view .card-desc     { font-size: 0.8rem; -webkit-line-clamp: 2; }
}

/* Mobile (≤620px) — compact two-column row, keep date + 1-line snippet */
@media (max-width: 620px) {
  .events-grid.list-view > a {
    height: 124px;
    border-radius: var(--radius-sm);
  }
  .events-grid.list-view .card-img-wrap { flex: 0 0 120px; width: 120px; }
  .events-grid.list-view .card-body     { padding: 10px 12px; }
  .events-grid.list-view .card-date {
    font-size: 0.62rem;
    margin-bottom: 3px;
  }
  .events-grid.list-view .card-title {
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  .events-grid.list-view .card-desc {
    -webkit-line-clamp: 1;
    font-size: 0.74rem;
    margin: 0 0 4px 0;
  }
  .events-grid.list-view .card-meta { font-size: 0.7rem; gap: 10px; margin-top: auto; }
  .events-grid.list-view .card-footer { display: none; }
}

/* Mobile list-view: move count overlay out of the way of the category badge.
   At 120 px image width, right:46px + badge left:12px = collision.
   Relocate to bottom-right so both elements have room. */
@media (max-width: 620px) {
  .events-grid.list-view .card-count-overlay {
    top: auto;
    bottom: 8px;
    right: 8px;
  }
}

/* ── Top-20 count overlay badge (Popular / Trending pages) ── */
.card-count-overlay {
  position: absolute;
  top: 10px;
  right: 46px;             /* clear the save button (≈38px wide + gap) */
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

/* ── Image attribution ────────────────────────────────────── */
/* Sits above the dark hero gradient overlay (z-index:2) so the credit
   stays readable. Pill-shaped, semi-translucent, anchored bottom-right. */
.img-attribution {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.img-attribution a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.img-attribution a:hover { color: var(--accent-gold); }
@media (max-width: 620px) {
  .img-attribution {
    bottom: 8px;
    right: 8px;
    font-size: 0.62rem;
    padding: 4px 8px;
    max-width: calc(100% - 16px);
  }
}

/* ── Cookie consent banner ────────────────────────────────── */
#cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9500;
  background: var(--bg-card); border-top: 1px solid var(--border);
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
#cookie-consent.visible { transform: translateY(0); }
.cookie-inner {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 16px 0;
}
.cookie-text { flex: 1; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; min-width: 220px; }
.cookie-text a { color: var(--accent-gold); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.btn-cookie-accept {
  padding: 9px 22px; background: var(--accent-gold);
  color: #0a0a0a; font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem; font-weight: 700; border: none;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition);
}
.btn-cookie-accept:hover { background: #ffc72c; }
.btn-cookie-reject {
  padding: 9px 16px; background: transparent;
  color: var(--text-secondary); font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color var(--transition), color var(--transition);
}
.btn-cookie-reject:hover { border-color: var(--border-hover); color: var(--text-primary); }
@media (max-width: 640px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .btn-cookie-accept, .btn-cookie-reject { flex: 1; text-align: center; }
}

/* ── AdSense Ad Slots ─────────────────────────────────────────────────
 * Design principles:
 *   • "Advertisement" micro-label always visible above the slot
 *   • Constrained to horizontal/leaderboard format — no giant rectangles
 *   • Collapses cleanly when unfilled (no empty whitespace)
 *   • Neutral background — integrates with both light & dark themes
 * ─────────────────────────────────────────────────────────────────── */

/* In-grid row: spans all grid columns, stacks label + slot vertically.
   border-top gives a clear visual section break so the ad feels
   intentional rather than like missing content. */
.adsense-row {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 16px 0 12px;
  border-top: 1px solid var(--border);
  overflow: hidden;   /* clip wide ad iframes — prevents horizontal scroll */
}

/* "ADVERTISEMENT" micro-label — always rendered, barely visible */
.adsense-row::before {
  content: 'Advertisement';
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.4;
}

/* Hide the entire row when its slot is unfilled (no dead whitespace) */
.adsense-row:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

/* Dev mode: show grey placeholder rows instead of hiding unfilled slots.
   body.dev-mode is added by layout.js on any non-production domain. */
body.dev-mode .adsense-row:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: flex;
  min-height: 90px;
}
body.dev-mode .adsense-row:has(ins.adsbygoogle[data-ad-status="unfilled"]) ins.adsbygoogle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-card),
    var(--bg-card) 8px,
    var(--bg-surface) 8px,
    var(--bg-surface) 16px
  );
  border: 1px dashed var(--border-hover);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.55;
}
body.dev-mode .adsense-row:has(ins.adsbygoogle[data-ad-status="unfilled"]) ins.adsbygoogle::after {
  content: '[ AD SLOT — unfilled on test domain ]';
}

/* Standalone slot (index, categories, event detail pages) */
.adsense-slot {
  position: relative;
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Standalone label wrapper for non-grid placements */
.adsense-slot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 20px auto;
  width: 100%;
}
.adsense-slot-wrap::before {
  content: 'Advertisement';
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.4;
}
.adsense-slot-wrap:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

/* While AdSense hasn't responded yet: keep <ins> block so it can
   measure availableWidth, but invisible to avoid content flash */
.adsense-slot ins.adsbygoogle:not([data-ad-status]) {
  display: block;
  width: 100%;
  min-height: 90px;
  opacity: 0;
}

/* Unfilled: collapse slot to nothing */
.adsense-slot ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none;
}

/* Filled: fade in, natural height */
.adsense-slot ins.adsbygoogle[data-ad-status="filled"] {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Leaderboard (728×90 / responsive horizontal) */
.adsense-slot--leaderboard {
  max-width: 728px;
  min-height: 90px;
  max-height: 280px;
}

/* Rectangle (300×250) */
.adsense-slot--rectangle {
  max-width: 336px;
  min-height: 250px;
  max-height: 300px;
}

/* Sticky bottom banner on mobile */
.adsense-slot--sticky-mobile {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 800;
  max-width: 100%;
  min-height: 50px;
  height: 60px;
  margin: 0;
  border-radius: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: none;
}
@media (max-width: 768px) { .adsense-slot--sticky-mobile { display: flex; } }

/* Mobile: in-grid ads use data-ad-format="auto" (smart banner).
   Left-align so any overflow from wide creatives goes rightward only —
   prevents the headline/CTA on the left from being clipped.
   overflow:hidden on both row and slot stops horizontal scrollbar. */
@media (max-width: 640px) {
  .adsense-row {
    align-items: flex-start;  /* left-align: overflow bleeds right, not left */
  }
  .adsense-slot {
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    justify-content: flex-start; /* keep <ins> left-anchored inside the slot */
  }
  .adsense-slot-wrap {
    margin: 12px auto;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
  }
}

/* ── Footer extensions ────────────────────────────────────── */
.footer-made-in {
  font-size: 0.76rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.footer-made-in .heart { color: var(--accent-ember); animation: heartBeat 1.6s ease infinite; }
@keyframes heartBeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.18)} }

.footer-legal {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-legal a {
  font-size: 0.76rem; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--text-primary); }
.footer-legal-sep {
  width: 1px; height: 12px; background: var(--border);
}

/* ── About page ───────────────────────────────────────────── */
.about-hero {
  position: relative; padding: 100px 0 72px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.about-hero-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-gold); margin-bottom: 16px;
}
.about-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700;
  color: var(--text-primary); line-height: 1.12; max-width: 700px;
  margin-bottom: 18px;
}
.about-hero p {
  font-size: 1.05rem; color: var(--text-secondary); font-weight: 300;
  line-height: 1.8; max-width: 560px;
}

.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; padding: 56px 0;
}
.about-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px 24px; text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.about-stat-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.about-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem; font-weight: 700; color: var(--accent-gold);
}
.about-stat-label {
  font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; font-weight: 500;
}

.about-mission {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center; padding: 80px 0;
}
.about-mission-img {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3;
}
.about-mission-img img { height: 100%; }
.about-mission-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px; line-height: 1.2;
}
.about-mission-content p {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 14px;
}

.about-values { padding: 80px 0; background: var(--bg-surface); }
.about-values-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px;
}
.about-value-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px 22px;
  transition: border-color var(--transition), transform var(--transition);
}
.about-value-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.about-value-icon { font-size: 1.8rem; margin-bottom: 14px; }
.about-value-card h3 {
  font-family: 'Playfair Display', serif; font-size: 1.15rem;
  font-weight: 700; margin-bottom: 8px; color: var(--text-primary);
}
.about-value-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.7; }

.about-team { padding: 80px 0; }
.team-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px;
}
.team-card {
  text-align: center; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px 16px;
  transition: border-color var(--transition), transform var(--transition);
}
.team-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.team-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-ember));
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; color: #0a0a0a;
}
.team-name { font-weight: 700; font-size: 0.96rem; margin-bottom: 4px; color: var(--text-primary); }
.team-role { font-size: 0.78rem; color: var(--accent-gold); margin-bottom: 8px; font-weight: 500; }
.team-bio  { font-size: 0.80rem; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 1024px) {
  .about-mission { grid-template-columns: 1fr; gap: 36px; }
  .about-values-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .about-stats { grid-template-columns: 1fr; }
  .about-values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Contact page ─────────────────────────────────────────── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 56px; padding: 72px 0 96px; align-items: start;
}
.contact-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  color: var(--text-primary); margin-bottom: 14px;
}
.contact-info p {
  font-size: 0.92rem; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 32px;
}
.contact-info-items { display: flex; flex-direction: column; gap: 16px; }
.contact-info-item {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 0.88rem; color: var(--text-secondary);
}
.contact-info-item .ci-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(240,165,0,0.1); border: 1px solid rgba(240,165,0,0.2);
  display: grid; place-items: center; font-size: 1rem;
}
.contact-info-item strong { display: block; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }

.contact-form-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.contact-form-card h3 {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-weight: 700; margin-bottom: 24px; color: var(--text-primary);
}
.contact-form .form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.contact-form textarea {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; resize: vertical; min-height: 130px; outline: none;
  transition: border-color var(--transition);
}
.contact-form textarea:focus { border-color: rgba(240,165,0,0.45); }
.contact-form .form-group select {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; outline: none; cursor: pointer;
  transition: border-color var(--transition);
}
.contact-form .form-group select:focus { border-color: rgba(240,165,0,0.45); }
.contact-form .form-group select option { background: var(--bg-card); }
.contact-success {
  text-align: center; padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.contact-success .success-icon { font-size: 2.5rem; }
.contact-success h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--text-primary); }
.contact-success p { font-size: 0.88rem; color: var(--text-secondary); }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* ── Legal pages ──────────────────────────────────────────── */
.legal-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 56px; padding: 64px 0 96px; align-items: start;
}
.legal-toc {
  position: sticky; top: calc(var(--nav-h) + 24px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px;
}
.legal-toc h4 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 14px;
}
.legal-toc ol { list-style: none; counter-reset: toc-counter; }
.legal-toc li { counter-increment: toc-counter; margin-bottom: 8px; }
.legal-toc a {
  font-size: 0.82rem; color: var(--text-muted);
  transition: color var(--transition); display: flex; gap: 8px; align-items: flex-start;
}
.legal-toc a::before {
  content: counter(toc-counter) ".";
  color: var(--accent-gold); font-weight: 600; flex-shrink: 0;
}
.legal-toc a:hover { color: var(--text-primary); }
.legal-toc a.active { color: var(--accent-gold); }

.legal-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.legal-content .legal-updated {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 36px;
}
.legal-content h2 {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-weight: 700; color: var(--text-primary);
  margin: 40px 0 14px; padding-top: 8px;
}
.legal-content p {
  font-size: 0.92rem; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 14px;
}
.legal-content ul, .legal-content ol {
  padding-left: 20px; margin-bottom: 14px;
}
.legal-content li {
  font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 6px;
}
.legal-content a { color: var(--accent-gold); text-decoration: underline; text-underline-offset: 2px; }
.legal-divider { height: 1px; background: var(--border); margin: 40px 0; }

/* Task 1 — Legal content: sub-headings and table styles extracted from inline */
.legal-content h2 { scroll-margin-top: calc(var(--nav-h) + 24px); }
.legal-content h3 {
  font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 24px 0 10px;
}

/* Tables */
.legal-content table {
  width: 100%; border-collapse: collapse;
  font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 20px;
}
.legal-content thead tr { border-bottom: 1px solid var(--border); }
.legal-content tbody tr { border-bottom: 1px solid var(--border); }
.legal-content tbody tr:last-child { border-bottom: none; }
.legal-content th { text-align: left; padding: 8px 12px; color: var(--text-primary); font-weight: 600; }
.legal-content td { padding: 8px 12px; }

/* Mobile: horizontal scroll so wide tables don't break layout */
.legal-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px;
  border-radius: var(--radius-sm);
}
.legal-table-wrap table { margin-bottom: 0; min-width: 420px; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ── Full categories page grid ────────────────────────────── */
.cat-grid--full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.cat-grid--full .cat-card { height: 210px; }

/* ── Most Visited section ─────────────────────────────────── */
.most-visited-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.card-rank {
  position: absolute; top: 12px; left: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(9,9,11,0.75); backdrop-filter: blur(8px);
  border: 1px solid var(--border); display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; color: var(--accent-gold);
  z-index: 2;
}

/* ── Trending section ─────────────────────────────────────── */
.trending-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 50px; font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.06em;
  background: rgba(232,82,43,0.15); color: var(--accent-ember);
  border: 1px solid rgba(232,82,43,0.25);
}
.trending-threshold {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-muted); margin-top: 6px;
}
.trending-threshold .fire { color: var(--accent-ember); }
.trending-bar {
  flex: 1; height: 3px; background: var(--bg-card-hover);
  border-radius: 2px; overflow: hidden;
}
.trending-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-ember), var(--accent-gold));
  border-radius: 2px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* ── Email verification UI ────────────────────────────────── */
.verify-banner {
  background: rgba(106,223,148,0.08); border: 1px solid rgba(106,223,148,0.2);
  border-radius: var(--radius-sm); padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.86rem; color: var(--success); margin-bottom: 20px;
}
.verify-banner .verify-icon { font-size: 1.1rem; flex-shrink: 0; }
.verify-banner.warn {
  background: rgba(240,165,0,0.08); border-color: rgba(240,165,0,0.2); color: var(--accent-gold);
}
.verify-banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.verify-banner a:hover { opacity: 0.8; }

.badge-verified {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 50px; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.04em;
  background: rgba(106,223,148,0.15); color: var(--success);
  border: 1px solid rgba(106,223,148,0.3);
}

/* Verification landing page */
.verify-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 100px 28px;
}
.verify-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px 40px;
  width: 100%; max-width: 440px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.verify-card .verify-big-icon { font-size: 3rem; margin-bottom: 18px; }
.verify-card h2 {
  font-family: 'Playfair Display', serif; font-size: 1.7rem;
  font-weight: 700; margin-bottom: 10px; color: var(--text-primary);
}
.verify-card p {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px;
}

/* ── Horizontal scroll carousel (mobile) ─────────────────── */
.cards-carousel {
  display: flex; gap: 18px;
  overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cards-carousel::-webkit-scrollbar { display: none; }
.cards-carousel .event-card {
  flex: 0 0 280px; scroll-snap-align: start;
}

/* ── Utility helpers ──────────────────────────────────────── */
.text-gold    { color: var(--accent-gold); }
.text-ember   { color: var(--accent-ember); }
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.fw-700       { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Floating Action Button (FAB) — "+ Add Event" ──────────────────────────
 * Visible on Home, Explore and Saved pages for logged-in users only.
 * Injected by layout.js. Hidden by default; shown via .fab--visible class
 * added after auth state is confirmed.
 * z-index 1050: above page content, below cookie banner (9500) and modals (1100).
 */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 16px;
  height: 52px;
  border-radius: 26px;
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(240,165,0,0.45);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.95);
}
.fab--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.fab:hover {
  background: #ffc72c;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(240,165,0,0.55);
}
.fab:active {
  transform: translateY(0) scale(0.98);
}
.fab-icon {
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
}
/* On small screens hide the label — show only the + icon */
@media (max-width: 480px) {
  .fab {
    padding: 0;
    width: 52px;
    justify-content: center;
    border-radius: 50%;
    bottom: 20px;
    right: 20px;
  }
  .fab-label { display: none; }
  .fab-icon  { font-size: 1.6rem; }
}

/* ================================================================
   WORLD CUP 2026 — TEMPORARY (delete after 2026-07-19)
================================================================ */

/* ── Homepage teaser ──────────────────────────────────────── */
#worldcup-teaser {
  padding: 0;
  background: linear-gradient(110deg, #050e05 0%, #0a0f0a 50%, #160a00 100%);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(22,163,74,0.2);
  border-bottom: 1px solid rgba(22,163,74,0.2);
}
#worldcup-teaser::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(22,163,74,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.wct-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
  padding: 52px 0;
}
.wct-eyebrow {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #16a34a; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.wct-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text-primary); margin-bottom: 14px;
}
.wct-title em { color: #22c55e; font-style: italic; }
.wct-desc {
  color: var(--text-secondary); font-size: 0.93rem;
  line-height: 1.65; max-width: 520px; margin-bottom: 24px;
}
.wct-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wct-cta .btn-primary {
  background: #16a34a; color: #fff;
}
.wct-cta .btn-primary:hover {
  background: #22c55e;
  box-shadow: 0 8px 28px rgba(34,197,94,0.35);
}
.wct-cta .btn-outline { border-color: rgba(34,197,94,0.3); color: var(--text-secondary); font-size: 0.84rem; }
.wct-cta .btn-outline:hover { border-color: rgba(34,197,94,0.6); color: #22c55e; }

/* ── WC teaser countdown ── */
.wct-cd { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.wct-cd-row { display: flex; align-items: flex-end; gap: 6px; }
.wct-cd-label {
  margin: 0; font-size: 0.72rem; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.wct-live-msg {
  margin: 20px 0 0; font-size: 0.95rem; font-weight: 700; color: #22c55e;
}
[data-theme="light"] .wct-cd-label { color: rgba(0,0,0,0.4); }
[data-theme="light"] .wct-live-msg { color: #16a34a; }

.wct-pills {
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0;
}
.wct-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: var(--radius-md);
  padding: 14px 22px; text-align: center; white-space: nowrap;
}
.wct-pill-value {
  display: block; font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700; color: #22c55e;
  line-height: 1.1;
}
.wct-pill-label {
  display: block; font-size: 0.72rem; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px;
}
[data-theme="light"] #worldcup-teaser {
  background: linear-gradient(110deg, #f0faf0 0%, #faf9f7 50%, #fffaf0 100%);
  border-color: rgba(22,163,74,0.2);
}
[data-theme="light"] #worldcup-teaser::before {
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(22,163,74,0.06) 0%, transparent 70%);
}
[data-theme="light"] .wct-pill {
  background: rgba(0,0,0,0.03); border-color: rgba(22,163,74,0.25);
}
@media (max-width: 860px) {
  .wct-inner {
    grid-template-columns: 1fr;
    gap: 28px; padding: 40px 0;
  }
  .wct-pills {
    flex-direction: row; justify-content: flex-start;
    flex-wrap: wrap;
  }
  .wct-pill { padding: 12px 18px; }
  .wct-pill-value { font-size: 1.2rem; }
}
@media (max-width: 480px) {
  .wct-pills { gap: 8px; }
  .wct-pill { padding: 10px 14px; }
  .wct-pill-value { font-size: 1.05rem; }
}

/* ── World Cup hub page hero ───────────────────────────────── */
.wc-hero {
  padding: calc(var(--nav-h) + 64px) 0 72px;
  background: #050e05;
  position: relative;
  overflow: hidden;
}
.wc-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(22,163,74,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(240,165,0,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 60% 80%, rgba(59,130,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.wc-hero-content { position: relative; max-width: 700px; }
.wc-hero-eyebrow {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.wc-hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(22,163,74,0.15); border: 1px solid rgba(34,197,94,0.3);
  border-radius: 50px; padding: 5px 14px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #22c55e;
}
.wc-hero-dates {
  font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
}
.wc-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900; line-height: 1.05;
  color: var(--text-primary); margin-bottom: 20px;
}
.wc-hero-title em { color: #22c55e; font-style: italic; }
.wc-hero-sub {
  color: var(--text-secondary); font-size: 1rem;
  line-height: 1.7; max-width: 580px; margin-bottom: 36px;
}
.wc-hero-sub strong { color: var(--text-primary); }
.wc-hero-stats {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.wc-hero-stat strong {
  display: block; font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: #22c55e; line-height: 1;
}
.wc-hero-stat span {
  font-size: 0.72rem; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px;
}
.wc-hero-divider {
  width: 1px; height: 36px; background: var(--border); flex-shrink: 0;
}

/* Country strip */
.wc-country-strip {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.wc-country-pills {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.wc-country-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em;
}
.wc-country-pill--usa    { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.wc-country-pill--canada { background: rgba(220,38,38,0.12);  color: #f87171; border: 1px solid rgba(220,38,38,0.25); }
.wc-country-pill--mexico { background: rgba(22,163,74,0.12);  color: #4ade80; border: 1px solid rgba(22,163,74,0.25); }

/* ── City cards grid ───────────────────────────────────────── */
.wc-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.wc-city-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.wc-city-card:hover {
  border-color: rgba(34,197,94,0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.wc-city-card--loading { pointer-events: none; }

.wc-city-card-top {
  padding: 20px 20px 16px;
  border-top: 3px solid var(--border);  /* overridden inline per card */
  background: rgba(255,255,255,0.02);
}
.wc-flag-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.wc-flag { font-size: 1.2rem; line-height: 1; }
.wc-country-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.wc-match-count-pill {
  margin-left: auto;
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 50px;
  background: rgba(240,165,0,0.12); color: var(--accent-gold);
  border: 1px solid rgba(240,165,0,0.2);
}
.wc-city-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.2;
  margin-bottom: 6px;
}
.wc-stadium-name {
  font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
}

.wc-city-card-body {
  padding: 16px 20px;
  flex: 1;
  border-top: 1px solid var(--border);
}
.wc-event-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.wc-event-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.73rem; font-weight: 700;
  background: rgba(34,197,94,0.12); color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
}
.wc-past-hint {
  font-size: 0.70rem; color: var(--text-muted);
}

/* Matches list inside card */
.wc-matches-list {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding-right: 2px;
}
.wc-matches-list::-webkit-scrollbar { width: 4px; }
.wc-matches-list::-webkit-scrollbar-track { background: transparent; }
.wc-matches-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.wc-matches-header {
  font-size: 0.70rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px;
}
.wc-matches-more { font-weight: 400; letter-spacing: 0; text-transform: none; }
.wc-match-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.wc-match-row:last-child { border-bottom: none; }
.wc-match-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.wc-match-info {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.wc-match-round {
  font-size: 0.70rem; font-weight: 600; color: var(--accent-gold);
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-match-teams {
  font-size: 0.84rem; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-match-date {
  font-size: 0.72rem; color: var(--text-muted);
}
.wc-no-upcoming {
  font-size: 0.82rem; color: var(--text-muted);
  padding: 10px 0; font-style: italic;
}

.wc-city-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.wc-explore-btn { width: 100%; justify-content: center; }

/* Grid footer note */
.wc-grid-footer { text-align: center; margin-top: 48px; }
.wc-grid-note {
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.6;
}
.wc-grid-note a { color: var(--accent-gold); }
.wc-grid-note a:hover { color: #ffc72c; }

/* How it works strip */
.wc-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.wc-how-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
}
.wc-how-icon { font-size: 2rem; margin-bottom: 14px; }
.wc-how-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.wc-how-card p { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.6; }

/* Light theme adjustments */
[data-theme="light"] .wc-hero         { background: #f0faf0; }
[data-theme="light"] .wc-country-strip { background: rgba(0,0,0,0.02); }
[data-theme="light"] .wc-country-pill--usa    { background: rgba(59,130,246,0.08);  color: #2563eb; border-color: rgba(59,130,246,0.2); }
[data-theme="light"] .wc-country-pill--canada { background: rgba(220,38,38,0.08);   color: #dc2626; border-color: rgba(220,38,38,0.2); }
[data-theme="light"] .wc-country-pill--mexico { background: rgba(22,163,74,0.08);   color: #16a34a; border-color: rgba(22,163,74,0.2); }
[data-theme="light"] .wc-event-badge  { background: rgba(22,163,74,0.1); color: #15803d; border-color: rgba(22,163,74,0.2); }
[data-theme="light"] .wc-hero-title em,
[data-theme="light"] .wc-hero-stat strong { color: #16a34a; }
[data-theme="light"] .wc-cta .btn-primary { background: #16a34a; }
[data-theme="light"] .wc-cta .btn-primary:hover { background: #15803d; }
[data-theme="light"] .wct-pill-value { color: #16a34a; }
[data-theme="light"] .wct-cta .btn-primary { background: #16a34a; }
[data-theme="light"] .wct-eyebrow { color: #16a34a; }
/* World Cup page countdown label — was white-only, invisible on light theme */
[data-theme="light"] .wc-page-cd-label { color: rgba(0,0,0,0.45); }
/* Countdown blocks/units/separators are white for the dark event-detail
   banner; the homepage teaser (.wct-cd) and WC page (.wc-page-cd) sit on a
   LIGHT background, so on the light theme the white text/blocks vanish.
   Scope the override to those two contexts only. */
[data-theme="light"] .wct-cd .wc-cd-block,
[data-theme="light"] .wc-page-cd .wc-cd-block { background: rgba(0,0,0,0.05); }
[data-theme="light"] .wct-cd .wc-cd-unit,
[data-theme="light"] .wc-page-cd .wc-cd-unit { color: rgba(0,0,0,0.55); }
[data-theme="light"] .wct-cd .wc-cd-sep,
[data-theme="light"] .wc-page-cd .wc-cd-sep { color: rgba(0,0,0,0.35); }

/* ── Stadium photo header inside city card ───────────────────────────── */
/* Border-top accent is now on .wc-city-card itself (set inline per card) */
.wc-city-card { border-top: 3px solid var(--border); } /* default, overridden inline */
.wc-city-card .wc-city-card-top { padding: 0; border-top: none; background: none; }

.wc-city-img {
  position: relative;
  height: 140px;
  border-radius: calc(var(--radius-md) - 3px) calc(var(--radius-md) - 3px) 0 0;
  overflow: hidden;
  background: #0d1117; /* fallback shown when photo fails to load */
}
.wc-city-img-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
  transition: opacity 0.4s;
}
.wc-city-img-overlay {
  position: absolute; inset: 0; z-index: 1;
  /* Plain gradient — universal browser support, no color-mix() */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.72) 100%
  );
}
.wc-city-img-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 14px 18px 12px;
}
/* Inside photo: all text is white */
.wc-city-img-content .wc-flag-row { margin-bottom: 6px; }
.wc-city-img-content .wc-country-label { color: rgba(255,255,255,0.85); }
.wc-city-img-content .wc-city-name  { color: #fff; font-size: 1.15rem; margin-bottom: 4px; }
.wc-city-img-content .wc-stadium-name { color: rgba(255,255,255,0.68); font-size: 0.74rem; }
.wc-city-img-content .wc-match-count-pill {
  background: rgba(255,255,255,0.15); color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* ── WC event-detail banner ─────────────────────────────────────────── */
/* TEMPORARY — remove after 2026-07-19 */
#wc-event-banner {
  background: linear-gradient(135deg,
    rgba(22,163,74,0.12) 0%,
    rgba(240,165,0,0.08) 100%);
  border-top: 1px solid rgba(34,197,94,0.18);
  border-bottom: 1px solid rgba(34,197,94,0.18);
  padding: 14px 0;
}
.wc-eb-inner {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.wc-eb-ball {
  font-size: 1.6rem; line-height: 1; flex-shrink: 0;
  animation: wcBallSpin 8s linear infinite;
}
@keyframes wcBallSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.wc-eb-text {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.wc-eb-text strong {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #4ade80;
}
.wc-eb-text span {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4;
}
.wc-eb-text em { color: var(--text-primary); font-style: normal; font-weight: 600; }
.wc-eb-link {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: var(--radius-sm);
  background: rgba(34,197,94,0.15); color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.wc-eb-link:hover {
  background: rgba(34,197,94,0.25);
  transform: translateX(2px);
}
[data-theme="light"] #wc-event-banner {
  background: linear-gradient(135deg, rgba(22,163,74,0.06) 0%, rgba(240,165,0,0.04) 100%);
  border-color: rgba(22,163,74,0.15);
}
[data-theme="light"] .wc-eb-text strong { color: #16a34a; }
[data-theme="light"] .wc-eb-link {
  background: rgba(22,163,74,0.1); color: #15803d;
  border-color: rgba(22,163,74,0.25);
}
[data-theme="light"] .wc-eb-link:hover { background: rgba(22,163,74,0.18); }

/* Responsive */
@media (max-width: 960px) {
  .wc-how-grid { grid-template-columns: 1fr 1fr; }
  .wc-how-card:last-child { grid-column: span 2; max-width: 400px; margin: 0 auto; width: 100%; }
  .wc-cities-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
}

/* Landscape phone / small tablet — two columns */
@media (max-width: 768px) and (orientation: landscape) {
  .wc-cities-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wc-city-img { height: 110px; }
  .wc-city-name { font-size: 1.1rem; }
}

/* Portrait phone */
@media (max-width: 680px) {
  .wc-how-grid { grid-template-columns: 1fr; }
  .wc-how-card:last-child { grid-column: auto; max-width: none; }
  .wc-hero-stats { gap: 16px; }
  .wc-hero-stat strong { font-size: 1.6rem; }
  .wc-hero-divider { height: 28px; }
  .wc-cities-grid { grid-template-columns: 1fr; gap: 12px; }
  .wc-country-pills { gap: 8px; }
  .wc-eb-inner { gap: 10px; }
  .wc-eb-ball { font-size: 1.3rem; }
  .wc-eb-link { width: 100%; justify-content: center; }
  .wc-city-img { height: 130px; }
  .wc-city-card-body { padding: 12px 16px; }
  .wc-city-card-footer { padding: 12px 16px; }
  .wc-match-row { gap: 8px; }
  .wc-matches-list { max-height: 200px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   World Cup event-detail banner  (#wc-event-banner)
   TEMPORARY — remove after 2026-07-19
   ═══════════════════════════════════════════════════════════════════════════ */

#wc-event-banner {
  margin-bottom: 32px;
}

/* Card wrapper */
.wc-ev-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: stretch;
}

/* Background photo */
.wc-ev-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wc-ev-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Dark gradient overlay — heavy on the left, lets photo show on the right */
.wc-ev-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.78) 45%,
    rgba(0,0,0,0.40) 100%
  );
}

/* Content area */
.wc-ev-card-body {
  position: relative;
  z-index: 1;
  padding: 30px 36px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
}

/* Top row: badge + city */
.wc-ev-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.wc-ev-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f0a500 0%, #e07b00 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.wc-ev-badge:hover { opacity: 0.9; }
.wc-ev-city-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
}

/* Stadium */
.wc-ev-stadium {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.70);
}

/* Phase note (city done / not yet open) */
.wc-ev-phase-note {
  margin: 0;
  font-size: 0.82rem;
  color: #fde68a;
  font-style: italic;
}

/* ── Countdown ── */
.wc-ev-countdown-wrap { display: flex; flex-direction: column; gap: 4px; }

.wc-ev-cd-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.wc-cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 6px 8px 4px;
}
.wc-cd-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #fbbf24;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.wc-cd-unit {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.wc-cd-sep {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  line-height: 1;
  padding-bottom: 14px;
}
.wc-ev-cd-label {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.50);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Next match box ── */
.wc-ev-next-match {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 3px solid #f0a500;
  padding-left: 12px;
}
.wc-ev-nm-round {
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbbf24;
  font-weight: 700;
}
.wc-ev-nm-teams {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.wc-ev-nm-date {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.65);
}

/* ── Footer CTAs ── */
.wc-ev-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.wc-ev-cta {
  /* inherits .btn-primary; just add sizing tweaks */
  font-size: 0.88rem;
  padding: 10px 20px;
  white-space: nowrap;
}
.wc-ev-guide-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.15s;
}
.wc-ev-guide-link:hover { color: #fff; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .wc-ev-card-body   { padding: 22px 20px; max-width: none; gap: 12px; }
  .wc-ev-card        { min-height: 260px; }
  .wc-cd-num         { font-size: 1.55rem; }
  .wc-cd-block       { min-width: 42px; padding: 5px 6px 3px; }
  .wc-cd-sep         { font-size: 1.3rem; padding-bottom: 12px; }
  .wc-ev-footer      { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wc-ev-cta         { width: 100%; text-align: center; justify-content: center; }
  /* Overlay: darker on mobile so text pops even on portrait */
  .wc-ev-card-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 100%);
  }
}
@media (max-width: 480px) {
  .wc-cd-num  { font-size: 1.35rem; }
  .wc-cd-block { min-width: 36px; }
  .wc-ev-nm-teams { font-size: 0.88rem; }
}

/* ── Generic WC promo strip (events NOT near a host city) ── */
.wc-ev-strip {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.wc-ev-strip-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wc-ev-strip-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.wc-ev-strip-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.70) 60%, rgba(0,0,0,0.50) 100%);
}
.wc-ev-strip-body {
  position: relative; z-index: 1;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 20px; padding: 22px 28px;
  color: #fff;
}
.wc-ev-strip-left {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1 1 200px;
}
.wc-ev-strip-tagline {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.75);
}
.wc-ev-strip-cd {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
}
.wc-ev-strip-cta {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 10px 18px;
}

@media (max-width: 600px) {
  .wc-ev-strip-body { padding: 18px 16px; gap: 14px; }
  .wc-ev-strip-cta  { width: 100%; text-align: center; }
  .wc-ev-strip-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 100%);
  }
}

/* Landscape phones — reduce heights so banner fits the viewport */
@media (orientation: landscape) and (max-height: 500px) {
  .wc-ev-card         { min-height: 200px; }
  .wc-ev-card-body    { padding: 16px 20px; gap: 10px; }
  .wc-ev-cd-row       { gap: 5px; }
  .wc-cd-block        { min-width: 38px; padding: 4px 5px 3px; }
  .wc-cd-num          { font-size: 1.3rem; }
  .wc-cd-sep          { font-size: 1.2rem; padding-bottom: 10px; }
  .wc-ev-strip-body   { padding: 14px 20px; gap: 12px; }
  .wc-ev-strip-cta    { padding: 8px 14px; font-size: 0.82rem; }
}

/* ── Post-countdown live message ── */
.wc-ev-live-msg {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.01em;
}
@media (max-width: 480px) { .wc-ev-live-msg { font-size: 0.88rem; } }

/* ── World Cup fan guide page countdown ── */
.wc-page-cd {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}
.wc-page-cd .wc-ev-cd-row { align-items: flex-end; }
.wc-page-cd-label {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.50);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wc-page-live-msg {
  margin: 0 0 28px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.01em;
}
@media (max-width: 480px) {
  .wc-page-cd-label   { font-size: 0.68rem; }
  .wc-page-live-msg   { font-size: 0.9rem; }
}
