/* ==========================================================================
   SSV Nübbel — Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Fonts — self-hosted (DSGVO/GDPR: no request to fonts.googleapis.com).
      Both are variable fonts; one file per family covers every weight we
      use via the font-weight range below, so the browser interpolates
      instead of loading a separate file per weight.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-var.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-var.woff2') format('woff2-variations');
}

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Club colors */
  --green:       #1f8921;
  --green-dark:  #176818;
  --green-soft:  #e8f3e8;
  --green-tint:  #f3f8f3;
  --black:       #0a0a0a;
  --ink:         #0a0a0a;
  --ink-2:       #2a2a2a;
  --muted:       #6a6a6a;
  --line:        #e6e6e3;
  --line-2:      #efefec;
  --bg:          #f7f7f4;
  --card:        #ffffff;
  --warn:        #c2541a;

  /* Override Astra's own palette variables → club colours.
     Astra components use --ast-global-color-* internally, so these
     must be set here to beat the inline CSS Astra generates. */
  --ast-global-color-0: #1f8921;
  --ast-global-color-1: #176818;
  --ast-global-color-2: #0a0a0a;
  --ast-global-color-3: #2a2a2a;
  --ast-global-color-4: #ffffff;
  --ast-global-color-5: #f7f7f4;
  --ast-global-color-6: #6a6a6a;
  --ast-global-color-7: #e6e6e3;
  --ast-global-color-8: #0a0a0a;

  /* Layout */
  --container-w: 1240px;
  --container-px: 28px;
  --section-py: 92px;
  --radius: 14px;
  --radius-pill: 999px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);

  /* Typography */
  --font-heading: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* keeps anchors visible below sticky header */
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  margin-top: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.015em;
}
h4 { font-size: 18px; }

p { margin-top: 0; }

.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-2);
  line-height: 1.6;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* Eyebrow label (e.g. "Sportangebote" above a section heading) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
}

/* Offset anchor-jump targets so the sticky header doesn't cover them */
#termine, #aktuelles { scroll-margin-top: 76px; }
.section--white { background: var(--card); }
.section--bg    { background: var(--bg); }
.section--tint  { background: var(--green-tint); }
.section--dark  {
  background: var(--black);
  color: #fff;
}

/* Max readable measure for text columns */
.prose { max-width: 62ch; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
  text-decoration: none;
}
.btn .arrow { transition: transform 0.18s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Primary */
.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}

/* Small variant */
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* --------------------------------------------------------------------------
   6. Club stripes
   -------------------------------------------------------------------------- */
