/* Parish Liturgical Library — Liturgical Reader MVP 0.8.8
 * Reader zachowuje pełną szerokość kontenera. Tryb Karty ogranicza jedynie miarę bloku tekstowego,
 * pozostawiając powierzchnię karty na pełnej szerokości przekazanej przez szablon.
 */
.pll-structured{
  --pll-reader-surface:#fffdf8;
  --pll-reader-surface-2:#fbf7ef;
  --pll-reader-line:#e7dfd1;
  --pll-reader-text:#20201d;
  --pll-reader-muted:#777168;
  --pll-reader-accent:#b47a18;
  --pll-reader-accent-soft:#f4ead4;
  --pll-reader-shadow:0 18px 46px rgba(54,43,25,.10),0 3px 10px rgba(54,43,25,.05);
  --pll-reader-radius:18px;
  --pll-reader-serif:Georgia,"Times New Roman",serif;
  --pll-reader-sans:inherit;
  --pll-reader-sticky-offset:0px;
  --pll-reader-text-width:600px;
  --pll-reader-content-inset:clamp(1rem,3vw,2.5rem);
  --pll-reader-section-gap:clamp(3.5rem,7vw,6.5rem);
  --pll-reader-art-opacity:.27;
  --pll-reader-art-width:40%;
  --pll-reader-art-right:clamp(1rem,2.5vw,2rem);
  --pll-reader-art-bottom:clamp(.85rem,2vw,1.5rem);
  color:var(--pll-reader-text);
  width:100%;
  max-width:none;
  margin:0;
}
.pll-structured *{box-sizing:border-box}
.pll-structured--before{margin-bottom:var(--pll-reader-section-gap)}
.pll-structured--after{margin-top:var(--pll-reader-section-gap)}
/* Ręcznie osadzony shortcode nie narzuca odstępów otaczającemu layoutowi. */
.pll-structured--manual{margin-top:0;margin-bottom:0}

.pll-structured__celebrations{display:grid;gap:2.25rem;width:100%;max-width:none}
.pll-structured__celebration{position:relative;min-width:0;width:100%;max-width:none}
.pll-structured__celebration-title{margin:0 0 .85rem;font-size:1.1rem;line-height:1.3;font-weight:600}

.pll-structured__nav-row{position:relative;width:100%;max-width:none}

