/* Bad Saarow Brandbook & KERN UX Navigation + Startseiten-Architektur */
.bm-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  color: #222d55;
  border-bottom: 1px solid #d7dfe5;
  box-shadow: 0 2px 12px rgba(34, 45, 85, 0.05);
}

.bm-mobile-menu-cta {
  display: none !important;
}

.bm-site-header .utility {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 7px;
  font-size: 12px;
  color: #546079;
  border-bottom: 1px solid #e6edf2;
}

.bm-site-header .utility-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bm-site-header .utility-links a {
  color: #546079;
  font-weight: 600;
  text-decoration: none;
}

.bm-site-header .utility-links a:hover {
  color: #222d55;
  text-decoration: underline;
}

.bm-site-header .utility-links .utility-desk {
  color: #007992;
  font-weight: 700;
}

/* Einzeiliger Desktop-Header: Brand links | 4 Menüpunkte mittig | Suche + CTA rechts */
.bm-header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 0;
  min-height: 74px;
}

.bm-header-main .desk-brand {
  grid-column: 1;
  grid-row: 1;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-left: 0;
  padding-left: 0;
  padding-block: 4px;
  text-decoration: none !important;
}

.desk-brand-segel {
  height: 40px;
  width: auto;
  max-width: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.desk-brand-titles {
  display: flex;
  flex-direction: column;
  border-left: 3px solid #009ec4;
  padding-left: 12px;
  padding-block: 2px;
}

.bm-header-main .desk-brand strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #222d55;
}

.bm-header-main .desk-brand span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #546079;
  margin-top: 2px;
  max-width: none;
}

.bm-mega-nav {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  font-size: 15px;
  margin: 0;
}

.bm-nav-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bm-site-header .bm-header-search {
  min-height: 42px;
  padding: 8px 14px;
  border: 1.5px solid #cbd6e0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #222d55;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bm-site-header .bm-header-search:hover {
  background: #f3f8fa;
  border-color: #009ec4;
}

.bm-header-anliegen {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  background: #fbba00;
  color: #222d55;
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bm-header-anliegen:hover {
  background: #f2b200;
  box-shadow: 0 4px 12px rgba(251, 186, 0, 0.35);
}

.bm-menu-toggle {
  display: none;
  padding: 9px 13px;
  min-height: 42px;
  border: 1.5px solid #222d55;
  border-radius: 4px;
  background: #fff;
  color: #222d55;
  font-size: 14px;
  font-weight: 700;
}

/* Mega-Nav Trigger & Panels */
.bm-mega-group {
  margin: 0;
  padding: 0;
  border: 0 !important;
}

.bm-mega-group > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 25px 14px 22px;
  min-height: 74px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: #222d55;
  border-bottom: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.bm-mega-group > summary:hover {
  background: #f4f9fb;
  color: #007992;
}

.bm-mega-group > summary::-webkit-details-marker {
  display: none;
}

.bm-menu-chevron {
  width: 7px;
  height: 7px;
  display: block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin: 0 2px 3px;
  transition: transform 0.15s ease;
}

.bm-mega-group[open] > summary {
  border-bottom-color: #fbba00;
  background: #f1f7f9;
  color: #222d55;
}

.bm-mega-group[open] .bm-menu-chevron {
  transform: rotate(225deg);
  margin-top: 5px;
}

.bm-section-current > summary {
  border-bottom-color: #009ec4;
}

.bm-mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #e1e8ed;
  border-bottom: 4px solid #009ec4;
  box-shadow: 0 20px 38px rgba(34, 45, 85, 0.16);
  max-height: 75vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.bm-mega-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 28px;
  padding-block: 24px 28px;
}

.bm-mega-column h2,
.bm-mega-spotlight h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5edf2;
  color: #222d55;
}

.bm-mega-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.bm-mega-column li {
  padding: 0;
  margin: 0;
}

