/* Shared manual controls for the prayer library and both recovery programmes. */
.parish-carousel {
  --coverflow-gutter: clamp(12px, 7%, 58px);
  --coverflow-shift: 29%;
  --coverflow-depth: -50px;
  --coverflow-angle: 13deg;
  --coverflow-scale: .84;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
.parish-carousel-title {
  margin: 0;
  color: #173c32;
  text-align: center;
  font: 700 clamp(22px, 3vw, 30px)/1.2 Georgia, serif;
}
.parish-carousel-viewport {
  min-width: 0;
  padding: 5px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.parish-carousel[data-ready] .parish-carousel-viewport {
  overflow: clip;
  scroll-snap-type: none;
  touch-action: pan-y pinch-zoom;
}
.parish-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  column-gap: 10px;
}
.parish-carousel-track > a {
  scroll-snap-align: start;
  min-width: 0;
}
.parish-carousel[data-ready] .parish-carousel-track {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  perspective: 780px;
}
.parish-carousel[data-ready] .parish-carousel-track > a {
  grid-area: 1 / 1;
  justify-self: center;
  width: calc(100% - var(--coverflow-gutter) * 2);
  transform: translate3d(calc(var(--slide-x, 0%) + var(--carousel-drag, 0px)), 0, var(--slide-z, 0px))
    rotateY(var(--slide-angle, 0deg)) scale(var(--slide-scale, 1));
}
.parish-carousel[data-moving] .parish-carousel-track > a {
  transition: transform 340ms cubic-bezier(.22,.7,.25,1), opacity 280ms ease;
}
.parish-carousel [data-coverflow="center"] {
  z-index: 3;
}
.parish-carousel :is([data-coverflow="left"], [data-coverflow="right"]) {
  --slide-z: var(--coverflow-depth);
  --slide-scale: var(--coverflow-scale);
  z-index: 2;
  opacity: .78;
}
.parish-carousel :is([data-coverflow="left"], [data-coverflow="far-left"]) {
  --slide-x: calc(-1 * var(--coverflow-shift));
  --slide-angle: var(--coverflow-angle);
}
.parish-carousel :is([data-coverflow="right"], [data-coverflow="far-right"]) {
  --slide-x: var(--coverflow-shift);
  --slide-angle: calc(-1 * var(--coverflow-angle));
}
.parish-carousel :is([data-coverflow="far-left"], [data-coverflow="far-right"]) {
  --slide-z: -110px;
  --slide-scale: .76;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
.parish-carousel[data-dragging] .parish-carousel-track {
  cursor: grabbing;
  user-select: none;
}
.parish-carousel[data-dragging] .parish-carousel-track > a { cursor: grabbing; }
.parish-carousel .parish-prayer-card:hover { transform: none; }
.parish-carousel .parish-prayer-copy p { overflow-wrap: anywhere; }
.parish-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}
.parish-carousel-controls[hidden] { display: none; }
.parish-carousel-controls button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d6b16c;
  border-radius: 50%;
  color: #173c32;
  background: #fffaf1;
  font: 24px/1 Georgia, serif;
  cursor: pointer;
}
.parish-carousel-controls button:hover { background: #f4e9d5; }
.parish-carousel-controls button:focus-visible {
  outline: 3px solid #795c30;
  outline-offset: 2px;
}
.parish-carousel-progress {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 68px;
  color: #173c32;
  font: 600 14px/1.2 Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.parish-carousel-progress progress { width: 68px; height: 5px; accent-color: #795c30; }
.parish-carousel[data-carousel="prayers"] {
  --coverflow-gutter: clamp(12px, 8.5%, 84px);
  max-width: 1020px;
  margin-inline: auto;
}
.recovery-carousels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
.recovery-carousels .parish-carousel {
  grid-template-rows: subgrid;
  grid-row: span 3;
}
.recovery-carousels .parish-carousel-track { min-height: 100%; }
.recovery-page .parish-carousel .parish-prayer-card {
  grid-template-columns: minmax(0,1fr) 44px;
  grid-template-rows: auto minmax(auto,1fr);
  gap: 0 12px;
  padding-inline-end: 15px;
  align-content: stretch;
  height: 100%;
}
.recovery-page .parish-carousel .parish-card-art {
  --parish-wave: 23px;
  grid-column: 1 / -1;
  width: calc(100% + 15px);
  height: clamp(134px, 18vw, 184px);
}
.recovery-page .parish-carousel .parish-card-art img {
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--parish-wave) + 1px) no-repeat,
    url("/assets/primary-cards/wave-mask.svg") bottom / 100% var(--parish-wave) no-repeat;
}
.recovery-page .parish-carousel .parish-card-art::after {
  inset: auto 0 0;
  width: 100%;
  height: var(--parish-wave);
  background-image: url("/assets/primary-cards/wave-line.svg");
}
.recovery-page .parish-carousel .parish-prayer-copy { align-self: start; padding: 13px 0 18px 16px; }
.recovery-page .parish-carousel .parish-prayer-copy h3 { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.12; }
.recovery-page .parish-carousel .parish-prayer-arrow { margin-inline-start: 0; }
.parish-carousel .parish-card-art .parish-illustration-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mask:
    linear-gradient(#000, #000) left / calc(100% - var(--parish-wave) + 1px) 100% no-repeat,
    url("/assets/parish-cards/edge-mask.svg") right / var(--parish-wave) 100% no-repeat;
}
.parish-carousel .parish-card-art .parish-illustration-crop img {
  mask: none;
  transform: scale(1.24);
  transform-origin: 30% 32%;
}
.parish-carousel .parish-illustration-crop img:is([src$="/panakhyda.webp"], [src$="/twelve_steps.webp"]) {
  transform-origin: 64% 32%;
}
.recovery-page .parish-carousel .parish-illustration-crop img[src$="/twelve_steps.webp"] {
  object-position: center 27%;
}
.recovery-page .parish-carousel .parish-card-art .parish-illustration-crop {
  mask:
    linear-gradient(#000, #000) top / 100% calc(100% - var(--parish-wave) + 1px) no-repeat,
    url("/assets/primary-cards/wave-mask.svg") bottom / 100% var(--parish-wave) no-repeat;
}
@media (max-width: 520px) {
  .home-page .parish-carousel .parish-card-art .parish-illustration-crop {
    mask:
      linear-gradient(#000, #000) top / 100% calc(100% - var(--parish-wave) + 1px) no-repeat,
      url("/assets/primary-cards/wave-mask.svg") bottom / 100% var(--parish-wave) no-repeat;
  }
  .home-page .parish-carousel .parish-illustration-crop img[src$="/messa.webp"] { object-position: center top; }
}
.parish-carousel-number {
  display: block;
  margin-bottom: 6px;
  color: #795c30;
  font: 700 13px/1.25 Inter, Arial, sans-serif;
}
@media (min-width: 761px) {
  .parish-carousel[data-carousel="prayers"] { grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; }
  [data-carousel="prayers"] .parish-carousel-viewport { grid-area: 1 / 2; }
  [data-carousel="prayers"] .parish-carousel-controls:not([hidden]) { display: contents; }
  [data-carousel="prayers"] [data-slide="-1"] { grid-area: 1 / 1; }
  [data-carousel="prayers"] [data-slide="1"] { grid-area: 1 / 3; }
  [data-carousel="prayers"] .parish-carousel-progress { grid-area: 2 / 2; }
}
@media (max-width: 760px) {
  .recovery-carousels { grid-template-columns: minmax(0, 1fr); }
  .recovery-carousels .parish-carousel { grid-template-rows: auto auto auto; grid-row: auto; }
}
@media (max-width: 520px) {
  .parish-carousel, .parish-carousel[data-carousel="prayers"] {
    --coverflow-gutter: clamp(10px, 3.6%, 18px);
    --coverflow-shift: 20%;
    --coverflow-depth: -24px;
    --coverflow-angle: 7deg;
    --coverflow-scale: .91;
  }
}
@media (prefers-reduced-motion: reduce) {
  .parish-carousel[data-moving] .parish-carousel-track > a { transition: none; }
}

/* Publication status belongs to the card, independently of the document release. */
.parish-release-status {
  display: inline-block;
  margin-top: 8px;
  color: #6b5027;
  font: 700 .82rem/1.35 Inter, Arial, sans-serif;
}
.parish-catalog-intro, .parish-program-variant {
  margin: 0 auto 18px;
  color: #43554c;
  font: 400 1rem/1.55 Inter, Arial, sans-serif;
  text-align: center;
  max-width: 62ch;
}
.parish-program-variant { margin: 20px auto 0; }
.parish-program-variant a { color: #173c32; text-underline-offset: .16em; }
.parish-variant-list li + li { margin-top: .65em; }
.parish-variant-list .parish-release-status { margin-left: .4em; }
.reading .parish-release-status { margin: 0 0 .6rem; }