/* Pozioma ścieżka czytań — nie wygląda jak zestaw przycisków. */
.pll-structured__tabs{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:0;
  width:100%;
  max-width:none;
  padding:.15rem 0 1rem;
  margin:1em 0 2em;
  border:0;
  background:transparent;
}
.pll-structured__tabs::before{
  content:"";
  position:absolute;
  z-index:0;
  top:1.18rem;
  left:8%;
  right:8%;
  height:1px;
  background:var(--pll-reader-line);
}
.pll-structured__tab{
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  z-index:1;
  display:flex;
  flex:1 1 0;
  flex-direction:column;
  align-items:center;
  gap:.42rem;
  min-width:0;
  padding:0 .35rem;
  border:0;
  background:transparent;
  color:var(--pll-reader-muted);
  font:inherit;
  font-size:.84rem;
  font-weight:500;
  line-height:1.2;
  text-align:center;
  cursor:pointer;
}
.pll-structured__tab-index{
  display:grid;
  place-items:center;
  width:2.08rem;
  height:2.08rem;
  border:1px solid var(--pll-reader-line);
  border-radius:50%;
  background:var(--pll-reader-surface);
  color:var(--pll-reader-muted);
  box-shadow:0 1px 4px rgba(54,43,25,.06);
  font-size:.76rem;
  font-weight:650;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.pll-structured__tab-context{display:block;max-width:10rem;margin-top:.04rem;color:var(--pll-reader-muted);font-size:.68rem;font-weight:500;line-height:1.16}
.pll-structured__tab-label{display:block;max-width:9rem}
.pll-structured__tab:hover{color:var(--pll-reader-text)}
.pll-structured__tab:hover .pll-structured__tab-index{border-color:color-mix(in srgb,var(--pll-reader-accent) 35%,var(--pll-reader-line));transform:translateY(-1px)}
.pll-structured__tab:focus-visible{outline:2px solid var(--pll-reader-accent);outline-offset:4px;border-radius:4px}
.pll-structured__tab.is-active{color:var(--pll-reader-text);font-weight:650}
.pll-structured__tab.is-active .pll-structured__tab-index{
  border-color:var(--pll-reader-accent);
  background:var(--pll-reader-accent);
  color:#fff;
  box-shadow:0 5px 14px color-mix(in srgb,var(--pll-reader-accent) 24%,transparent);
  transform:scale(1.04);
}

/* Mobilny/kompaktowy opis aktywnego kroku. */
.pll-structured__compact-nav{
  display:none;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:.5rem;
  margin:0 0 .85rem;
}
.pll-structured__compact-arrow{
  appearance:none;
  -webkit-appearance:none;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--pll-reader-muted);
  font:inherit;
  font-size:2rem;
  font-weight:300;
  line-height:1;
  cursor:pointer;
}
.pll-structured__compact-arrow:hover,.pll-structured__compact-arrow:focus-visible{background:var(--pll-reader-accent-soft);color:var(--pll-reader-text);outline:none}
.pll-structured__compact-arrow:disabled{opacity:.25;cursor:default;background:transparent}
.pll-structured__compact-current{text-align:center;min-width:0}
.pll-structured__compact-count{display:block;margin-bottom:.15rem;color:var(--pll-reader-muted);font-size:.72rem;line-height:1.15}
.pll-structured__compact-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.96rem;line-height:1.25}

/* Karta czytania. */
.pll-structured__panels{position:relative;min-width:0;width:100%;max-width:none}
.pll-structured__panel{
  --pll-reading-art:url("../img/reader/domyslny-polska-parafia-w-londynie.webp");
  position:relative;
  width:100%;
  max-width:none;
  min-width:0;
  min-height:clamp(24rem,52vh,42rem);
  overflow:hidden;
  padding:clamp(1.5rem,3.2vw,3.5rem);
  border:1px solid var(--pll-reader-line);
  border-radius:var(--pll-reader-radius);
  background:
    radial-gradient(circle at 88% 14%,rgba(180,122,24,.055),transparent 25%),
    linear-gradient(145deg,var(--pll-reader-surface),var(--pll-reader-surface-2));
  box-shadow:var(--pll-reader-shadow);
}
.pll-structured__panel::after{
  content:"ΑΩ";
  position:absolute;
  top:1.45rem;
  right:clamp(1.2rem,3vw,2.8rem);
  color:var(--pll-reader-accent);
  font-family:var(--pll-reader-serif);
  font-size:clamp(2rem,4vw,4.25rem);
  line-height:1;
  opacity:.075;
  pointer-events:none;
  user-select:none;
}

/* Dekoracje przypisane semantycznie do roli czytania.
 * Są osobnymi lekkimi SVG w assets/img/reader, więc można je później bezpiecznie podmienić. */
.pll-structured__panel--first-reading{--pll-reading-art:url("../img/reader/pierwsze-czytanie-polska-parafia-w-londynie.webp")}
.pll-structured__panel--psalm{--pll-reading-art:url("../img/reader/psalm-polska-parafia-w-londynie.webp")}
.pll-structured__panel--second-reading{--pll-reading-art:url("../img/reader/drugie-czytanie-polska-parafia-w-londynie.webp")}
.pll-structured__panel--acclamation{--pll-reading-art:url("../img/reader/aklamacja-polska-parafia-w-londynie.webp")}
.pll-structured__panel--gospel{--pll-reading-art:url("../img/reader/ewangelia-polska-parafia-w-londynie.webp")}
.pll-structured__panel--sequence,.pll-structured__panel--other{--pll-reading-art:url("../img/reader/domyslny-polska-parafia-w-londynie.webp")}
/* Progressive enhancement: bez JS wszystkie panele pozostają po kolei czytelne. */
.pll-structured.is-enhanced .pll-structured__panel{display:none}
.pll-structured.is-enhanced .pll-structured__panel.is-active{display:block}
.pll-structured.is-enhanced .pll-structured__panel.is-entering{animation:pll-reader-enter .26s ease both}
@keyframes pll-reader-enter{from{opacity:.12}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.pll-structured.is-enhanced .pll-structured__panel.is-entering{animation:none}.pll-structured__tab-index{transition:none}}