.bm-mega-column a {
  display: block;
  padding: 9px 12px;
  border-radius: 5px;
  color: #222d55;
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.bm-mega-column strong,
.bm-mega-column span {
  display: block;
}

.bm-mega-column strong {
  font-size: 15px;
  font-weight: 700;
  color: #222d55;
}

.bm-mega-column span {
  font-size: 12.5px;
  color: #546079;
  margin-top: 2px;
  line-height: 1.4;
}

.bm-mega-column a:hover,
.bm-mega-column a[aria-current="page"] {
  background: #edf6f9;
}

.bm-mega-column a:hover strong {
  color: #007992;
}

.bm-mega-column a[aria-current="page"] {
  border-left: 3px solid #009ec4;
  padding-left: 10px;
}

.bm-mega-spotlight {
  background: #f2f8fa;
  border-top: 4px solid #fbba00;
  border-radius: 4px;
  padding: 20px 22px;
  align-self: start;
}

.bm-mega-spotlight .bm-mega-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #007992;
  margin: 0 0 8px;
}

.bm-mega-spotlight h2 {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
  font-size: 18px;
}

.bm-site-header .bm-mega-spotlight p:not(.bm-mega-kicker) {
  color: #44516e;
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.bm-mega-spotlight a {
  display: inline-flex;
  align-items: center;
  background: #222d55;
  color: #fff;
  padding: 9px 15px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  min-height: 40px;
  text-decoration: none !important;
}

.bm-mega-spotlight a:hover {
  background: #007992;
}

.bm-site-header a:focus-visible,
.bm-site-header summary:focus-visible,
.bm-site-header button:focus-visible {
  outline: 3px solid #009ec4;
  outline-offset: 3px;
}

/* Hero Enhancements */
.home-hero .button.sun {
  margin-top: 0;
  border-radius: 4px;
  padding: 15px 24px;
}

.home-hero .button.hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.home-hero .button.hero-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fbba00;
}

.hero-quicklinks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-quicklinks-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8c4dc;
  margin-right: 4px;
}

.hero-quicklinks a {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eef2f9;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hero-quicklinks a:hover {
  background: #fbba00;
  border-color: #fbba00;
  color: #222d55;
}

/* Section 1: 6er Themen-Kompass mit feinen SVG-Icons */
.bm-home-entry {
  padding-block: 56px 64px;
  border-bottom: 0;
}

.bm-entry-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.bm-entry-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin: 0;
  color: #222d55;
}

.bm-entry-heading > div > .eyebrow {
  color: #007992;
  margin-bottom: 10px;
}

.bm-entry-heading > p {
  max-width: 390px;
  font-size: 15px;
  color: #546079;
  line-height: 1.6;
  margin: 0;
}

.bm-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.bm-entry-card {
  background: #fff;
  border: 1px solid #d9e3ea;
  border-top: 4px solid #009ec4;
  border-radius: 6px;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 12px rgba(34, 45, 85, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-top-color 0.18s ease;
}

.bm-entry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(34, 45, 85, 0.09);
  border-top-color: #fbba00;
}

.bm-entry-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bm-entry-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e6f5f9;
  color: #007992;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bm-entry-icon-badge svg {
  width: 22px;
  height: 22px;
}

.bm-entry-number {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #53607a;
  font-weight: 800;
}

.bm-entry-main {
  display: block;
  color: #222d55;
  text-decoration: none !important;
}

.bm-entry-main h3 {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #222d55;
}

.bm-entry-main h3 span {
  color: #009ec4;
  font-size: 19px;
  transition: transform 0.15s ease;
}

.bm-entry-card:hover .bm-entry-main h3 span {
  transform: translateX(3px);
}

.bm-entry-main p {
  font-size: 15px;
  line-height: 1.55;
  color: #546079;
  margin: 0 0 18px;
}

.bm-entry-links {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e9eff3;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.bm-entry-links a {
  font-size: 13.5px;
  font-weight: 700;
  color: #007992;
  text-decoration: none;
}

.bm-entry-links a:hover {
  color: #222d55;
  text-decoration: underline;
}

/* Section 2: Termine & Sport Band */
.bm-home-band.bm-band-light {
  background: #f3f7f8;
  border-top: 1px solid #d7dfe5;
  border-bottom: 1px solid #d7dfe5;
  padding-block: 64px;
}

.bm-band-light .home-section-top h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin: 6px 0 0;
}