.club-stripes {
  display: flex;
  height: 3px;
  width: 100%;
}
.club-stripes span { flex: 1; }
.club-stripes span:nth-child(1) { background: var(--green); }
.club-stripes span:nth-child(2) { background: #fff; }
.club-stripes span:nth-child(3) { background: var(--green); }

.club-stripes.thick { height: 6px; }

.club-stripes.vertical {
  flex-direction: column;
  height: auto;
  width: 3px;
}
.club-stripes.vertical.thick { width: 6px; }

/* --------------------------------------------------------------------------
   7. Filter chips
   -------------------------------------------------------------------------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.chip,
.filter-chip {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.chip:hover,
.chip.active,
.chip[aria-pressed="true"],
.filter-chip:hover,
.filter-chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* --------------------------------------------------------------------------
   8. Cards — shared base
   -------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Media placeholder inside a card (4:3) */
.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--green);
  overflow: hidden;
  position: relative;
  padding: 20px;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-body { padding: 20px 22px 22px; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   9. Sport card
   -------------------------------------------------------------------------- */
.sport-card { display: flex; flex-direction: column; }

.sport-card .card-dept {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.sport-card h3 { margin-bottom: 8px; }

/* Reserve space for a two-line title so 1- and 2-line dept/sport names
   still line up (count text, footer) across the same row. */
.dept-card h3 { line-height: 1.2; min-height: 2.4em; }
.sport-card .card-short {
  font-size: 15px;
  color: var(--ink-2);
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.sport-card .card-footer .next-session { color: var(--muted); }
.sport-card .card-footer .card-link {
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}
/* Stretch the link to cover the whole card — whole card becomes clickable */
.sport-card .card-footer .card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.sport-card:hover .card-link { gap: 7px; }

/* Grid for sport cards */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* --------------------------------------------------------------------------
   10. Termin card (event)
   -------------------------------------------------------------------------- */
.event-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}

.event-card .date-chip {
  flex-shrink: 0;
  width: 54px;
  text-align: center;
  background: var(--green-tint);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
}
.event-card .date-chip .day {
  display: block;
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--green);
  line-height: 1;
}
.event-card .date-chip .month {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.event-card .event-body { flex: 1; min-width: 0; }
.event-card .event-title { font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.event-card .event-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.event-card .event-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   11. News card
   -------------------------------------------------------------------------- */
.news-card .card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.news-card .card-category {
  color: var(--green);
  font-weight: 600;
}
.news-card h3 { margin-bottom: 8px; }
.news-card .card-excerpt {
  font-size: 15px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   12. Stat / info row
   -------------------------------------------------------------------------- */
.stat-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.stat-item {}
.stat-item .stat-value {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   13. Est. badge / pill
   -------------------------------------------------------------------------- */
.est-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--black);
  color: #fff;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   14. Header
   -------------------------------------------------------------------------- */
#masthead,
.site-header,
.ast-primary-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 244, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

/* When WP admin bar is visible (logged-in users only), sit below it */
.admin-bar #masthead,
.admin-bar .site-header,
.admin-bar .ast-primary-header-bar {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar #masthead,
  .admin-bar .site-header,
  .admin-bar .ast-primary-header-bar {
    top: 46px;
  }
}

/* JS adds this class after scroll > 8px */
#masthead.scrolled,
.site-header.scrolled {
  border-bottom-color: var(--line);
}

/* Reduce Astra's default 80px header height */
.ast-primary-header-bar,
.ast-primary-header-bar .site-primary-header-wrap {
  min-height: 60px !important;
}
.ast-primary-header-bar .main-header-menu > .menu-item {
  line-height: 60px !important;
}

/* Club stripe directly under the header */
.header-stripe {
  display: flex;
  height: 3px;
  width: 100%;
  margin-bottom: 4px;
}
.header-stripe span { flex: 1; }
.header-stripe span:nth-child(1) { background: var(--green); }
.header-stripe span:nth-child(2) { background: #fff; }
.header-stripe span:nth-child(3) { background: var(--green); }

/* Nav typography */
.main-navigation a,
.main-header-menu > li > a {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
#primary-site-navigation-desktop .main-header-menu > li > a.menu-link {
  position: relative;
  z-index: 0;
  transition: color 0.18s;
}
#primary-site-navigation-desktop .main-header-menu > li > a.menu-link::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  background: var(--green);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: -1;
}
#primary-site-navigation-desktop .main-header-menu > li > a.menu-link:hover {
  color: #fff !important;
}
#primary-site-navigation-desktop .main-header-menu > li > a.menu-link:hover::before {
  opacity: 1;
}

/* Sub-menu hover highlight */
#primary-site-navigation-desktop .sub-menu a.menu-link {
  display: block !important;
  margin: 2px 6px !important;
  padding: 6px 10px !important;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
#primary-site-navigation-desktop .sub-menu a.menu-link:hover {
  background: var(--green) !important;
  color: #fff !important;
}

/* "Mitglied werden" pill button in nav */
.menu-item-mitglied > a {
  background: var(--green) !important;
  color: #fff !important;
  border-radius: var(--radius-pill) !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  transition: background 0.18s !important;
}
.menu-item-mitglied > a:hover {
  background: var(--green-dark) !important;
}

/* --------------------------------------------------------------------------
   14b. Aktuelles-Ticker (homepage, cross-fading line)
   -------------------------------------------------------------------------- */
.ssv-ticker { position: relative; z-index: 5; background: var(--green-tint); border-bottom: 1px solid var(--line); font-size: 14px; }
.ssv-ticker__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
}
.ssv-ticker__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: ssv-ticker-pulse 2.4s ease-in-out infinite;
}
@keyframes ssv-ticker-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.ssv-ticker__fade-list {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 1.4em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ssv-ticker__fade-list li {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.6s ease;
}
.ssv-ticker__fade-list li.is-active { opacity: 1; }
.ssv-ticker__fade-list li a {
  display: block;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ssv-ticker__fade-list li a:hover { color: var(--green-dark); text-decoration: underline; }

@media (max-width: 700px) {
  .ssv-ticker__inner { flex-wrap: wrap; row-gap: 6px; }
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.site-footer,
#colophon {
  background: var(--black);
  color: rgba(255,255,255,0.75);
  font-size: 15px;
}
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }

/* Gradient bar at top edge of footer */
.footer-stripe {
  height: 4px;
  background: linear-gradient(to right, var(--green) 33.33%, #fff 33.33%, #fff 66.66%, var(--green) 66.66%);
}

.footer-logo { display: block; margin-bottom: 12px; }
.footer-brand .site-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.footer-brand .site-blurb {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  max-width: 28ch;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-block: 56px 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { font-size: 14px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.75); }
.footer-legal { display: flex; gap: 20px; }

/* --------------------------------------------------------------------------
   16. Page header (inner pages breadcrumb + title area)
   -------------------------------------------------------------------------- */
.page-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding-block: 48px 44px;
}
.page-header .breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.page-header .breadcrumb a { color: var(--muted); }
.page-header .breadcrumb a:hover { color: var(--ink); }
.page-header .breadcrumb .sep { opacity: 0.4; }

/* --------------------------------------------------------------------------
   17. Single sport page
   -------------------------------------------------------------------------- */
.sport-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.sport-aside .aside-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sport-aside .aside-card .aside-header {
  padding: 18px 22px;
  background: var(--green-tint);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.sport-aside .aside-card .aside-body { padding: 20px 22px; }

/* Info list (Für wen / Wo / Beitrag) */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  flex-direction: column;
  padding-block: 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.info-list li:last-child { border-bottom: none; }
.info-list .info-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.info-list .info-value { color: var(--ink-2); }

/* Contact card */
.contact-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.contact-card .contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--green-dark);
  flex-shrink: 0;
}
.contact-card .contact-info { margin-top: 12px; }
.contact-card .contact-name { font-weight: 600; color: var(--ink); }
.contact-card .contact-role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.contact-card .contact-links { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Training schedule (in aside "Auf einen Blick" card) */
.info-schedule { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.info-schedule > .info-label { display: block; margin-bottom: 8px; }
.schedule-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.schedule-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding-block: 6px;
  color: var(--ink-2);
}
.schedule-list .schedule-day { font-weight: 600; color: var(--ink); }
.schedule-list .schedule-group { color: var(--muted); }
.schedule-list .schedule-group::before { content: "· "; }

/* Sport main column */
.sport-main { min-width: 0; }

.sport-media { margin-bottom: 36px; border-radius: var(--radius); overflow: hidden; width: fit-content; max-width: 100%; }
.sport-media__img { width: auto; max-width: 100%; height: auto; display: block; contain-intrinsic-size: none; }
.sport-media__placeholder { height: 280px; background: var(--green-soft); }

.sport-section-heading { font-size: 20px; margin: 36px 0 14px; }
.sport-description { color: var(--ink-2); line-height: 1.75; white-space: pre-line; }
.sport-freetext { margin-top: 36px; color: var(--ink-2); line-height: 1.75; }
.sport-freetext img { max-width: 100%; height: auto; border-radius: var(--radius); }

.sport-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* Sport aside stack */
.sport-aside { display: flex; flex-direction: column; gap: 0; }

/* --------------------------------------------------------------------------
   18. Tag row
   -------------------------------------------------------------------------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--line-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root {
    --section-py: 60px;
    --container-px: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding-block: 40px 28px;
  }

  .sport-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --section-py: 48px;
    --container-px: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .event-card { flex-direction: column; gap: 12px; }
  .stat-row { gap: 20px; }
}

/* --------------------------------------------------------------------------
   20. Homepage sections
   -------------------------------------------------------------------------- */

/* --- Hero --- */
.ssv-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 80px 72px;
}
.ssv-hero__labels {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.ssv-hero__pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}
.ssv-hero__accent { color: var(--green); }
.ssv-hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-block: 28px 36px;
}
.ssv-hero__stats { margin-top: 0; }
.ssv-hero__img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-soft);
  aspect-ratio: 4 / 3;
}
.ssv-hero__img-wrap .club-stripes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}
.ssv-hero__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ssv-hero__img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--green-soft);
}
.ssv-hero__stat-card {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
  z-index: 2;
}
.ssv-hero__stat-card-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--green);
  line-height: 1;
}
.ssv-hero__stat-card-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* --- Über uns --- */
.ssv-about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.ssv-about__img-placeholder {
  aspect-ratio: 4 / 3;
  background: var(--green-soft);
  border-radius: var(--radius);
}
.ssv-about__img-wrap {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
}
.ssv-about__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.ssv-calendar-embed { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.ssv-calendar-embed iframe { display: block; }

/* --- Section head (eyebrow + h2 + ghost button on same row) --- */
.ssv-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.ssv-section-head h2 { margin-bottom: 0; }
.ssv-section-head__link { flex-shrink: 0; }

/* --- Termine list --- */
.ssv-events__list { display: flex; flex-direction: column; gap: 16px; }

/* --- News grid --- */
.ssv-news__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.ssv-news__grid .news-card h3 a { color: var(--ink); }
.ssv-news__grid .news-card h3 a:hover { color: var(--green); }

/* --- Contact --- */
.ssv-contact__inner {
  max-width: 100%;
}
.ssv-contact__list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 32px;
}
.ssv-contact__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-2);
}
.ssv-contact__icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* --- Placeholder for images not yet uploaded --- */
.ssv-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: #fff;
  background-image: url("../images/logo.gif");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 84px;
}
.ssv-empty { color: var(--muted); font-style: italic; }

