/* Gestaltung der Website calendum.ch (Aufbau aus ../ferientermine-online.de).
   Akzent- und Ferienfarben entsprechen der Kalender-Vorlage in vorlage/. */

:root {
  --tinte: #1b2430;
  --grau: #5d6875;
  --linie: #d5dbe1;
  --flaeche: #f1f4f6;
  --akzent: #b3202a;
  --akzent-dunkel: #8f1a22;
  --weiss: #ffffff;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--tinte);
  background: var(--weiss);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.innen { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--akzent-dunkel); }
a:hover { color: var(--tinte); }
a:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* --- Kopf und Fuß --- */
.seitenkopf { border-bottom: 1px solid var(--linie); }
.seitenkopf .innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.marke { font-size: 1.15rem; font-weight: 800; color: var(--tinte); text-decoration: none; }
.marke span { color: var(--akzent); }
.seitenkopf nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.95rem; }
.seitenkopf nav a { text-decoration: none; padding: 6px 0; }
.seitenkopf nav a:hover { text-decoration: underline; }

.seitenfuss { margin-top: 56px; background: var(--flaeche); font-size: 0.9rem; color: var(--grau); }
.seitenfuss .innen { padding-top: 22px; padding-bottom: 26px; }
.seitenfuss p { margin: 0 0 8px 0; }
.seitenfuss nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* --- Text --- */
main { padding-top: 22px; }
h1 { margin: 10px 0 12px 0; font-size: 2.1rem; line-height: 1.15; font-weight: 800; }
h2 { margin: 44px 0 12px 0; font-size: 1.45rem; line-height: 1.25; font-weight: 800; }
h3 { margin: 24px 0 8px 0; font-size: 1.1rem; }
p { margin: 0 0 14px 0; }
.einleitung { max-width: 760px; font-size: 1.1rem; color: #2d3948; }
.klein { font-size: 0.9rem; color: var(--grau); max-width: 820px; }
.platzhalter { padding: 14px 16px; background: #fff4d6; border-radius: 8px; }

.pfad { font-size: 0.9rem; color: var(--grau); }
.pfad span { margin: 0 8px; }

/* --- Kalenderbild und Downloads --- */
.kalender {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 26px;
}
.kalender.quer { display: block; margin-top: 0; }
.kalender h2 { margin-top: 0; }
.kalender.quer h2 { margin-top: 44px; }

.blatt { margin: 0; }
.blatt img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--linie);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(27, 36, 48, 0.10);
  background: var(--weiss);
}
.blatt figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--grau); }

.knoepfe { list-style: none; margin: 18px 0 22px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.knopf {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--akzent);
  color: var(--weiss);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.knopf:hover { background: var(--akzent-dunkel); color: var(--weiss); }
.knopf small { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 500; opacity: 0.9; }
.knopf.zweitrangig { background: var(--weiss); color: var(--akzent-dunkel); box-shadow: inset 0 0 0 2px var(--akzent); }
.knopf.zweitrangig:hover { background: var(--flaeche); color: var(--tinte); }

.legende { list-style: none; margin: 0; padding: 14px 16px; background: var(--flaeche); border-radius: 8px; font-size: 0.92rem; columns: 2; column-gap: 18px; }
.legende li { break-inside: avoid; padding: 2px 0; }

.punkt {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.5em;
  border-radius: 0.2em;
  vertical-align: baseline;
  background: #dfe3e8;
}
.punkt.ft { background: var(--tinte); border-radius: 50%; }
.punkt.k-weihnachten { background: #c9dcf2; }
.punkt.k-sport       { background: #d8d0ef; }
.punkt.k-fruehling   { background: #c9e8c4; }
.punkt.k-sommer      { background: #ffdf80; }
.punkt.k-herbst      { background: #f5c49a; }
.punkt.k-frei        { background: #dfe3e8; }

/* --- Tabellen --- */
.tabellenrahmen { overflow-x: auto; margin: 0 0 12px 0; border: 1px solid var(--linie); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); }
thead th { background: var(--flaeche); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
table.ueberblick { font-size: 0.9rem; min-width: 860px; }
table.ueberblick td { white-space: nowrap; }

/* --- Listen mit Kantonen und Kalendern --- */
.kantonsliste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kantonsliste a { display: block; padding: 8px 14px; border-radius: 999px; background: var(--flaeche); text-decoration: none; font-weight: 600; }
.kantonsliste a:hover { background: var(--linie); }

.karten { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.karte { display: block; padding: 12px; border: 1px solid var(--linie); border-radius: 10px; text-decoration: none; color: var(--tinte); }
.karte:hover { border-color: var(--akzent); box-shadow: 0 6px 18px rgba(27, 36, 48, 0.10); }
.karte img { display: block; width: 100%; height: auto; border: 1px solid var(--linie); border-radius: 4px; }
.kartentitel { display: block; margin-top: 10px; font-weight: 800; line-height: 1.25; }
.kartentext { display: block; font-size: 0.85rem; color: var(--grau); }

/* --- Sprachwechsel, Bildlinks, Druckfassung, Sprachauswahl --- */
.sprachen { font-size: 0.9rem; font-weight: 700; }
.sprachen a, .sprachen span { padding: 6px 8px; border-radius: 6px; }
.sprachen span { background: var(--flaeche); color: var(--tinte); }
.bildlinks { font-size: 0.9rem; color: var(--grau); }
.druckpaar { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.sprachwahl { list-style: none; margin: 24px 0 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sprachwahl .karte { padding: 18px; height: 100%; }
.sprachwahl .kartentitel { margin-top: 0; font-size: 1.15rem; }
.sprachwahl .kartentext { margin-top: 6px; font-size: 0.95rem; }

/* --- Kantonsseite ohne Jahr --- */
.hubpaar { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.knopf.schmal { display: inline-block; }
.naechste { display: inline-block; padding: 10px 14px; border-radius: 8px; background: #fff4d6; }
tr.naechste-zeile th, tr.naechste-zeile td { background: #fff9e6; }
section h3 { margin-top: 20px; }

/* --- Feiertagsseiten --- */
.tabellenrahmen.schmal { max-width: 520px; }
table.matrix td.mitte, table.matrix th.mitte { text-align: center; }
table.matrix { min-width: 760px; }

/* --- Übersicht aller Kantone --- */
table.ueberblick td.umbruch { white-space: normal; min-width: 180px; }
table.ueberblick small { font-weight: 400; color: var(--grau); }
.noten { font-size: 0.9rem; color: var(--grau); max-width: 860px; }

/* --- Startseite unter / --- */
.heimblock { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; align-items: start; margin-top: 26px; padding: 22px 24px; border: 1px solid var(--linie); border-radius: 12px; }
.heimblock h2 { margin: 4px 0 10px; }
.heimblock h2 a { color: inherit; text-decoration: none; }
.heimblock h2 a:hover { text-decoration: underline; }
.heimblock .sprachname { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grau); }
.heimblock .mehr { margin-bottom: 0; font-size: 0.95rem; }
.heimbild img { display: block; width: 100%; height: auto; border: 1px solid var(--linie); border-radius: 4px; }
.heimbild:hover img { border-color: var(--akzent); }

/* --- Schmale Bildschirme --- */
@media (max-width: 860px) {
  .kalender { grid-template-columns: 1fr; gap: 20px; }
  .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .druckpaar, .sprachwahl, .hubpaar { grid-template-columns: minmax(0, 1fr); }
  .heimblock { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .heimbild { max-width: 190px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; margin-top: 36px; }
  .innen { padding: 0 16px; }
  th, td { padding: 9px 10px; }
  .legende { columns: 1; }
}
