/* Warianty komponentow szablonow centralnych: definicja szablonu ("components" w template.php) daje na korzeniu strony
   klasy tpl-<komponent>--<wariant>, tu sa ich reguly. Warianty domyslne (wyglad Mateusza) nie maja regul. Tokeny
   wspolne (--heading-*, --btn-*, --menu-*, --hero-*, --badge-rotate, --footer-accent, --tpl-mm-*) ustawia definicja ("tokens"); bez nich zostaje wyglad arkusza.
   Opis: docs/architecture/szablon-centralny-definicja.md. */

/* ---- Typografia naglowkow (tokeny) ---------------------------------------------------------------------------- */
.front-root :is(.section-title, .news-card__title, .news-featured__title, .front-sidebar__head, .mateusz-elements__title, .gallery-tile__title) {
  text-transform: var(--heading-case, none);
  letter-spacing: var(--heading-tracking, 0);
}
.front-root .section-title { font-weight: var(--heading-weight, 300); }

/* ---- Naglowek: badge = nazwa parafii w ramce koloru glownego (takze na zdjeciu hero) ------------------------------ */
.tpl-header--badge .front-header__brand { align-self: flex-start; padding: 12px 18px; background: var(--pri-strong); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); transform: rotate(var(--badge-rotate, 0deg)); transform-origin: left center; }
.tpl-header--badge .front-header__brand :is(.front-header__name, .front-header__subtitle),
.tpl-header--badge .front-header__brand a.front-header__name { color: #fff; text-shadow: none; }
.tpl-header--badge .front-header__subtitle { font-size: 16px; }
.tpl-header--badge.front-root--hero-overlay > .front-header .front-header__brand :is(.front-header__name, .front-header__subtitle) { text-shadow: none; }

/* ---- Pasek naglowka: page = na tle strony | band = pasek w kolorze ciemnych pasow, menu biale (na zdjeciu hero
   zamiast niego --hero-overlay) ------------------------------------------------------------------------------------ */
html .front-root.tpl-navbar--band:not(.front-root--hero-overlay) > .front-header { background: linear-gradient(to bottom, var(--band-bg, var(--pri-strong)), color-mix(in srgb, var(--band-bg, var(--pri-strong)) 82%, #fff)); border-bottom: 0; }
.front-root.tpl-navbar--band > .front-header :is(a.front-topnav__link, .front-topnav__link, .front-header__name, .front-header__subtitle) { color: #fff; }
.front-root.tpl-navbar--band > .front-header .front-burger { border-color: rgba(255, 255, 255, .6); }
.front-root.tpl-navbar--band > .front-header .front-burger span { background: #fff; }
.front-root.tpl-navbar--band > .front-header .front-topnav__caret { color: inherit; }

/* ---- Menu na komputerze: tokeny --menu-size, --menu-weight, --menu-case dla kazdego wariantu ---------------------- */
.front-root a.front-topnav__link { font-size: var(--menu-size, 19px); font-weight: var(--menu-weight, 300); text-transform: var(--menu-case, none); }
/* caps: wersaliki, mniejsze, biezaca i najechana pozycja na kolorze glownym */
.front-root.tpl-menu--caps a.front-topnav__link,
.tpl-menu--caps .front-topnav__link {
  font-family: var(--menu-font, var(--font-serif));
  font-size: var(--menu-size, 15px);
  font-weight: var(--menu-weight, 400);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 12px;
}
/* underline: bez tla, linia pod biezaca i najechana pozycja */
.front-root.tpl-menu--underline a.front-topnav__link:is(:hover, .front-topnav__link--active),
.front-root.tpl-menu--underline .front-topnav__group:hover > a.front-topnav__link {
  background: transparent;
  color: var(--pri);
  box-shadow: inset 0 -3px 0 var(--sec);
}

/* ---- Ramka tresci: frameless = tresc i kolumna boczna wprost na tle strony, bez bialych ramek i cieni ------------- */
.tpl-frame--frameless .front-main { --section-bg: var(--bg); background: transparent; padding: 0; box-shadow: none; }
.tpl-frame--frameless .front-sidebar__box { background: transparent; box-shadow: none; }
.tpl-frame--frameless .front-main section.front-section[style*="--section-bg"] { padding-inline: var(--tresc-pad); }

/* ---- Kolumna boczna: plain = listy bez ramek, naglowek tekstem z linia w kolorze glownym ---------------------------- */
.tpl-sidebar--plain .front-sidebar__box { background: transparent; box-shadow: none; }
.tpl-sidebar--plain .front-sidebar__head {
  background: transparent;
  color: var(--ink);
  padding: 0 0 8px;
  margin-bottom: 4px;
  border-bottom: 3px solid var(--pri);
  font-size: 20px;
  font-weight: 500;
  text-align: left;
}
.tpl-sidebar--plain .front-sidebar__item { margin-inline: 0; border-bottom-color: var(--border); }
.front-root.tpl-sidebar--plain .front-sidebar section.front-section:is(.front-section) { --section-bg: transparent; background: transparent; padding: 0; box-shadow: none; }
.front-root.tpl-sidebar--plain .front-sidebar .front-section .section-head { margin: 0 0 10px; padding: 0 0 8px; background: transparent; border-bottom: 3px solid var(--pri); justify-content: flex-start; }
.front-root.tpl-sidebar--plain .front-sidebar .front-section .section-title { color: var(--ink); font-size: 20px; font-weight: 500; text-align: left; }

/* ---- Slider wyroznionych: light = jasny panel, tytul wersalikami na srodku, data w kolorze glownym ----------------- */
.tpl-slider--light .news-featured__body {
  --card-text: var(--ink);
  --card-heading: var(--ink);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  align-items: center;
  justify-content: center;
}
.tpl-slider--light .news-featured__body :is(.news-featured__title, .news-featured__excerpt, .news-featured__more) { color: var(--ink); }
.tpl-slider--light .news-featured__title { text-transform: uppercase; font-size: 30px; font-weight: 500; letter-spacing: .02em; }
.tpl-slider--light .news-featured__body .news-card__subtitle { text-transform: uppercase; font-size: 15px; color: var(--ink-3); letter-spacing: .04em; }
.tpl-slider--light .news-featured .news-date { background: var(--pri-strong); box-shadow: none; }
.tpl-slider--light .news-featured .news-date :is(.news-date__day, .news-date__month, .news-date__year, .news-date__month::after) { color: #fff; }

/* ---- Kafle aktualnosci (glowna i archiwum w kaflach, ten sam wyglad): label = kategoria na zdjeciu z lewej u dolu,
   tytul wersalikami; na glownej bez zajawki, w archiwum z zajawka i przyciskiem ----------------------------------- */
.tpl-news-tiles--label .news-grid .news-stamps--over { inset: 0; }
.tpl-news-tiles--label :is(.news-grid .news-stamps .news-stamps__category, .news-rows--grid .news-row__cat) {
  display: inline-flex; padding: 5px 12px; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase;
  background: var(--band-bg, var(--pri-strong)); color: #fff; opacity: 1;
}
.tpl-news-tiles--label .news-grid .news-stamps--over .news-stamps__category { position: absolute; left: 12px; bottom: 12px; }
.tpl-news-tiles--label .news-grid :is(.news-card__excerpt, .news-card__more) { display: none; }
.tpl-news-tiles--label .news-grid .news-card__body { padding-top: 12px; text-align: center; }
.tpl-news-tiles--label :is(.news-grid .news-card__title, .news-rows--grid .news-row__title) { font-size: 18px; font-weight: 600; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
.tpl-news-tiles--label .news-grid .news-card__subtitle { margin-top: 4px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.tpl-news-tiles--label :is(.news-grid .news-card, .news-rows--grid .news-row):hover :is(.news-card__title, .news-row__title) { color: var(--pri); }
/* archiwum: tresc kafla wchodzi w siatke karty, wiec kategoria moze lezec na zdjeciu (obszar "media") */
.tpl-news-tiles--label .news-rows--grid .news-row { grid-template-areas: "media" "title" "excerpt" "more"; row-gap: 10px; }
.tpl-news-tiles--label .news-rows--grid .news-row__body { display: contents; }
.tpl-news-tiles--label .news-rows--grid .news-row__cat { grid-area: media; align-self: end; justify-self: start; z-index: var(--z-plakietka); margin: 0 0 12px 12px; }
.tpl-news-tiles--label .news-rows--grid .news-row__title { grid-area: title; margin: 0; }
.tpl-news-tiles--label .news-rows--grid .news-row__excerpt { grid-area: excerpt; margin: 0; }
.tpl-news-tiles--label .news-rows--grid .news-row__more { grid-area: more; margin-top: 2px; justify-self: end; }

/* ---- Data na zdjeciu (kafle, slider, archiwum): tile = kwadratowa tabliczka w prawym gornym rogu, odsunieta od
   krawedzi: miesiac drobnymi wersalikami nad cienka kreska, pod nim dzien duzym krojem naglowkow ------------------- */
.tpl-news-date--tile :is(.news-grid, .news-featured, .news-rows) .news-date {
  flex-direction: column; align-items: stretch; justify-content: center; gap: 0; min-width: 50px; width: auto; height: auto; padding: 6px 8px 7px;
  border: 0; border-radius: 0; background: var(--pri); color: #fff; text-align: center; box-shadow: 0 6px 14px rgba(0, 0, 0, .22);
}
.tpl-news-date--tile :is(.news-grid, .news-featured, .news-rows) .news-date__month {
  order: -1; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .5);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: #fff;
}
.tpl-news-date--tile :is(.news-grid, .news-featured, .news-rows) .news-date__month::after { content: none; }
.tpl-news-date--tile :is(.news-grid, .news-featured, .news-rows) .news-date__day { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 500; line-height: 1; color: #fff; font-variant-numeric: lining-nums; }
.tpl-news-date--tile :is(.news-grid, .news-featured, .news-rows) .news-date__year { display: none; }
.tpl-news-date--tile :is(.news-grid, .news-featured) .news-stamps--over { inset: 0; }
.tpl-news-date--tile :is(.news-grid, .news-featured) .news-stamps--over .news-date { position: absolute; top: 12px; right: 12px; margin: 0; }
.tpl-news-date--tile .news-rows--grid .news-row > .news-date { align-self: start; justify-self: end; margin: 12px 12px 0 0; }

/* ---- Widzety (pasy i kolumna boczna): plain = naglowek tekstem z linia zamiast paska koloru ------------------------ */
.tpl-widgets--plain :is(.mateusz-widgets, .mateusz-rss-columns) :is(.mateusz-widget, .mateusz-rss, .mateusz-quote) .section-head { background: transparent; border-bottom: 3px solid var(--pri); justify-content: flex-start; padding-inline: 0; margin-inline: 0; }
.tpl-widgets--plain :is(.mateusz-widgets, .mateusz-rss-columns) :is(.mateusz-widget, .mateusz-rss, .mateusz-quote) .section-title { color: var(--ink); text-align: left; font-size: 22px; }

/* ---- Pas "Mysl dnia": light = jasny pas, napis nad cytatem z kreska akcentu, autor w kolorze glownym --------------- */
.tpl-quote-band--light .front-quote-strip { --section-text: var(--ink); --section-heading: var(--ink); --section-muted: var(--ink-3); --section-accent-ink: var(--pri); background: var(--surface-2); color: var(--ink); }
.tpl-quote-band--light .front-quote-strip__kicker { padding-bottom: 6px; border-bottom: 2px solid var(--pri); color: var(--ink); }
.tpl-quote-band--light .front-quote-strip__author { color: var(--pri); }

/* ---- Stopka: accent = pasek akcentu u gory (token --footer-accent, domyslnie kolor glowny) -------------------------- */
.tpl-footer--accent .front-footer { border-top: 5px solid var(--footer-accent, var(--pri)); }

/* ---- Przyciski: caps = wersaliki, kwadratowe, pelny kolor glowny (tokeny --btn-radius, --btn-tracking) -------------- */
.tpl-buttons--caps :is(.btn, .link-more, .news-row__more) { border-radius: var(--btn-radius, 0); text-transform: uppercase; letter-spacing: var(--btn-tracking, .04em); font-size: 14px; }
.tpl-buttons--caps .btn.btn--action-quiet:not(.front-section[style*="--section-bg"] .btn) { background: var(--pri-strong); border-color: var(--pri-strong); color: #fff; }
.tpl-buttons--caps .btn.btn--action-quiet:not(.front-section[style*="--section-bg"] .btn):hover { background: var(--ink); border-color: var(--ink); }

/* =====================================================================================================================
   Warianty "soft modern" (pierwszy uzytkownik: Marek). Zaokraglenia z tokenow --radius-*, kolory z palety, ruch tylko
   przy prefers-reduced-motion: no-preference. Szklo (backdrop-filter) tylko tam, gdzie pod spodem jest zdjecie albo tresc.
   ===================================================================================================================== */

/* ---- Naglowek: glass = plywajacy pasek ze szkla nad trescia, przyklejony z odstepem od gory ------------------------ */
html .front-root.tpl-header--glass > .front-header {
  position: sticky; top: 12px; z-index: var(--z-naglowek, 60);
  margin: 12px auto 0; width: min(100% - 2 * var(--tresc-pad), var(--tresc-max));
  border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius-xl, 24px);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px -12px rgba(var(--band-rgb, 20, 20, 20), .28);
}
html .front-root.tpl-header--glass > .front-header .front-header__inner { padding-block: 10px; padding-inline: 22px; max-width: none; }
.tpl-header--glass .front-header__name, .tpl-header--glass a.front-header__name { color: var(--ink); }

/* ---- Menu: pill = pozycje w miekkich kapsulach, biezaca na kolorze glownym --------------------------------------- */
.front-root.tpl-menu--pill a.front-topnav__link { padding: 7px 14px; border-radius: var(--radius-pill, 999px); color: var(--ink); transition: background-color var(--motion-state) var(--motion-ease-state), color var(--motion-state) var(--motion-ease-state); }
.front-root.tpl-menu--pill a.front-topnav__link:hover,
.front-root.tpl-menu--pill .front-topnav__group:hover > a.front-topnav__link { background: color-mix(in srgb, var(--pri) 10%, transparent); color: var(--pri); }
.front-root.tpl-menu--pill a.front-topnav__link.front-topnav__link--active { background: var(--pri); color: #fff; }
.tpl-menu--pill .front-topnav__submenu { border-radius: var(--radius-lg, 18px); overflow: hidden; }

/* ---- Kolumna boczna: soft = zaokraglone karty bez paskow, naglowek krojem naglowkow ------------------------------ */
.tpl-sidebar--soft .front-sidebar__box,
.front-root.tpl-sidebar--soft .front-sidebar section.front-section:is(.front-section) { background: var(--surface); border-radius: var(--radius-xl, 24px); box-shadow: none; padding: 18px 20px; overflow: hidden; }
.tpl-sidebar--soft .front-sidebar__head,
.front-root.tpl-sidebar--soft .front-sidebar .front-section .section-head { margin: 0 0 8px; padding: 0; background: transparent; border: 0; justify-content: flex-start; }
.tpl-sidebar--soft .front-sidebar__head,
.front-root.tpl-sidebar--soft .front-sidebar .front-section .section-title { color: var(--ink); font-size: 22px; font-weight: 400; text-align: left; }
.tpl-sidebar--soft .front-sidebar__item { margin-inline: 0; border-bottom: 0; }
.tpl-sidebar--soft .front-sidebar__row { border-left: 0; border-radius: var(--radius-md, 12px); }
.tpl-sidebar--soft .front-sidebar__link { padding: 8px 10px; }

/* ---- Slider: soft = zdjecie i tekst w jednej zaokraglonej karcie, duzy tytul krojem naglowkow -------------------- */
.tpl-slider--soft .news-featured { border-radius: var(--radius-xl, 24px); overflow: hidden; background: var(--surface); }
.tpl-slider--soft .news-featured__body { --card-text: var(--ink); --card-heading: var(--ink); background: var(--surface); color: var(--ink); padding: clamp(22px, 3vw, 40px); }
.tpl-slider--soft .news-featured__body :is(.news-featured__title, .news-featured__excerpt, .news-featured__more, .news-card__subtitle) { color: var(--ink); }
.tpl-slider--soft .news-featured__title { font-size: clamp(26px, 2.6vw, 38px); font-weight: 400; line-height: 1.12; text-wrap: balance; }
.tpl-slider--soft .news-featured__excerpt { color: var(--ink-3); }

/* ---- Data: pill = szklana kapsula na zdjeciu (dzien i miesiac w jednym wierszu) ------------------------------------ */
.tpl-news-date--pill :is(.news-grid, .news-featured, .news-rows) .news-date {
  flex-direction: row; align-items: baseline; gap: 5px; min-width: 0; height: auto; padding: 6px 12px; border: 0; border-radius: var(--radius-pill, 999px);
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.tpl-news-date--pill :is(.news-grid, .news-featured, .news-rows) :is(.news-date__day, .news-date__month) { margin: 0; font-family: var(--font-sans); font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--ink); }
.tpl-news-date--pill :is(.news-grid, .news-featured, .news-rows) .news-date__month::after { content: none; }
.tpl-news-date--pill :is(.news-grid, .news-featured, .news-rows) .news-date__year { display: none; }
.tpl-news-date--pill :is(.news-grid, .news-featured) .news-stamps--over { inset: 0; }
.tpl-news-date--pill :is(.news-grid, .news-featured) .news-stamps--over .news-date { position: absolute; top: 14px; right: 14px; margin: 0; }
.tpl-news-date--pill .news-rows--grid .news-row > .news-date { align-self: start; justify-self: end; margin: 14px 14px 0 0; }

/* ---- Kafle aktualnosci: bento = na glownej asymetryczna siatka (pierwsza aktualnosc 2x2 z tytulem na zdjeciu, dwie
   obok, reszta po trzy), w archiwum te same karty w rownej siatce; kategoria w szklanej kapsule -------------------- */
.tpl-news-tiles--bento.front-root--home .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; }
.tpl-news-tiles--bento.front-root--home .news-grid > * { max-width: none; }
.tpl-news-tiles--bento :is(.news-grid .news-card, .news-rows--grid .news-row) { position: relative; border-radius: var(--radius-xl, 24px); background: var(--surface); overflow: hidden; transition: transform var(--motion-state) var(--motion-ease-state), box-shadow var(--motion-state) var(--motion-ease-state); }
.tpl-news-tiles--bento :is(.news-grid .news-card, .news-rows--grid .news-row):hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(var(--band-rgb, 20, 20, 20), .35); }
.tpl-news-tiles--bento :is(.news-card__img, .news-row__thumb) { transition: transform 600ms cubic-bezier(.2, .7, .2, 1); }
.tpl-news-tiles--bento :is(.news-card, .news-row):hover :is(.news-card__img, .news-row__thumb) { transform: scale(1.04); }
.tpl-news-tiles--bento .news-grid .news-card__body { padding: 16px 20px 20px; }
.tpl-news-tiles--bento :is(.news-grid .news-card__title, .news-rows--grid .news-row__title) { font-size: 21px; font-weight: 400; line-height: 1.2; text-transform: none; text-wrap: balance; }
.tpl-news-tiles--bento .news-grid :is(.news-card__more) { display: none; }
.tpl-news-tiles--bento .news-grid .news-card__excerpt { color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-news-tiles--bento :is(.news-grid .news-stamps .news-stamps__category, .news-rows--grid .news-row__cat) {
  display: inline-flex; padding: 6px 12px; border-radius: var(--radius-pill, 999px); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none;
  background: color-mix(in srgb, var(--band-bg, var(--pri-strong)) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; opacity: 1;
}
.tpl-news-tiles--bento .news-grid .news-stamps--over { inset: 0; }
.tpl-news-tiles--bento .news-grid .news-stamps--over .news-stamps__category { position: absolute; left: 14px; top: 14px; }
/* pierwsza na glownej: 2 kolumny i 2 wiersze, zdjecie na cala karte, tytul na przyciemnieniu */
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child { grid-column: span 2; grid-row: span 2; min-height: 460px; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child .news-card__media { position: absolute; inset: 0; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child .news-card__img { height: 100%; aspect-ratio: auto; object-fit: cover; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child .news-card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--band-rgb, 10, 10, 10), .88) 0%, rgba(var(--band-rgb, 10, 10, 10), .4) 45%, transparent 75%); pointer-events: none; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child .news-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(20px, 3vw, 36px); background: none; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child :is(.news-card__title, .news-card__subtitle, .news-card__excerpt) { color: #fff; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child .news-card__title { font-size: clamp(26px, 2.8vw, 40px); max-width: 22ch; }
.tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child.news-card--textonly { background: var(--band-bg, var(--pri-strong)); }
.tpl-news-tiles--bento .news-rows--grid .news-row { row-gap: 0; }
.tpl-news-tiles--bento .news-rows--grid .news-row__body { padding: 16px 20px 20px; }
.tpl-news-tiles--bento .news-rows--grid .news-row__cat { position: absolute; left: 14px; top: 14px; z-index: var(--z-plakietka); }
@media (max-width: 900px) {
  .tpl-news-tiles--bento.front-root--home .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tpl-news-tiles--bento.front-root--home .news-grid { grid-template-columns: minmax(0, 1fr); }
  .tpl-news-tiles--bento.front-root--home .news-grid > .news-card:first-child { grid-column: auto; grid-row: auto; min-height: 380px; }
}

/* ---- Widzety: soft = zaokraglone karty, naglowek krojem naglowkow bez paska ---------------------------------------- */
.tpl-widgets--soft :is(.mateusz-widgets, .mateusz-rss-columns) section.front-section:is(.mateusz-widget, .mateusz-rss, .mateusz-quote) { border-radius: var(--radius-xl, 24px); background: var(--surface); box-shadow: none; padding: 20px 22px 22px; }
.tpl-widgets--soft :is(.mateusz-widgets, .mateusz-rss-columns) :is(.mateusz-widget, .mateusz-rss, .mateusz-quote) .section-head { margin: 0 0 12px; padding: 0; background: transparent; justify-content: flex-start; }
.tpl-widgets--soft :is(.mateusz-widgets, .mateusz-rss-columns) :is(.mateusz-widget, .mateusz-rss, .mateusz-quote) .section-title { color: var(--ink); font-size: 24px; text-align: left; }

/* ---- Pas "Mysl dnia": gradient = ciemny pas z abstrakcyjnym gradientem z kolorow palety, cytat bardzo duzym krojem -- */
.tpl-quote-band--gradient .front-quote-strip {
  background:
    radial-gradient(55% 90% at 12% 18%, rgba(var(--sec-rgb, 200, 160, 80), .22), transparent 62%),
    radial-gradient(48% 80% at 88% 8%, rgba(var(--ter-rgb, 120, 140, 160), .26), transparent 60%),
    radial-gradient(70% 90% at 70% 110%, rgba(var(--pri-rgb, 60, 60, 60), .5), transparent 65%),
    var(--band-bg, var(--pri-strong));
  padding-block: clamp(64px, 9vw, 128px);
}
.tpl-quote-band--gradient .front-quote-strip__inner { max-width: 980px; }
.tpl-quote-band--gradient .front-quote-strip__text { font-size: clamp(28px, 3.6vw, 52px); font-weight: 400; line-height: 1.18; text-wrap: balance; }
.tpl-quote-band--gradient .front-quote-strip__author { margin-top: 22px; font-size: 16px; }

/* ---- Przyciski: pill = kapsuly, strzalka przesuwa sie przy najechaniu --------------------------------------------- */
.tpl-buttons--pill :is(.btn, .news-row__more) { border-radius: var(--radius-pill, 999px); padding-inline: 22px; }
.tpl-buttons--pill .btn .btn__arrow { display: inline-block; transition: transform var(--motion-state) var(--motion-ease-state); }
.tpl-buttons--pill .btn:hover .btn__arrow { transform: translateX(3px); }

/* ---- Pas elementow: story = opowiesc przy przewijaniu, wiersze na zmiane zdjecie z lewej i z prawej, tytul duzy;
   zdjecie i tekst wchodza lagodnie, gdy wiersz wjezdza w ekran (animation-timeline: view(), bez skryptu) ----------- */
.tpl-elements--story .mateusz-elements__grid { grid-template-columns: minmax(0, 1fr); gap: clamp(48px, 7vw, 104px); max-width: min(var(--tresc-max), 1120px); }
.tpl-elements--story .mateusz-elements__item {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 72px); align-items: center;
  grid-template-areas: "photo title" "photo subtitle" "photo text" "photo more"; grid-template-rows: auto auto auto 1fr; align-content: center;
}
.tpl-elements--story .mateusz-elements__item:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "title photo" "subtitle photo" "text photo" "more photo"; }
.tpl-elements--story .mateusz-elements__title { grid-area: title; align-self: end; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.08; }
.tpl-elements--story .mateusz-elements__subtitle { grid-area: subtitle; margin-top: 10px; font-size: 16px; }
.tpl-elements--story .mateusz-elements__photo { grid-area: photo; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius-xl, 24px); }
.tpl-elements--story .mateusz-elements__text { grid-area: text; -webkit-line-clamp: 7; font-size: 17px; max-width: 46ch; }
.tpl-elements--story .mateusz-elements__more { grid-area: more; align-self: start; justify-self: start; width: auto; margin-top: 18px; }
.tpl-elements--story .mateusz-elements__item:not(:has(.mateusz-elements__photo)) { grid-template-columns: minmax(0, 46rem); grid-template-areas: "title" "subtitle" "text" "more"; justify-content: center; }
@media (max-width: 760px) {
  .tpl-elements--story .mateusz-elements__item,
  .tpl-elements--story .mateusz-elements__item:nth-child(even) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "title" "subtitle" "text" "more"; row-gap: 0; }
  .tpl-elements--story .mateusz-elements__photo { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tpl-elements--story .mateusz-elements__photo { animation: tpl-story-photo linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
    .tpl-elements--story .mateusz-elements__item > :not(.mateusz-elements__photo) { animation: tpl-story-text linear both; animation-timeline: view(); animation-range: entry 10% cover 34%; }
  }
}
@keyframes tpl-story-photo { from { clip-path: inset(12% 8% 12% 8% round var(--radius-xl, 24px)); opacity: .4; } to { clip-path: inset(0 0 0 0 round var(--radius-xl, 24px)); opacity: 1; } }
@keyframes tpl-story-text { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
