/* parafia_liturgia — szablon parafii (potomny Cassiopei).
   Kolejność: zmienne → kolory okresów → podstawy → nagłówek → strona główna (okres, transmisja, kafle) → treść → moduły → stopka. */

/* ---------- Zmienne ---------- */
:root {
  --px-paper: #FAFAF8;      /* tło: bielone ściany */
  --px-ink: #1D2023;
  --px-muted: #5B6168;
  --px-line: #DCDDDB;
  --px-card: #FFFFFF;
  --px-lit: #2F6B3F;        /* kolor liturgiczny okresu */
  --px-lit-ink: #FFFFFF;    /* tekst na kolorze okresu */
  --px-lit-soft: #E7F0E9;
  --px-live: #B3261E;
  --px-display: 'Alegreya', Georgia, 'Times New Roman', serif;
  --px-body: 'Alegreya Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --px-wrap: 1120px;
  --px-text: 760px;
  --px-radius: 10px;
  color-scheme: light;
}

/* ---------- Kolory okresów ---------- */
body[data-season="adwent"]    { --px-lit: #5B3A8C; --px-lit-soft: #EEE8F6; }
body[data-season="gaudete"],
body[data-season="laetare"]   { --px-lit: #A8476F; --px-lit-soft: #F7E6EE; }
body[data-season="post"]      { --px-lit: #4E3478; --px-lit-soft: #ECE6F3; }
body[data-season="bn"],
body[data-season="wielkanoc"] { --px-lit: #8A6413; --px-lit-soft: #F6EEDC; }
body[data-season="triduum"]   { --px-lit: #7E1A1A; --px-lit-soft: #F3E3E1; }
body[data-season="zeslanie"]  { --px-lit: #B3261E; --px-lit-soft: #F8E4E2; }

/* zmienne Cassiopei/Bootstrapa — formularze, przyciski, wtyczki */
body.px {
  --body-bg: var(--px-paper);
  --body-color: var(--px-ink);
  --link-color: var(--px-lit);
  --link-hover-color: var(--px-ink);
  --cassiopeia-color-primary: var(--px-lit);
  --cassiopeia-color-link: var(--px-lit);
  --cassiopeia-color-hover: var(--px-ink);
  --cassiopeia-font-family-body: var(--px-body);
  --cassiopeia-font-family-headings: var(--px-display);
  --cassiopeia-font-weight-headings: 700;
  --template-bg-light: var(--px-lit-soft);
  --template-special-color: var(--px-lit);
}

/* ---------- Podstawy ---------- */
html { scroll-padding-top: 90px; overflow-x: clip; }
body.px {
  display: block !important;          /* Cassiopeia ustawia body jako flex */
  margin: 0;
  background: var(--px-paper);
  color: var(--px-ink);
  font-family: var(--px-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: clip;
}
.px a { color: var(--px-lit); }
.px a:hover { color: var(--px-ink); }
.px a:focus-visible, .px button:focus-visible { outline: 3px solid var(--px-lit); outline-offset: 3px; }
.px h1, .px h2, .px h3, .px h4 { font-family: var(--px-display); font-weight: 700; line-height: 1.2; text-wrap: balance; color: var(--px-ink); }
.px-wrap { max-width: var(--px-wrap); margin-inline: auto; padding-inline: 16px; }
.px-skip { position: absolute; left: -9999px; }
.px-skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--px-card); padding: 8px 14px; border-radius: 6px; }

/* ---------- Nagłówek ---------- */
.px-header { background: var(--px-card); border-top: 6px solid var(--px-lit); border-bottom: 1px solid var(--px-line); }
.px-header--sticky { position: sticky; top: 0; z-index: 50; }
.px-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 16px; }
.px-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--px-ink) !important; margin-right: auto; }
.px-brand svg { width: 46px; height: 46px; flex: none; color: var(--px-lit); }
.px-brand__name { font: 700 1.35rem/1.15 var(--px-display); }
.px-brand__name small { display: block; font: 500 1rem/1.3 var(--px-body); color: var(--px-muted); }
.px-livebtn { order: 2; display: inline-flex; align-items: center; gap: 8px; background: var(--px-live); color: #FFFFFF !important; text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; line-height: 1; }
.px-livebtn svg { width: 18px; height: 18px; }
.px-livebtn:hover { filter: brightness(1.1); }
.px-menu { order: 3; flex-basis: 100%; }
.px .px-menu ul.mod-menu, .px-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 2px 22px; }
.px .px-menu li { margin: 0; padding: 0; }
.px-menu a { display: block; padding-block: 6px; color: var(--px-ink); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.px-menu a:hover, .px-menu .current > a, .px-menu .active > a { border-color: var(--px-lit); color: var(--px-ink); }
.px-menu ul ul { display: none; }   /* podmenu działów jest w lewej kolumnie */

/* ---------- Strona główna: okres, transmisja, kafle ---------- */
.px-hero { display: grid; gap: 20px; padding-block: 22px 8px; }
.px-season { background: var(--px-lit); color: var(--px-lit-ink); border-radius: var(--px-radius); display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 6px 22px; align-items: center; padding: 18px 22px; }
.px-season__sym { width: 72px; height: 72px; grid-row: span 2; }
.px-season__sym svg { width: 100%; height: 100%; display: block; }
.px-season__name { font: 700 1.75rem/1.15 var(--px-display); margin: 0; text-wrap: balance; }
.px-season > * { min-width: 0; }
.px-season__date { margin: 0; opacity: 0.92; }
.px-season__day { display: block; font-weight: 700; opacity: 1; }
.px-season__day small { display: block; font-weight: 400; opacity: 0.85; }
.px-feasts { grid-column: 3; grid-row: 1 / span 2; list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid currentColor; display: grid; gap: 8px; }
.px-feasts li.px-feasts__head { display: block; }
.px-feasts__head { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.px-feasts li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 2px 12px; line-height: 1.3; }
.px-feasts__d { font-weight: 700; font-variant-numeric: tabular-nums; }
.px-feasts__n { min-width: 0; overflow-wrap: anywhere; }
.px-feasts__n small { display: block; opacity: 0.85; font-size: 0.88rem; }
.px-feasts li.is-today .px-feasts__d { text-transform: uppercase; letter-spacing: 0.06em; }

.px-live { background: var(--px-card); border: 2px solid var(--px-live); border-radius: var(--px-radius); padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: center; }
.px-live__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--px-live); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.px-live__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--px-live); animation: px-pulse 1.8s ease-in-out infinite; }
@keyframes px-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .px-live__dot { animation: none; } }
.px-live h2 { font-size: 2.4rem; line-height: 1.1; margin: 6px 0 8px; }
.px-live p { margin: 0; color: var(--px-muted); max-width: 60ch; }
.px-live__btn { display: inline-flex; align-items: center; gap: 12px; background: var(--px-live); color: #FFFFFF !important; text-decoration: none; font: 700 1.35rem/1 var(--px-body); padding: 20px 28px; border-radius: var(--px-radius); white-space: nowrap; }
.px-live__btn:hover { filter: brightness(1.08); }
.px-live__btn svg { width: 26px; height: 26px; }

.px-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.px-tile { display: flex; flex-direction: column; gap: 4px; background: var(--px-card); border: 1px solid var(--px-line); border-radius: var(--px-radius); padding: 16px 18px; text-decoration: none; color: var(--px-ink) !important; min-width: 0; }
.px-tile:hover { border-color: var(--px-lit); background: var(--px-lit-soft); }
.px-tile b { font: 700 1.3rem/1.2 var(--px-display); }
.px-tile span { color: var(--px-muted); font-size: 1rem; line-height: 1.45; }

/* ---------- Treść ---------- */
.px-top { padding-top: 14px; }
.px-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 26px 34px; }
.px-body.has-sidebar-left { grid-template-columns: 260px minmax(0, 1fr); }
.px-body.has-sidebar-right { grid-template-columns: minmax(0, 1fr) 260px; }
.px-body.has-sidebar-left.has-sidebar-right { grid-template-columns: 240px minmax(0, 1fr) 240px; }
.px-content { min-width: 0; }
.px-content main { max-width: var(--px-text); }
.px-home .px-content main { max-width: none; }
.px-content main h1 { font-size: 2.1rem; margin: 0 0 0.6em; }
.px-content main h2 { font-size: 1.6rem; margin: 1.4em 0 0.5em; }
.px-content main h3 { font-size: 1.3rem; margin: 1.2em 0 0.4em; }
.px-content main p, .px-content main li { max-width: 68ch; }
.px-content main img { max-width: 100%; height: auto; border-radius: 6px; }
.px-content main table { max-width: 100%; display: block; overflow-x: auto; }
.px .page-header h1, .px .page-header h2 { margin-top: 0; }
.px .item-content, .px .blog-item { border-bottom: 1px solid var(--px-line); padding-bottom: 18px; margin-bottom: 22px; }
.px .readmore .btn, .px .btn-primary { background: var(--px-lit); border-color: var(--px-lit); color: var(--px-lit-ink); }
.px .btn-primary:hover { filter: brightness(1.1); }
.px .article-info, .px .article-info-term { color: var(--px-muted); font-size: 0.95rem; }