.pll-reading__role-heading{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.pll-reading__header{position:relative;z-index:1;margin:0 0 1.25rem;padding-right:clamp(0rem,8vw,7rem)}
.pll-reading__context{margin:0 0 .42rem;color:var(--pll-reader-muted);font-family:var(--pll-reader-sans);font-size:.76rem;font-weight:600;line-height:1.3;letter-spacing:.04em;text-transform:uppercase}
.pll-reading__siglum{margin:0 0 .7rem;color:var(--pll-reader-accent);font-family:var(--pll-reader-sans);font-size:.88rem;font-style:italic;font-weight:500;line-height:1.3}
.pll-reading__subtitle{
  margin:0 0 .75rem;
  color:var(--pll-reader-text);
  font-family:var(--pll-reader-serif);
  font-size:1.75em;
  font-weight:600;
  line-height:1.08;
  letter-spacing:-.02em;
}
.pll-reading__source{color:var(--pll-reader-text);font-family:var(--pll-reader-sans);font-size:.94rem;font-style:italic;line-height:1.5}
.pll-reading__separator{
  position:relative;
  width:5.25rem;
  height:.75rem;
  margin:.95rem 0 1.25rem;
}
.pll-reading__separator::before{
  content:"";
  position:absolute;
  top:50%;
  left:0;
  right:0;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--pll-reader-accent) 22%,var(--pll-reader-accent) 78%,transparent);
  opacity:.58;
}
.pll-reading__separator::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:.38rem;
  height:.38rem;
  border:1px solid var(--pll-reader-accent);
  background:var(--pll-reader-surface);
  transform:translate(-50%,-50%) rotate(45deg);
}
.pll-reading__end-ornament{
  width:4.6rem;
  height:2.15rem;
  margin:1.45rem auto .1rem;
  background:url("../img/reader/koncowa-galazka-polska-parafia-w-londynie.webp") center/contain no-repeat;
  opacity:.92;
}
.pll-reading__content{
  position:relative;
  z-index:1;
  width:100%;
  max-width:none;
  color:var(--pll-reader-text);
  font-family:var(--pll-reader-serif);
  font-size:clamp(1.02rem,1.18vw,1.14rem);
  line-height:1.82;
}
.pll-reading__content p{margin:0 0 1em}
.pll-reading__content p:last-child{margin-bottom:0}
.pll-reading__content strong{font-weight:650}
.pll-reading__content.is-missing{
  padding:1rem 1.1rem;
  border-left:3px solid var(--pll-reader-line);
  background:rgba(255,255,255,.55);
  color:var(--pll-reader-muted);
  font-family:var(--pll-reader-sans);
}


/* ============================
 * TRYB KARTY
 * ============================
 * To jest świadomie osobny tryb. Automatyczne nadal wybiera Tabs/Accordion.
 */