.bm-band-light .home-section-top .eyebrow {
  color: #007992;
  margin: 0;
}

.bm-band-light .upcoming-card {
  background: #fff;
  border: 1px solid #dce5ec;
  border-top: 4px solid #009ec4;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(34, 45, 85, 0.04);
}

.sport-weekend.bm-sport-band {
  margin-top: 42px;
  padding: 38px 42px;
  border-top: 5px solid #009ec4;
  border-radius: 6px;
}
.reveal-ready {
  opacity: 1 !important;
  transform: none !important;
}

.bm-sport-band h3 {
  font-size: 28px;
  margin: 6px 0 12px;
}

/* Section 3: Grußwort & Kanäle */
.welcome-channels {
  margin-top: 32px;
  display: grid;
  gap: 10px;
}

.welcome-channels a {
  display: flex;
  flex-direction: column;
  padding: 13px 16px;
  background: #f3f7f8;
  border-left: 3px solid #009ec4;
  border-radius: 0 5px 5px 0;
  text-decoration: none !important;
  transition: background 0.15s ease, border-left-color 0.15s ease;
}

.welcome-channels a:hover {
  background: #e7f2f6;
  border-left-color: #fbba00;
}

.welcome-channels strong {
  font-size: 15px;
  color: #222d55;
}

.welcome-channels span {
  font-size: 13px;
  color: #546079;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.welcome-actions .button {
  margin-top: 0;
  border-radius: 4px;
}

/* Section 4: Demokratie, Beteiligung & Förderung (3er Grid) */
.bm-civic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 52px;
}

.bm-civic-card {
  padding: 28px;
  border-radius: 6px;
  border: 1px solid #dce5ec;
  display: flex;
  flex-direction: column;
  background: #f6f9fa;
}

.bm-civic-card .eyebrow {
  margin-bottom: 8px;
  color: #546079;
}

.bm-civic-card h3 {
  font-size: 22px;
  margin: 0 0 12px;
  color: #222d55;
}

.bm-civic-card p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.6;
  color: #546079;
  margin: 0 0 22px;
}

.bm-civic-card .button {
  margin-top: auto;
  align-self: flex-start;
  border-radius: 4px;
}

.bm-civic-navy {
  border-top: 4px solid #222d55;
}

.bm-civic-gold {
  background: #fff9e6;
  border-color: #f0dfaa;
  border-top: 4px solid #fbba00;
}

.bm-civic-cyan {
  border-top: 4px solid #009ec4;
}

