:root {
  --navy: #0B4A94;
  --red: #D83A2E;
  --map-blue: #8FB7E8;
  --cream: #F8F3EA;
  --tile-white: #FFFDF8;
  --shadow-gray: #D6D9DE;
  --ink: #4a5a70;
  --muted: #9aa6b6;

  --font-head: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid #E4DDCF;
  padding: 40px 24px 32px;
  text-align: center;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.brand-text {
  text-align: left;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-top: 2px;
}

.brand-tagline .dot { color: var(--navy); }

.brand-line {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 17px;
  color: var(--navy);
  margin: 6px 0 0;
}

/* Filters */
.filters {
  background: var(--tile-white);
  border-bottom: 1px solid #E4DDCF;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(11,74,148,.05);
}

.filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.field-search {
  flex: 1;
  min-width: 220px;
}

.field label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field select,
.field input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--navy);
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--shadow-gray);
  background: #fff;
}

.field select:focus,
.field input:focus {
  outline: 2px solid var(--map-blue);
  outline-offset: 1px;
}

#clear-filters {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--shadow-gray);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  height: 38px;
}

#clear-filters:hover { border-color: var(--navy); }

/* Results */
.results-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}

#results-count {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.event-card {
  background: var(--tile-white);
  border: 1px solid #E4DDCF;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 22px rgba(11,74,148,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.event-date {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--red);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.event-type-pill {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--map-blue);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.event-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.3;
  margin: 0;
}

.event-meta {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
}

.event-meta strong { color: var(--navy); }

.event-spots {
  font-size: 12.5px;
  font-weight: 600;
}

.spots-active { color: #1F8A5B; }
.spots-soldout { color: var(--red); }
.spots-unknown { color: var(--muted); }

.event-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

.event-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.signup-link {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.signup-link:hover { opacity: 0.9; }

.signup-link.disabled {
  background: var(--shadow-gray);
  color: var(--muted);
  pointer-events: none;
}

/* Empty / error states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink);
}

.empty-state p { margin: 4px 0; }
.empty-sub { font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--navy);
  padding: 30px 24px;
  text-align: center;
}

.footer-inner {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.footer-tagline {
  color: var(--map-blue);
  margin-top: 6px;
}

.footer-url {
  color: var(--cream);
  margin-top: 6px;
}

.dot { color: var(--red); }

@media (max-width: 640px) {
  .brand { flex-direction: column; gap: 8px; }
  .brand-text { text-align: center; }
  .filters-inner { flex-direction: column; align-items: stretch; }
  .field { min-width: 0; }
}
