/* Gemeinde Kummerfeld – schlankes Stylesheet, nur Systemschriften */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

a { color: #1a4f8b; }
a:hover, a:focus { color: #c8102e; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Kopf */
header { text-align: center; padding: 14px 0 0; }
.logo img { height: 118px; width: auto; display: inline-block; }
nav ul {
  list-style: none; margin: 8px 0 0; padding: 0 0 18px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 30px;
}
nav a { font-size: 22px; color: #000; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus, nav a[aria-current="page"] { border-bottom-color: #c8102e; color: #000; }

/* Menü-Schalter, Suche */
header { position: relative; }
.kopf { position: relative; }
.burger { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.suche { display: flex; gap: 6px; justify-content: center; }
.suche input, .suchseite input {
  font: inherit; font-size: 16px; padding: 7px 10px; border: 1px solid #999; border-radius: 4px; background: #fff; color: #222; min-width: 0;
}
.suche button, .suchseite button {
  font: inherit; font-size: 16px; padding: 7px 14px; border: 1px solid #54595f; border-radius: 4px; background: #54595f; color: #fff; cursor: pointer;
}
.suche button:hover, .suchseite button:hover { background: #c8102e; border-color: #c8102e; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #1a4f8b; outline-offset: 2px; }
.suchseite { display: flex; gap: 8px; margin: 0 0 20px; }
.suchseite input { flex: 1; max-width: 460px; }
.treffer { margin: 0 0 16px; border: 1px solid #ccc; border-radius: 3px; padding: 12px 16px; background: #fff; }
.treffer h2 { font-size: 20px; margin: 0 0 6px; }
.snippet { margin: 0 0 6px; color: #444; }
mark { background: #ffe58a; color: inherit; padding: 0 1px; }
.suchinfo { font-weight: bold; }

@media (min-width: 601px) {
  .suche { position: absolute; top: 18px; right: 20px; }
  .suche input { width: 190px; }
}

/* RSS-Reader */
.feed { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.feed li { background: #fff; border: 1px solid #ccc; border-radius: 3px; padding: 12px 14px; min-width: 0; }
.feed time { display: block; font-size: 14px; color: #666; margin-bottom: 4px; }
.feed h3 { font-size: 18px; margin: 0 0 6px; overflow-wrap: anywhere; }
.feed p { margin: 0; font-size: 15px; color: #444; }
.feed-hinweis { color: #555; font-style: italic; }
.feed-links { margin-top: 6px; }
@media (min-width: 700px) { .feed { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .feed { grid-template-columns: 1fr 1fr 1fr; } }

/* Foto-Karussell */
.karussell { position: relative; background: #222; border-radius: 3px; overflow: hidden; }
.spur { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.js .spur { scrollbar-width: none; }
.js .spur::-webkit-scrollbar { display: none; }
.folie { flex: 0 0 100%; scroll-snap-align: start; position: relative; margin: 0; }
.folie img { display: block; width: 100%; height: clamp(220px, 46vw, 520px); object-fit: cover; margin: 0; background: #444; }
.folie figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; }
.pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font: inherit; font-size: 30px; line-height: 1; padding: 0 0 4px; cursor: pointer; }
.pfeil:hover, .pfeil:focus-visible { background: #c8102e; }
.pfeil-zurueck { left: 10px; }
.pfeil-weiter { right: 10px; }
.leiste { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: #333; color: #fff; font-size: 15px; }
.abspiel { font: inherit; font-size: 15px; background: transparent; color: #fff; border: 1px solid #aaa; border-radius: 4px; padding: 4px 12px; cursor: pointer; }
.abspiel:hover { background: #c8102e; border-color: #c8102e; }
.karussell a:focus-visible, .karussell button:focus-visible, .spur:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* Ausgeblendetes (Veranstaltungen/Termine nach Ablauf) */
[hidden] { display: none !important; }

/* Kalender */
.monat h3 { margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #ccc; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: #c8102e; }
#kalender .monat:first-of-type h3 { margin-top: 10px; }
.termine { list-style: none; margin: 0 0 4px; padding: 0; }
.termine li { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px dotted #ccc; }
.termine li:last-child { border-bottom: 0; }
.termine time { flex: none; min-width: 56px; padding: 4px 6px 5px; text-align: center; line-height: 1.1; background: #f3f3f3; border: 1px solid #ccc; border-top: 3px solid #c8102e; border-radius: 3px; }
.termine .tag { display: block; font-size: 21px; font-weight: bold; color: #222; white-space: nowrap; }
.termine .wt { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #666; }
.termine .was { min-width: 0; overflow-wrap: anywhere; }
.keine-eintraege { color: #555; font-style: italic; }

/* Startseite: Blöcke fließen automatisch in zwei Spalten */
.spalten > section.block { break-inside: avoid; }
@media (min-width: 800px) { .spalten { columns: 2; column-gap: 48px; margin-bottom: 22px; } }

/* Inhalt */
.band { background: #e6e6e6; padding: 24px 0 20px; }
/* Beiträge: dünner grauer Rahmen */
main > .wrap { padding-top: 22px; padding-bottom: 6px; }
section.block { border: 1px solid #ccc; border-radius: 3px; padding: 20px 22px; margin: 0 0 22px; background: #fff; }
section.block.ohne-rahmen { border: 0; border-radius: 0; padding: 0; margin: 0 0 22px; }
section.block > :first-child, section.block .cols > div > :first-child { margin-top: 0; }
section.block > :last-child { margin-bottom: 0; }
h1, h2, h3 { line-height: 1.25; color: #222; }
h1 { font-size: 32px; margin: 0 0 16px; }
h2 { font-size: 28px; margin: 0 0 14px; }
h3 { font-size: 20px; margin: 22px 0 8px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
hr { border: 0; border-top: 1px solid #ccc; margin: 20px 0; }

.hinweis { background: #f3f3f3; border-left: 4px solid #c8102e; padding: 10px 14px; margin: 18px 0; }
.card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.card img { width: 160px; }
.zentriert { text-align: center; }

table { border-collapse: collapse; width: 100%; margin: 10px 0 18px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #ccc; vertical-align: top; }
th { background: #e6e6e6; }

.vereine { columns: 2 320px; column-gap: 40px; list-style: none; padding: 0; }
.vereine li { break-inside: avoid; padding: 3px 0; }

/* Fuß */
footer { background: #e6e6e6; margin-top: 30px; padding: 22px 0; text-align: center; font-size: 14px; }
footer img { height: 70px; width: auto; display: block; margin: 0 auto 8px; }

/* Zwei Spalten ab Tablet-Breite, darunter untereinander */
.cols { display: block; }
.cols > section { min-width: 0; }
.cols img { display: block; margin: 0 0 14px; }
.cols .zentriert img { margin-left: auto; margin-right: auto; }
.cols-titel { margin-top: 22px; }

@media (min-width: 800px) {
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
  .cols-3 { grid-template-columns: 1fr 1fr 1fr; gap: 0 32px; }
  .cols .vereine { columns: 1; }
}

/* Handy: kompaktes Menü, kleinere Überschriften */
@media (max-width: 600px) {
  body { font-size: 17px; }
  header { padding-top: 10px; }
  .logo img { height: 84px; }
  .kopf { min-height: 92px; display: flex; align-items: center; justify-content: center; }
  .js .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; padding: 0 11px; background: #fff; border: 1px solid #999; border-radius: 6px; cursor: pointer;
  }
  .burger span { display: block; height: 3px; background: #222; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .js #menu { display: none; }
  .js #menu.offen { display: block; }
  nav ul { display: block; margin: 6px 0 0; padding: 0; border-top: 1px solid #ddd; }
  nav li { border-bottom: 1px solid #ddd; }
  nav a { display: block; font-size: 18px; padding: 13px 16px; border-bottom: 0; text-align: left; }
  nav a:hover, nav a:focus { background: #eee; }
  nav a[aria-current="page"] { background: #54595f; color: #fff; }
  .suche { padding: 14px 16px; }
  .suche input { flex: 1; }
  .suchseite { flex-wrap: wrap; }
  .suchseite input { max-width: none; }
  h1 { font-size: clamp(22px, 6.2vw, 26px); }
  h2 { font-size: clamp(20px, 5.6vw, 23px); }
  h3 { font-size: 18px; }
  .band { padding: 18px 0 12px; }
  main > .wrap { padding-top: 16px; }
  section.block { padding: 14px; margin-bottom: 16px; }
  section.block.ohne-rahmen { padding: 0; }
  .treffer { padding: 10px 12px; }
  .card img { width: 120px; }
  .pfeil { width: 40px; height: 40px; font-size: 26px; }
  .folie figcaption { font-size: 15px; padding: 6px 12px; }
  table, th, td { font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