.bm-local-feature {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dce5ec;
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .bm-header-main {
    grid-template-columns: 1fr auto;
    padding-block: 14px 0;
    gap: 12px;
  }
  .bm-header-main .desk-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .bm-nav-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .bm-mega-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 8px;
    border-top: 1px solid #eef2f5;
  }
  .bm-mega-group > summary {
    min-height: 50px;
    padding: 13px 12px;
  }
  .bm-entry-grid,
  .bm-civic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .bm-site-header .utility > span {
    display: none;
  }
  .bm-site-header .utility {
    justify-content: flex-end;
    padding-block: 6px;
  }
  .bm-header-main {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-block: 12px;
    min-height: 0;
    gap: 10px;
  }
  .desk-brand-segel {
    height: 34px;
    max-width: 24px;
  }
  .bm-header-main .desk-brand strong {
    font-size: 19px;
  }
  .bm-header-main .desk-brand span {
    font-size: 10px;
  }
  /* Override suche.css mobile grid so header stays compact on 1 row */
  .bm-site-header .bm-nav-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .bm-site-header .bm-header-search {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 13px;
  }
  .bm-site-header .bm-header-anliegen {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .bm-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #222d55;
    background: #ffffff;
    border: 1.5px solid #222d55;
    border-radius: 4px;
    cursor: pointer;
  }
  .bm-site-header.bm-mobile-open .bm-mobile-menu-cta {
    display: block !important;
    margin: 12px 0 8px;
    padding: 12px 16px;
    background: #fbba00;
    color: #222d55;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 15px;
  }
  .bm-mega-nav {
    display: block;
    width: 100%;
    flex-basis: 100%;
    margin: 4px 0 0;
    border-top: 1px solid #d7dfe5;
    background: #ffffff;
    position: relative;
    z-index: 50;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bm-site-header:not(.bm-mobile-open) .bm-mega-nav {
    display: none;
  }
  .bm-site-header.bm-mobile-open .bm-mega-nav {
    display: block;
  }
  .bm-mega-group > summary {
    padding: 14px 6px;
    border-bottom: 1px solid #eef2f5;
    justify-content: space-between;
    min-height: 50px;
  }
  .bm-mega-group[open] > summary {
    border-left: 4px solid #fbba00;
    padding-inline: 12px;
  }
  .bm-mega-panel {
    position: static;
    max-height: none;
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .bm-mega-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px 8px 20px;
  }
  .bm-entry-heading {
    display: block;
  }
  .bm-entry-heading > p {
    margin-top: 12px;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .bm-entry-grid,
  .bm-civic-grid {
    grid-template-columns: 1fr;
  }
  .bm-site-header .bm-header-search span {
    display: none;
  }
  .bm-site-header .bm-header-search {
    padding: 8px 10px;
  }
}

.skip { z-index: 100; }
.sport-weekend > div { min-width: 0; }
.sport-weekend .sport-event { min-width: 0; overflow-wrap: anywhere; }

.bm-mega-heading {
  font-size: 15px;
  font-weight: 800;
  color: #222d55;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

/* WCAG 2.2 2.5.8 Touch Target Size (>= 24px) */
.bm-site-header .utility-links a,
.bm-site-header .utility a,
.footer-links a,
.upcoming-card a,
.bm-entry-links a {
  min-height: 24px;
  padding-block: 4px;
  display: inline-flex;
  align-items: center;
}

/* Mobile Menu Backdrop Overlay */
.bm-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(34, 45, 85, 0.45);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bm-site-header.bm-mobile-open ~ .bm-mobile-backdrop,
.bm-mobile-backdrop.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* KERN UX Card Radien (strictly 8px) */
.bm-entry-card {
  border-radius: 8px !important;
}
.bm-entry-icon-badge {
  border-radius: 8px !important;
}


@media (max-width: 640px) {
  .bm-site-header .bm-header-anliegen {
    display: none !important;
  }
  .bm-site-header .bm-header-search span {
    display: none !important;
  }
  .bm-site-header .bm-header-search {
    padding: 8px 10px !important;
  }
}

@media (max-width: 480px) {
  .bm-header-main .desk-brand {
    gap: 8px !important;
  }
  .desk-brand-segel {
    height: 32px !important;
    max-width: 20px !important;
  }
  .desk-brand-titles {
    border-left-width: 2.5px !important;
    padding-left: 8px !important;
  }
  .bm-header-main .desk-brand strong {
    font-size: 16.5px !important;
  }
  .bm-header-main .desk-brand span {
    font-size: 9px !important;
  }
}


/* Mobile Header: Segel vor Balken & striktes 1-Row Layout */
@media (max-width: 860px) {
  .bm-header-main {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-block: 10px !important;
    gap: 8px !important;
  }
  .bm-site-header .bm-header-anliegen {
    display: none !important;
  }
  .bm-site-header .bm-header-search span {
    display: none !important;
  }
  .bm-site-header .bm-header-search {
    padding: 8px 10px !important;
    min-height: 38px !important;
    font-size: 13px !important;
  }
  .bm-site-header .bm-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    min-height: 38px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  .bm-site-header .bm-nav-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 480px) {
  .bm-header-main .desk-brand {
    gap: 7px !important;
  }
  .desk-brand-segel {
    height: 30px !important;
    max-width: 18px !important;
  }
  .desk-brand-titles {
    border-left-width: 2px !important;
    padding-left: 7px !important;
  }
  .bm-header-main .desk-brand strong {
    font-size: 15.5px !important;
    white-space: nowrap !important;
  }
  .bm-header-main .desk-brand span {
    font-size: 8.5px !important;
    white-space: nowrap !important;
  }
}
