/* Craft CMS front additions */

.nav-link.is-active,
.nav-link--parent.is-active,
.nav-item.is-active > .nav-link--parent {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.site-header.is-scrolled .nav-link.is-active,
.site-header--solid .nav-link.is-active,
.site-header.is-scrolled .nav-link--parent.is-active,
.site-header--solid .nav-link--parent.is-active {
  text-decoration: underline;
}

.mobile-nav__link.is-active,
.mobile-nav__group.is-active > .mobile-nav__toggle,
.mobile-nav__sub a.is-active {
  font-weight: 600;
  color: var(--color-cathedral, #0d6e6e);
}

.page-builder {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-builder__text {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 46rem;
}

.page-builder__embed {
  width: 100%;
  overflow: hidden;
  border-radius: 0;
}

.page-builder__embed iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
}

.pb-slider {
  position: relative;
  overflow: hidden;
  background: #0f2a2a;
}

.pb-slider__slide {
  display: none;
}

.pb-slider__slide.is-active {
  display: block;
}

.pb-slider__slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

.pb-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.pb-slider__btn--prev { left: 0.75rem; }
.pb-slider__btn--next { right: 0.75rem; }

.pb-slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.pb-slider__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.pb-slider__dot.is-active {
  background: #fff;
}

.page .container {
  padding-top: 7rem;
  padding-bottom: 4rem;
}

@media (max-width: 767.98px) {
  .page .container {
    padding-top: 5.5rem;
  }
}

/* Article pages already offset the header via .page; extra container padding
   pushed the column down and made inner rite pages look broken. */
.page:has(.rite-page) > .container,
.page:has(.news-article) > .container {
  padding-top: 0;
  padding-bottom: 0;
}

.rite-page .page-builder {
  margin-top: 0.5rem;
}

.rite-page .page-builder__text {
  max-width: none;
}

/* Schedule page: adaptive sheet + fullscreen-friendly lightbox */
.page--schedule .schedule-week {
  display: block;
  margin-top: 1.5rem;
}

.schedule-sheet--page {
  max-width: min(100%, 42rem);
  margin-inline: auto;
}

.schedule-week--solo {
  display: block;
}

.schedule-week--solo .schedule-sheet--page {
  max-width: min(100%, 42rem);
  margin-inline: auto;
}

.schedule-sheet--page .schedule-sheet__zoom {
  position: relative;
}

.schedule-sheet--page img {
  width: 100%;
  height: auto;
  max-height: min(78vh, 920px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top center;
  background: #f3f5f6;
}

.schedule-sheet--page .schedule-sheet__pdf-preview {
  min-height: min(78vh, 920px);
}

.schedule-sheet__hint {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  color: #fff;
  background: rgba(20, 28, 32, 0.72);
  border-radius: 0.35rem;
  pointer-events: none;
  opacity: 0.95;
}

@media (min-width: 992px) {
  .schedule-sheet__hint {
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .schedule-sheet--page .schedule-sheet__zoom:hover .schedule-sheet__hint,
  .schedule-sheet--page .schedule-sheet__zoom:focus-visible .schedule-sheet__hint {
    opacity: 1;
  }
}

/* Fullscreen lightbox for tall A4 sheets */
.lightbox.lightbox--schedule .lightbox__inner {
  width: min(100vw - 1rem, 1100px);
  max-height: calc(100dvh - 1rem);
  height: calc(100dvh - 1rem);
}

.lightbox.lightbox--schedule .lightbox__image {
  max-width: calc(100vw - 1rem);
  max-height: calc(100dvh - 1rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.lightbox__pdf {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.lightbox__open-file {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(20, 28, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
}

.lightbox__open-file:hover {
  color: #fff;
  background: rgba(20, 28, 32, 0.9);
}

@media (max-width: 767.98px) {
  .lightbox.lightbox--schedule {
    padding: 0.35rem;
  }

  .lightbox.lightbox--schedule .lightbox__inner,
  .lightbox.lightbox--schedule .lightbox__image {
    max-width: 100vw;
    max-height: 100dvh;
    width: auto;
    height: auto;
  }

  .schedule-sheet--page img {
    max-height: min(70vh, 720px);
  }

  .schedule-sheet--page .schedule-sheet__pdf-preview {
    min-height: min(70vh, 720px);
  }

  .lightbox__open-file {
    top: 0.75rem;
    left: 0.75rem;
  }
}