.pll-structured__celebration.is-cards .pll-structured__accordion-trigger{display:none}
 .pll-structured__celebration.is-cards .pll-structured__panels{
  position:relative;
  isolation:isolate;
  width:100%;
  max-width:none;
  padding:0;
}
/* Tryb Karty pokazuje jedną kartę. Nie symulujemy stosu na dolnej krawędzi. */
.pll-structured__celebration.is-cards .pll-structured__panels::before,
.pll-structured__celebration.is-cards .pll-structured__panels::after{display:none!important}
.pll-structured__celebration.is-cards .pll-structured__panel{
  z-index:2;
  min-height:clamp(25rem,52vh,42rem);
  padding:clamp(1.7rem,3.6vw,3.8rem);
  border-color:color-mix(in srgb,var(--pll-reader-line) 88%,#fff);
  background:#fffdf9;
  box-shadow:0 22px 54px rgba(54,43,25,.13),0 4px 12px rgba(54,43,25,.06);
}
.pll-structured__celebration.is-cards .pll-structured__panel::after{display:none}
.pll-structured__celebration.is-cards .pll-structured__panel::before{
  content:"";
  position:absolute;
  z-index:0;
  right:var(--pll-reader-art-right);
  bottom:var(--pll-reader-art-bottom);
  width:var(--pll-reader-art-width);
  max-width:40%;
  aspect-ratio:3/2;
  background-image:var(--pll-reading-art,none);
  background-repeat:no-repeat;
  background-position:right bottom;
  background-size:contain;
  opacity:var(--pll-reader-art-opacity);
  pointer-events:none;
  user-select:none;
}
/* Na szerokich ekranach tekst pozostaje po lewej, a prawa część karty jest wolna dla ilustracji. */
.pll-structured__celebration.is-cards .pll-reading__header,
.pll-structured__celebration.is-cards .pll-reading__content{
  width:min(var(--pll-reader-text-width),calc(100% - var(--pll-reader-content-inset)));
  max-width:var(--pll-reader-text-width);
  margin-left:var(--pll-reader-content-inset);
  margin-right:auto;
}
.pll-structured__celebration.is-cards .pll-reading__header{padding-right:0;text-align:left}
.pll-structured__celebration.is-cards .pll-reading__content{position:relative;z-index:1}
.pll-structured__card-arrow{display:none}
.pll-structured__celebration.is-cards .pll-structured__nav-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 48px;
  align-items:center;
  gap:clamp(.55rem,1.3vw,1rem);
}
.pll-structured__celebration.is-cards .pll-structured__nav-row .pll-structured__tabs{margin:1em 0 2em}
.pll-structured__celebration.is-cards .pll-structured__card-arrow{
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  z-index:5;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid var(--pll-reader-line);
  border-radius:50%;
  background:#fff;
  color:var(--pll-reader-muted);
  box-shadow:0 4px 14px rgba(54,43,25,.07);
  font:inherit;
  font-size:1.75rem;
  font-weight:300;
  line-height:1;
  cursor:pointer;
}
.pll-structured__celebration.is-cards .pll-structured__card-arrow:hover,
.pll-structured__celebration.is-cards .pll-structured__card-arrow:focus-visible{border-color:var(--pll-reader-accent);color:var(--pll-reader-accent);outline:none}
.pll-structured__celebration.is-cards .pll-structured__card-arrow:disabled{opacity:.22;cursor:default;border-color:var(--pll-reader-line);color:var(--pll-reader-muted)}
.pll-structured__celebration.is-cards .pll-structured__card-arrow:not([hidden]){display:grid}


/* Subtelna sugestia przełożenia kartki, bez ciężkiej fizyki flipbooka. */
.pll-structured.is-enhanced .pll-structured__celebration.is-cards .pll-structured__panel.is-entering[data-pll-direction="next"]{animation:pll-card-next .32s cubic-bezier(.22,.7,.22,1) both}
.pll-structured.is-enhanced .pll-structured__celebration.is-cards .pll-structured__panel.is-entering[data-pll-direction="prev"]{animation:pll-card-prev .32s cubic-bezier(.22,.7,.22,1) both}
@keyframes pll-card-next{from{opacity:.08;transform:translateX(52px) rotate(.35deg)}to{opacity:1;transform:none}}
@keyframes pll-card-prev{from{opacity:.08;transform:translateX(-52px) rotate(-.35deg)}to{opacity:1;transform:none}}

