*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.site-header {
  background: #1e3a5f;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-brand {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 0.5rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-brand-pelham {
  color: #93c5fd;
}

.site-brand-lodge {
  color: #d6b48a;
}

/* ── Nav ───────────────────────────────────────────────────────────────────── */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  margin: 0.5rem 0 0.75rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a[aria-current="page"] {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.site-header p {
  margin: 0;
  opacity: 0.75;
  font-size: 1rem;
}

/* ── Grid ──────────────────────────────────────────────────────────────────── */

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.show-grid,
.attraction-grid,
.nightlife-grid,
.carpark-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Landscape mobile / portrait tablet */
@media (min-width: 640px) {
  .show-grid,
  .attraction-grid,
  .nightlife-grid,
  .carpark-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Landscape tablet / desktop */
@media (min-width: 1024px) {
  .show-grid,
  .attraction-grid,
  .nightlife-grid,
  .carpark-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Filter bar (JS-injected, invisible when JS is absent) ─────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-input {
  flex: 1;
  min-width: 14rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #111827;
}

.filter-input:focus {
  outline: 3px solid #93c5fd;
  outline-offset: 0;
  border-color: #1d4ed8;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.filter-btn:hover {
  background: #1d4ed8;
}

.filter-btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.filter-btn--clear {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.filter-btn--clear:not(:disabled):hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}

.filter-btn--clear:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Month heading ─────────────────────────────────────────────────────────── */

.month-heading {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 2px solid #e5e7eb;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */

.show-card,
.attraction-card,
.nightlife-card,
.carpark-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

/* ── Card front ────────────────────────────────────────────────────────────── */

.card-front {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.card-image--missing {
  height: 300px;
  background: #e5e7eb;
}

.card-body {
  padding: 1rem 1.25rem 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}

.card-venue {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.category-badge {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.5rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.category-badges .category-badge {
  margin-bottom: 0;
}

.card-preview {
  margin: 0 0 0.875rem;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.55;
  flex: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-date {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1d4ed8;
}

.btn-visit {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-visit:hover {
  background: #1e40af;
}

.btn-visit:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* ── Expand toggle ─────────────────────────────────────────────────────────── */

.card-details {
  border-top: 1px solid #f3f4f6;
}

.card-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 1.25rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: #1d4ed8;
  user-select: none;
  transition: background 0.1s;
}

.card-toggle::-webkit-details-marker {
  display: none;
}

.card-toggle::before {
  content: "▸";
  font-size: 0.75rem;
}

details[open] > .card-toggle::before {
  content: "▾";
}

.toggle-open {
  display: none;
}

details[open] .toggle-closed {
  display: none;
}

details[open] .toggle-open {
  display: inline;
}

.card-toggle:hover {
  background: #eff6ff;
  color: #1e40af;
}

.card-toggle:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: -2px;
}

/* ── Card back ─────────────────────────────────────────────────────────────── */

.card-back {
  padding: 0.875rem 1.25rem 1.125rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.9rem;
}

.card-description {
  margin: 0 0 0.875rem;
  color: #374151;
  line-height: 1.65;
}

.card-info {
  margin: 0 0 0.875rem;
}

.info-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.info-row dt {
  font-weight: 600;
  color: #6b7280;
  min-width: 6rem;
  flex-shrink: 0;
}

.info-row dd {
  margin: 0;
  color: #374151;
}

.card-runs {
  margin-top: 0.875rem;
}

.card-runs strong {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.card-runs ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.card-runs li {
  color: #374151;
  margin-bottom: 0.25rem;
}

.card-source {
  margin: 0.875rem 0 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.card-source a {
  color: #6b7280;
}

.card-source a:hover {
  color: #374151;
}

/* ── Homepage section grid ─────────────────────────────────────────────────── */

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-card--wide {
    grid-column: 1 / -1;
  }
}

.section-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  color: #111827;
  text-decoration: none;
  transition: box-shadow 0.15s;
}

a.section-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.section-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.section-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.section-card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.section-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.55;
  flex: 1;
}

.section-card--soon {
  opacity: 0.7;
}

.section-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 0.45rem 1rem;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.15s;
}

a.section-card:hover .section-btn {
  background: #1e40af;
}

.section-btn--soon {
  background: #9ca3af;
  cursor: default;
}

/* ── Attraction card actions ───────────────────────────────────────────────── */

.card-actions--attraction {
  flex-direction: column;
  align-items: flex-start;
}

.card-address {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
}

.card-nearby {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.4;
}

.card-location-area {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.4;
}

.card-action-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-map {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #059669;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-map:hover {
  background: #047857;
}

.btn-map:focus-visible {
  outline: 3px solid #6ee7b7;
  outline-offset: 2px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
  background: #1e3a5f;
  text-align: center;
  padding: 2rem 1.5rem;
  color: #9ca3af;
  font-size: 0.825rem;
}

/* ── Discover page ─────────────────────────────────────────────────────────── */

.discover-main {
  max-width: none;
  padding: 0;
}

/* Radio-button–driven slideshow */

.slideshow-wrapper {
  position: relative;
}

.slide-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.hero-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 240px;
  overflow: hidden;
  background: #1e3a5f;
}

.slide {
  display: none;
  position: absolute;
  inset: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
}

.slide-caption h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-caption p {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.slide-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.slide-dot:hover {
  background: #9ca3af;
  transform: scale(1.25);
}

/* Slide visibility — one rule per slide */
#slide-1:checked ~ .hero-slideshow .slide-1 { display: block; }
#slide-2:checked ~ .hero-slideshow .slide-2 { display: block; }
#slide-3:checked ~ .hero-slideshow .slide-3 { display: block; }
#slide-4:checked ~ .hero-slideshow .slide-4 { display: block; }
#slide-5:checked ~ .hero-slideshow .slide-5 { display: block; }
#slide-6:checked ~ .hero-slideshow .slide-6 { display: block; }
#slide-7:checked ~ .hero-slideshow .slide-7 { display: block; }
#slide-8:checked ~ .hero-slideshow .slide-8 { display: block; }

/* Active dot — one rule per slide */
#slide-1:checked ~ .slide-dots label[for="slide-1"],
#slide-2:checked ~ .slide-dots label[for="slide-2"],
#slide-3:checked ~ .slide-dots label[for="slide-3"],
#slide-4:checked ~ .slide-dots label[for="slide-4"],
#slide-5:checked ~ .slide-dots label[for="slide-5"],
#slide-6:checked ~ .slide-dots label[for="slide-6"],
#slide-7:checked ~ .slide-dots label[for="slide-7"],
#slide-8:checked ~ .slide-dots label[for="slide-8"] {
  background: #1e3a5f;
  transform: scale(1.25);
}