/* Strona główna: powitanie z artykułu pod kaflami */
.px-home .px-body { border-top: 1px solid var(--px-line); margin-top: 18px; }
.px-home .com-content-article__body h1 { font-size: 1.75rem; }
.px-home .com-content-article__body h1 + h1 { color: var(--px-lit); font-style: italic; font-weight: 500; margin-top: -0.3em; }

/* ---------- Moduły ---------- */
.px-side .card { background: var(--px-card); border: 1px solid var(--px-line); border-radius: var(--px-radius); margin-bottom: 18px; }
.px-side .card-header { background: var(--px-lit-soft); font: 700 1.1rem/1.2 var(--px-display); border-bottom: 1px solid var(--px-line); }
.px-side .mod-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.px-side .mod-menu a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--px-ink); text-decoration: none; }
.px-side .mod-menu a:hover, .px-side .mod-menu .current > a { background: var(--px-lit-soft); color: var(--px-ink); }
.px .mod-breadcrumbs, .px .breadcrumb { background: none; padding: 0; font-size: 0.95rem; }

/* ---------- Stopka ---------- */
.px-footer { background: var(--px-card); border-top: 6px solid var(--px-lit); color: var(--px-muted); font-size: 1rem; }
.px-footer__row { padding-block: 24px 34px; }
.px-footer .mod-footer { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; }
.px .back-to-top-link { background: var(--px-lit); color: var(--px-lit-ink); }

/* ---------- Telefon ---------- */
@media (max-width: 900px) {
  .px-body.has-sidebar-left, .px-body.has-sidebar-right, .px-body.has-sidebar-left.has-sidebar-right { grid-template-columns: minmax(0, 1fr); }
  .px-side--left { order: 2; }
}
@media (max-width: 720px) {
  .px-season { padding: 16px; gap: 4px 16px; grid-template-columns: auto minmax(0, 1fr); }
  .px-season__sym { width: 56px; height: 56px; }
  .px-feasts { grid-column: 1 / -1; grid-row: auto; border-left: 0; border-top: 1px solid currentColor; padding: 12px 0 0; margin-top: 8px; }
  .px-live { grid-template-columns: minmax(0, 1fr); }
  .px-live h2 { font-size: 1.9rem; }
  .px-live__btn { justify-content: center; white-space: normal; }
  .px-brand__name { font-size: 1.15rem; }
}