/* Accordion pozostaje pełnoprawnym fallbackiem/trybem responsywnym. */
.pll-structured__celebration.is-accordion .pll-structured__tabs,.pll-structured__celebration.is-accordion .pll-structured__compact-nav{display:none!important}
.pll-structured__accordion-trigger{
  appearance:none;
  -webkit-appearance:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:48px;
  margin:0;
  padding:.8rem .15rem;
  border:0;
  border-bottom:1px solid var(--pll-reader-line);
  background:transparent;
  color:var(--pll-reader-text);
  font:inherit;
  font-weight:550;
  text-align:left;
  cursor:pointer;
}
.pll-structured__accordion-trigger::after{content:"+";color:var(--pll-reader-accent);font-size:1.2em;font-weight:400}
.pll-structured__accordion-trigger[aria-expanded="true"]::after{content:"−"}
.pll-structured__accordion-trigger:hover,.pll-structured__accordion-trigger:focus-visible{color:var(--pll-reader-accent);outline:none}
.pll-structured__celebration.is-accordion .pll-structured__panel{min-height:0;margin:.75rem 0 1.25rem;padding:clamp(1.25rem,4vw,2rem);box-shadow:0 8px 26px rgba(54,43,25,.08)}
.pll-structured__celebration.is-tabs .pll-structured__accordion-trigger{display:none}

/* Niewidoczny pomiar dla trybu Automatyczne. */
.pll-structured__probe{display:flex!important;flex-wrap:nowrap!important;visibility:hidden!important;position:absolute!important;left:0!important;right:0!important;pointer-events:none!important;margin:0!important}
.pll-structured__probe::before{display:none!important}
.pll-structured__probe .pll-structured__tab{flex:0 0 auto!important;white-space:nowrap!important}

@media(max-width:979px){
  .pll-structured__panel{min-height:clamp(22rem,46vh,34rem);padding:clamp(1.35rem,4.6vw,2.4rem)}
  .pll-reading__subtitle{font-size:1.75em}
}
@media(max-width:767px){
  .pll-structured__tabs{padding:.1rem 0 .45rem;margin:1em 0 .35rem}
  .pll-structured__tabs::before{top:.9rem;left:8%;right:8%}
  .pll-structured__tab{gap:0;padding:0 .15rem;font-size:.72rem}
  .pll-structured__tab-index{width:1.6rem;height:1.6rem;font-size:.66rem}
  .pll-structured__tab-context,.pll-structured__tab-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .pll-structured__celebration.is-tabs .pll-structured__compact-nav,
  .pll-structured__celebration.is-cards .pll-structured__compact-nav{display:grid;margin-bottom:2em}
  .pll-structured__panel{min-height:0;padding:1.45rem 1.15rem 1.65rem;border-radius:14px}
  .pll-structured__panel::after{top:1rem;right:1rem;font-size:2.3rem}
  .pll-reading__header{padding-right:2.25rem;margin-bottom:1rem}
  .pll-reading__siglum{font-size:.82rem;margin-bottom:.58rem}
  .pll-reading__subtitle{font-size:1.75em;line-height:1.1}
  .pll-reading__source{font-size:.9rem}
  .pll-reading__content{font-size:1.02rem;line-height:1.72}
}