/* Pagination (Aktuelles-Archiv) */
.ssv-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}
.ssv-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.ssv-pagination a.page-numbers:hover { border-color: var(--green); color: var(--green-dark); }
.ssv-pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
.ssv-pagination .page-numbers.dots { border: none; }

/* --- Front page layout reset (overrides Astra's flex/sidebar wrappers) --- */
.ssv-front-page {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.ssv-front-page .site-main {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --- Homepage responsive --- */
@media (max-width: 900px) {
  .ssv-hero__inner,
  .ssv-about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 0;
  }
  .ssv-hero__inner { padding-block: 48px 40px; }
  .ssv-hero__media { order: -1; }
}

/* --------------------------------------------------------------------------
   21. Generic page content (page.php)
   -------------------------------------------------------------------------- */
.ssv-page-content {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
}
.page-id-2775 .ssv-page-content { max-width: none; }
.ssv-page-content p,
.ssv-front-page .section h2 { margin-bottom: 24px; }
.ssv-section-head h2 { margin-bottom: 0; } /* keep section-head override */
.ssv-contact__content p { margin-bottom: 1em; }

.ssv-page-content strong,
.ssv-contact__content strong { color: var(--ink); font-weight: 600; }

.ssv-page-content a,
.ssv-contact__content a { color: var(--green); }
.ssv-page-content a:hover,
.ssv-contact__content a:hover { color: var(--green-dark); }

/* --------------------------------------------------------------------------
   22. Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}
