/* ABOUTME: Branded, JS-free stylesheet for the server-rendered content/landing pages. */
/* ABOUTME: Reuses the SwipeInspire SPA design tokens (frontend/src/assets/base.css) for an editorial layout. */

:root {
  --color-brand: #667eea;
  --color-brand-dark: #5a6fd6;
  --color-brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --color-text: #2c3e50;
  --color-text-soft: #5b6776;
  --color-text-muted: #8a93a0;
  --color-heading: #2c3e50;
  --color-background: #ffffff;
  --color-background-soft: #f8f8f8;
  --color-border: rgba(60, 60, 60, 0.12);
  --color-free: #2d5a2d;
  --color-free-bg: #e8f5e8;
  --card-radius: 12px;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --content-width: 760px;
  --font-stack: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background-soft);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-brand-dark); }

/* ---- Site header / footer (branded chrome) ---- */
.site-header {
  background: var(--color-brand-gradient);
  color: #fff;
}
.site-header-inner,
.site-footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-wordmark {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}
/* The header brand is the app's logo image, sized to match the SPA header. */
.site-logo { height: 40px; width: auto; display: block; }
.site-header-cta {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  transition: background 0.2s ease;
}
.site-header-cta:hover { background: rgba(255, 255, 255, 0.16); }

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}
.site-footer-inner { flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.site-footer-tagline { margin: 0; color: var(--color-text-soft); font-size: 14px; }
.site-footer-link { font-weight: 600; color: var(--color-brand-dark); text-decoration: none; }
.site-footer-link:hover { text-decoration: underline; }

/* ---- Editorial column ---- */
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px 20px 8px;
  background: var(--color-background-soft);
}
.content h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-heading);
  margin: 8px 0 16px;
  letter-spacing: -0.01em;
}
.intro {
  font-size: 17px;
  color: var(--color-text-soft);
  margin: 0 0 28px;
}
/* Takes the intro's place when the page's dated programme is thin. A plain note,
   not a warning: the page below it is still useful, just smaller than the heading
   implies. Same box as .cta, set off by a brand rule rather than a colour wash. */
.notice {
  font-size: 17px;
  color: var(--color-text-soft);
  margin: 0 0 28px;
  padding: 16px 20px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-brand);
  border-radius: var(--card-radius);
}

/* ---- Result tiers (visually distinct) ---- */
.tier { margin: 0 0 36px; }
.tier-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--color-brand);
}
/* The wider-radius tail reads as secondary to the genuinely-local core. */
.tier-nearby .tier-heading {
  color: var(--color-text-soft);
  border-bottom-color: var(--color-border);
}

/* ---- Age bands within a tier ---- */
.age-band { margin: 20px 0 0; }
.age-band-heading {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand-dark);
  margin: 0 0 12px;
}
.age-band-more .age-band-heading { color: var(--color-text-muted); }

/* ---- Day sections (roundup pages group by day, not by tier/age) ---- */
.day-section { margin: 0 0 36px; }
.day-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--color-brand);
}
/* The trailing catch-all (ongoing + all-window events) reads as secondary to the days. */
.day-section-anytime .day-heading {
  color: var(--color-text-soft);
  border-bottom-color: var(--color-border);
}

/* ---- Related page families (roundup <-> school holidays interlink) ---- */
.related { margin: 0 0 28px; }
.related-heading {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand-dark);
  margin: 0 0 12px;
}
.related ul { margin: 0; padding: 0 0 0 18px; }
.related li { margin: 0 0 6px; }

/* ---- Event entries (editorial list, not a grid) ---- */
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 14px 16px;
}
/* Thumbnail: same-origin cached images mostly; the gradient cushions a slow/failed
   load so the row never collapses to a bare broken-image icon. */
.event-thumb {
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--color-brand-gradient);
}
/* min-width:0 lets long titles wrap instead of stretching the flex row. */
.event-body { flex: 1 1 auto; min-width: 0; }
.event-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}
.event-title a { color: var(--color-heading); text-decoration: none; }
.event-title a:hover { color: var(--color-brand-dark); text-decoration: underline; }

.event-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--color-text-soft);
}
.event-meta .when { font-weight: 600; color: var(--color-text); }
/* Inline accent text next to the date (mirrors the app's "+N more dates" link
   style), deliberately not a pill so it reads as a continuation of the when line
   rather than a chip like the ages tag. */
.event-meta .more-dates {
  font-weight: 600;
  color: var(--color-brand);
}
.event-meta .ages {
  font-weight: 500;
  color: var(--color-brand-dark);
  background: rgba(102, 126, 234, 0.1);
  padding: 1px 9px;
  border-radius: 10px;
}
/* The source/feed line always sits on its own row (never sharing a line with the
   venue), so the event's address and its feed attribution stay visually distinct. */
.event-meta .provider { flex-basis: 100%; }
.event-meta .provider a { color: var(--color-text-soft); text-decoration: none; }
.event-meta .provider a:hover { text-decoration: underline; }
.event-meta .cost {
  font-weight: 500;
  background: #f0f0f0;
  color: var(--color-text-soft);
  padding: 1px 9px;
  border-radius: 10px;
}
.event-meta .cost-free { color: var(--color-free); background: var(--color-free-bg); }

/* Free is the top scan target on a roundup, so it rides beside the title rather than
   sitting in the meta row where the cost pill lives. */
.free-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-free);
  background: var(--color-free-bg);
  padding: 1px 9px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ---- Per-section "show more" (native <details>, no JS) ---- */
/* The first couple of events show up-front; the rest fold into this disclosure so
   the page stays short and light while the full set remains in the crawlable HTML. */
.band-more { margin: 12px 0 0; }
.band-more > summary {
  display: inline-block;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brand-dark);
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  list-style: none;
}
.band-more > summary::-webkit-details-marker { display: none; }
.band-more > summary::before { content: "▸ "; }
.band-more[open] > summary::before { content: "▾ "; }
.band-more > summary:hover { background: var(--color-background); }
/* Spacing between the summary and the revealed list once expanded. */
.band-more[open] > .events { margin-top: 12px; }
.band-more-app { margin: 12px 0 0; }

/* ---- Call to action ---- */
.cta {
  margin: 32px 0 0;
  padding: 20px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  color: var(--color-text-soft);
  font-size: 15px;
}
.cta-button {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--color-brand);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.cta-button:hover { background: var(--color-brand-dark); }
/* Outlined variant for the footer CTA — mirrors the header's ghost button, with
   brand-coloured border/text so it reads on the light call-to-action card. */
.cta-button-outline {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brand-dark);
  background: transparent;
  border: 1px solid var(--color-brand);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.cta-button-outline:hover { background: rgba(102, 126, 234, 0.1); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .content { padding: 20px 16px 8px; }
  .content h1 { font-size: 25px; }
  .intro { font-size: 16px; }
  .tier-heading { font-size: 20px; }
  .site-header-inner, .site-footer-inner { padding-left: 16px; padding-right: 16px; }
  .site-logo { height: 32px; }
  .event { gap: 12px; }
  .event-thumb { width: 76px; height: 76px; }
}