@media(max-width:767px){
  .pll-structured__celebration.is-cards .pll-structured__nav-row{display:block}
  .pll-structured__celebration.is-cards .pll-structured__nav-row > .pll-structured__card-arrow{display:none!important}
  /* Mobilna nawigacja jest częścią Readera, pozostaje biała i przyklejona do jego granic. */
  .pll-structured__celebration.is-cards .pll-structured__tabs{
    position:sticky;
    top:var(--pll-reader-sticky-offset);
    z-index:12;
    margin-top:1em;
    margin-bottom:.05rem;
    padding:.45rem .2rem .25rem;
    background:#fff;
    box-shadow:0 1px 0 rgba(0,0,0,.035);
  }
  .pll-structured__celebration.is-cards .pll-structured__tabs::before{
    top:1.25rem;
  }
  .pll-structured__celebration.is-cards .pll-structured__compact-nav{
    display:grid;
    position:sticky;
    top:calc(var(--pll-reader-sticky-offset) + 2.65rem);
    z-index:11;
    margin-bottom:1.25rem;
    padding:.28rem 0 .55rem;
    background:#fff;
    box-shadow:0 1px 0 rgba(0,0,0,.035);
  }
  /* Karta może wyjść poza wąski content-column Divi, ale nigdy poza viewport. */
  .pll-structured__celebration.is-cards .pll-structured__panels{
    width:min(94vw,720px);
    max-width:94vw;
    margin-left:50%;
    transform:translateX(-50%);
    padding:0;
  }
  .pll-structured__celebration.is-cards .pll-structured__panel{
    width:100%;
    min-height:0;
    padding:1.6rem 1rem 1.9rem;
    border-radius:14px;
    overflow:hidden;
  }
  /* Około 80% viewportu pozostaje dla tekstu, a prawa część może pokazać ilustrację. */
  .pll-structured__celebration.is-cards .pll-reading__header,
  .pll-structured__celebration.is-cards .pll-reading__content{
    width:min(80vw,calc(100% - 2rem));
    max-width:80vw;
    margin-left:1rem;
    margin-right:auto;
    padding-right:0;
  }
  .pll-structured__celebration.is-cards .pll-reading__content,
  .pll-structured__celebration.is-cards .pll-reading__content *{
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:normal;
  }
  .pll-structured__celebration.is-cards .pll-reading__content img,
  .pll-structured__celebration.is-cards .pll-reading__content video,
  .pll-structured__celebration.is-cards .pll-reading__content iframe{height:auto}
  .pll-structured__celebration.is-cards .pll-structured__panel::before{
    right:.75rem;
    bottom:.75rem;
    width:38%;
    max-width:38%;
    opacity:.16;
  }
  .pll-structured__celebration.is-cards .pll-structured__card-arrow:not([hidden]){display:none}
  .pll-structured.is-enhanced .pll-structured__celebration.is-cards .pll-structured__panel.is-entering[data-pll-direction="next"]{animation:pll-card-mobile-next .3s cubic-bezier(.22,.7,.22,1) both}
  .pll-structured.is-enhanced .pll-structured__celebration.is-cards .pll-structured__panel.is-entering[data-pll-direction="prev"]{animation:pll-card-mobile-prev .3s cubic-bezier(.22,.7,.22,1) both}
}
@keyframes pll-card-mobile-next{from{opacity:.08;transform:translateX(36px) rotate(.7deg)}to{opacity:1;transform:none}}
@keyframes pll-card-mobile-prev{from{opacity:.08;transform:translateX(-36px) rotate(-.7deg)}to{opacity:1;transform:none}}

@media(max-width:430px){
  .pll-structured__celebrations{gap:1.5rem}
  .pll-structured__panel{padding:1.25rem .95rem 1.45rem;border-radius:12px}
}


/* Czytelność właściwych ogłoszeń w nowych biuletynach.
 * Celowo stylujemy tylko pierwszy poziom list w typowych kontenerach treści posta. */
body.pll-structured-bulletin :where(.et_pb_post_content,.entry-content,.post-content) > ul > li,
body.pll-structured-bulletin .ogloszenia-duszpasterskie > ul > li{
  padding-bottom:.9em;
  margin-bottom:.9em;
  border-bottom:1px solid rgba(180,122,24,.16);
}
body.pll-structured-bulletin :where(.et_pb_post_content,.entry-content,.post-content) > ul > li:last-child,
body.pll-structured-bulletin .ogloszenia-duszpasterskie > ul > li:last-child{border-bottom:0}
@media(prefers-reduced-motion:reduce){.pll-structured.is-enhanced .pll-structured__celebration.is-cards .pll-structured__panel.is-entering{animation:none!important}}
