/* Website von kalendarz-do-druku.pl. Farben und Schrift wie die Kalenderblätter („Granat i karmin“):
   Dunkelblau #1d2f4f, Karminrot #c8102e, Schrift Lato. Eigener Aufbau, nicht von den Schwesterseiten. */

@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("/czcionka/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("/czcionka/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-display: swap; src: url("/czcionka/lato-900.woff2") format("woff2"); }

:root {
  --granat: #1d2f4f;
  --karmin: #c8102e;
  --tusz: #1a2233;
  --sredni: #4f5f7a;
  --linia: #c5cfdd;
  --jasny: #eef2f8;
  --handel: #17885c;
  --t1: #bcd9ff;
  --t2: #ffd3a6;
  --t3: #c9ebc4;
  --szer: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--tusz);
  font-family: "Lato", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
.szer { max-width: var(--szer); margin: 0 auto; padding: 0 20px; }
a { color: var(--granat); text-underline-offset: 2px; }
a:hover { color: var(--karmin); }
img { max-width: 100%; height: auto; }

/* Kopf: dunkelblauer Balken mit rotem Strich darunter */
.naglowek { background: var(--granat); border-bottom: 4px solid var(--karmin); }
.naglowek .szer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; padding-top: 12px; padding-bottom: 10px; }
.logo { color: #ffffff; font-size: 21px; font-weight: 900; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo b { margin-left: 5px; font-weight: 400; }
.logo i { font-style: normal; font-weight: 400; opacity: 0.75; }
.logo:hover { color: #ffffff; }
.menu { display: flex; gap: 2px 18px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { color: #dfe6f1; font-size: 15.5px; font-weight: 700; text-decoration: none; white-space: nowrap; padding: 3px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current] { color: #ffffff; border-bottom-color: #ffffff; }

/* main.szer: Die Klasse .szer setzt die Polsterung sonst zurück (Befund der Sichtprüfung). */
main.szer { padding-top: 14px; padding-bottom: 64px; }
.sciezka ol { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 14px; color: var(--sredni); }
.sciezka li + li::before { content: "›"; margin-right: 6px; }
.sciezka a { color: var(--sredni); }

h1 { margin: 12px 0 0; font-size: clamp(30px, 5.2vw, 46px); font-weight: 900; line-height: 1.1; letter-spacing: -0.015em; color: var(--granat); }
h1 .rok { color: var(--karmin); }
.kreska { height: 8px; margin: 12px 0 20px; background: linear-gradient(to bottom, var(--granat) 4px, transparent 4px), linear-gradient(to right, var(--karmin) 110px, transparent 110px); }
h2 { margin: 44px 0 12px; font-size: clamp(22px, 3.2vw, 28px); font-weight: 900; line-height: 1.2; color: var(--granat); }
h3 { margin: 12px 0 4px; font-size: 19px; font-weight: 900; color: var(--granat); }
p { margin: 0 0 14px; max-width: 76ch; }
.wstep { font-size: 19px; }
.male { font-size: 14.5px; color: var(--sredni); }
.zrodlo { font-size: 14.5px; color: var(--sredni); padding-left: 12px; border-left: 3px solid var(--linia); }
.licencja { margin-top: 10px; }

/* Kalenderblätter in der Übersicht */
.wzory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 24px; align-items: start; }
.wzor.poziom { grid-column: span 2; }
/* Bleibt in der letzten Reihe eine Spalte frei, steht das letzte Querformat über die ganze Breite: Bild links, Text rechts. */
.wzor.szeroki { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
.wzor.szeroki figure { grid-column: 1; grid-row: 1 / span 4; }
.wzor.szeroki h3 { margin-top: 0; }
.wzor.szeroki > :not(figure) { grid-column: 2; }
.wzor figure, .arkusz figure { margin: 0; }
.wzor figure a, .arkusz figure a, .tematy img, .kafelki.z-obrazem img { display: block; border: 1px solid var(--linia); background: #ffffff; box-shadow: 0 2px 10px rgba(29, 47, 79, 0.10); }
.wzor img, .arkusz img { display: block; width: 100%; }
figcaption { margin-top: 6px; font-size: 13.5px; color: var(--sredni); }
.wzor p { margin-bottom: 8px; font-size: 16px; }
.pobierz { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; max-width: none; }
.guzik { display: inline-block; padding: 9px 15px; border: 2px solid var(--granat); border-radius: 4px; background: var(--granat); color: #ffffff; font: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.guzik:hover { background: var(--karmin); border-color: var(--karmin); color: #ffffff; }
.guzik.drugi { background: #ffffff; color: var(--granat); }
.guzik.drugi:hover { background: var(--jasny); border-color: var(--granat); color: var(--granat); }
.guzik small { font-weight: 400; font-size: 13px; opacity: 0.9; }

.arkusz { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.arkusz h3 { margin-top: 0; }

/* Tabellen */
.tabela { overflow-x: auto; margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linia); }
thead th { font-size: 14px; font-weight: 700; color: var(--sredni); border-bottom: 2px solid var(--granat); white-space: nowrap; }
td.nazwa { font-weight: 700; }
table.liczby { max-width: 640px; }
table.liczby th { width: 46%; font-weight: 400; color: var(--sredni); border-bottom: 1px solid var(--linia); }
table.liczby td { font-weight: 700; }
td.liczba, td.daty, .nb { white-space: nowrap; }
.znacznik { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 3px; background: var(--karmin); }
.znacznik.handel { background: var(--handel); }
.znacznik.t1 { background: var(--t1); border: 1px solid #7fa9e0; }
.znacznik.t2 { background: var(--t2); border: 1px solid #e0a05c; }
.znacznik.t3 { background: var(--t3); border: 1px solid #86c27c; }
tr:target td { background: var(--jasny); }

/* Kacheln: Monate, Themen */
.kafelki { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.kafelki a { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--linia); border-left: 4px solid var(--granat); color: var(--granat); font-weight: 700; text-decoration: none; }
.kafelki a:hover { border-left-color: var(--karmin); background: var(--jasny); }
.kafelki small { display: block; font-weight: 400; font-size: 13px; color: var(--sredni); }
.kafelki.z-obrazem { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.kafelki.z-obrazem a { padding: 0 0 8px; border: 0; }
.kafelki.z-obrazem a:hover { background: none; }
.kafelki.z-obrazem img { width: 100%; margin-bottom: 8px; }
.tematy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.tematy a { display: block; color: var(--tusz); text-decoration: none; }
/* gleich hohe Vorschaubilder: der obere Teil des Blatts, egal ob Hoch- oder Querformat */
.tematy img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; margin-bottom: 10px; }
.tematy strong { display: block; font-size: 18px; font-weight: 900; color: var(--granat); }
.tematy a:hover strong { color: var(--karmin); }
.tematy span { display: block; font-size: 15px; color: var(--sredni); }
.lista { margin: 0 0 14px; padding-left: 20px; max-width: 76ch; }
.lista li { margin-bottom: 6px; }

/* Kalenderdateien und Einbettcode */
.pliki { margin: 0 0 10px; padding: 0; list-style: none; max-width: 640px; }
.pliki li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--linia); }
.kody { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
/* gleiche Zeilen in beiden Spalten: Überschrift, Beschreibung (feste Höhe), Code, Knopf */
.kody > div { display: grid; grid-template-rows: auto 4.6em auto auto; align-items: start; }
.kody textarea { display: block; width: 100%; margin-bottom: 8px; padding: 10px; border: 1px solid var(--linia); border-radius: 4px; background: var(--jasny); color: var(--tusz); font: 13px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; resize: vertical; }

.sasiednie { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--granat); font-weight: 700; }
.sasiednie span:last-child { text-align: right; }
.sasiednie a { white-space: nowrap; }

/* Rechtstexte */
.tekst-prawny h2 { font-size: 22px; margin-top: 30px; }
.tekst-prawny h3 { font-size: 18px; }
.oryginal { margin-top: 36px; padding: 14px 16px; border: 1px solid var(--linia); background: var(--jasny); }
.oryginal summary { cursor: pointer; font-weight: 700; color: var(--granat); }

/* Fuß */
.dol { background: var(--jasny); border-top: 4px solid var(--granat); padding: 30px 0 26px; font-size: 15px; }
.dol .kolumny { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 28px; }
.dol h2 { margin: 0 0 8px; font-size: 16px; }
.dol ul { margin: 0; padding: 0; list-style: none; }
.dol li { margin-bottom: 5px; }
.dol .miesiace { columns: 2; }
.drobne { margin: 24px 0 0; max-width: none; font-size: 13.5px; color: var(--sredni); }

@media (max-width: 980px) {
  .wzory { grid-template-columns: repeat(2, 1fr); }
  .tematy { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .arkusz, .kody { grid-template-columns: 1fr; }
  .dol .kolumny { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wzor.szeroki { display: block; }
}
@media (max-width: 640px) {
  .wzory { grid-template-columns: 1fr; }
  .wzor.poziom, .wzor.szeroki { grid-column: auto; }
  .naglowek .szer { gap: 2px 16px; }
  /* Menü in zwei Zeilen statt zum Wischen: alle sechs Einträge sind sichtbar */
  .menu { flex-wrap: wrap; overflow: visible; gap: 0 14px; }
  .menu a { font-size: 14.5px; }
  table { font-size: 14.5px; }
  th, td { padding: 7px 5px; }
  thead th { white-space: normal; }
  .tylko-pc { display: none; }
  /* Monatsnavigation: Jahreslink oben über die ganze Breite, darunter Vor- und Folgemonat */
  .sasiednie { grid-template-columns: 1fr 1fr; }
  .sasiednie > a { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .kody > div { grid-template-rows: auto auto auto auto; }
}
@media (max-width: 380px) {
  .szer { padding: 0 14px; }
  table { font-size: 13.5px; }
  th, td { padding: 6px 4px; }
}
@media print {
  .naglowek, .dol, .sciezka, .pobierz, .sasiednie, .kody { display: none; }
}
