:root {
  --bg: #141a33;
  --panel: #1f2a3e;
  --card: #29364b;
  --card-top: #314158;
  --yellow: #ffcc00;
  --text: #ffffff;
  --muted: #c8d2e2;
  --border: rgba(255, 255, 255, .1);
  --green: #4ade80;
  --red: #f87171;
  --shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}
button, input, select { font: inherit; }
a { color: var(--yellow); }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #000;
}
.skip-link:focus { left: 8px; }

.site-header { padding: 18px 0 10px; }
.brand { display: flex; justify-content: center; align-items: center; }
.brand img {
  width: 327px;
  max-width: min(82vw, 327px);
  max-height: 150px;
  object-fit: contain;
}
.main-nav { display: flex; justify-content: center; margin-top: 14px; }
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 12px 24px;
  list-style: none;
  background: #222;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}
.main-nav a {
  color: #fff;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .015em;
  text-decoration: none;
}
.main-nav a:hover, .main-nav .current a { color: var(--yellow); }

.events-main { padding-block: 26px 64px; }
.events-heading { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .15em;
}
.events-heading h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.4rem);
  line-height: 1.02;
}
.events-heading > p:last-child {
  max-width: 660px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.events-workspace { min-width: 0; }
.status-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.status-tabs button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.status-tabs button:hover { border-color: rgba(255, 204, 0, .5); color: #fff; }
.status-tabs button[aria-selected="true"] { background: var(--yellow); color: #111; border-color: var(--yellow); }
.tab-dot, .status-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.tab-dot.active { background: var(--green); }
.tab-dot.upcoming { background: var(--yellow); box-shadow: 0 0 0 2px rgba(0, 0, 0, .18); }

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(2, minmax(170px, .65fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(31, 42, 62, .72);
}
.filters label { display: block; min-width: 0; }
.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.filters input, .filters select {
  width: 100%;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: #f0f2f5;
  color: #111827;
}
.filters input:focus, .filters select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(255, 204, 0, .78);
  outline-offset: 2px;
}
.results-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 2px;
  color: var(--muted);
  font-size: .86rem;
}
.results-bar p { margin: 0; }

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.event-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.event-card:hover { transform: translateY(-4px); border-color: rgba(255, 204, 0, .42); }
.event-image-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #10182a;
}
.event-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-image[hidden] { display: none; }
.event-image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 3rem;
}
.event-card-body { padding: 18px; }
.event-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.event-type {
  color: var(--yellow);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.event-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 800;
  white-space: nowrap;
}
.event-card[data-state="active"] .status-dot { background: var(--green); }
.event-card[data-state="upcoming"] .status-dot { background: var(--yellow); }
.event-card[data-state="ended"] .status-dot { background: var(--red); }
.event-title { margin: 9px 0 0; font-size: 1.24rem; line-height: 1.25; }
.event-title a { color: #fff; text-decoration: none; }
.event-title a:hover { color: var(--yellow); }
.event-countdown {
  min-height: 24px;
  margin: 9px 0 0;
  color: #fff;
  font-size: .92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.event-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.event-dates dt { color: var(--muted); font-size: .72rem; }
.event-dates dd { margin: 2px 0 0; color: #fff; font-size: .82rem; line-height: 1.35; }
.event-region-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 13px;
  color: var(--muted);
  font-size: .76rem;
}
.event-region::before { content: "📍 "; }
.event-time-note::before { content: "🕒 "; }
.event-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .87rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.event-excerpt:empty { display: none; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.event-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 900;
  text-decoration: none;
}
.primary-action { background: var(--yellow); color: #111; }
.primary-action:hover { background: #ffe066; color: #111; }
.secondary-action { border: 1px solid rgba(255, 255, 255, .23); color: #fff; }
.secondary-action:hover { border-color: var(--yellow); color: var(--yellow); }
.event-actions a[hidden] { display: none; }

.loading-card {
  min-height: 390px;
  border-radius: 18px;
  background: linear-gradient(105deg, #202c41 20%, #2d3b51 38%, #202c41 56%);
  background-size: 200% 100%;
  animation: loading 1.2s linear infinite;
}
@keyframes loading { to { background-position-x: -200%; } }
.empty-state {
  padding: 48px 22px;
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: 18px;
  text-align: center;
  background: rgba(31, 42, 62, .55);
}
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--muted); }
.empty-state button {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--yellow);
  color: #111;
  cursor: pointer;
  font-weight: 900;
}
.site-footer {
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}
.site-footer p { margin: 4px 0; }

@media (max-width: 900px) {
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1120px); }
  .site-header { padding-top: 10px; }
  .brand img { width: 250px; }
  .main-nav ul { gap: 7px 14px; padding: 11px 15px; border-radius: 18px; }
  .main-nav a { font-size: .78rem; }
  .events-main { padding-top: 18px; }
  .events-heading { margin-bottom: 22px; }
  .events-heading h1 { font-size: clamp(2.15rem, 12vw, 3.3rem); }
  .status-tabs { justify-content: flex-start; padding-bottom: 4px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .results-bar { flex-direction: column; gap: 3px; }
  .events-grid { grid-template-columns: 1fr; }
  .event-card { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: #111;
  background: #ffcc00;
  border-color: #ffcc00;
  transform: translateY(-2px);
}
