* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: light;
  --primary: #639c9c;
  --primary-dark: #507c7c;
  --glass: rgba(224, 235, 235, 0.5);
  --paper: #fff;
  --text: rgba(0, 0, 0, 0.87);
  --muted: rgba(0, 0, 0, 0.62);
  --border: rgba(99, 156, 156, 0.38);
  --radius-outer: 28px;
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-control: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Minion Pro", "Sabon LT Pro", Georgia, serif;
  font-size: 17px;
  color: var(--text);
  background: #dbe7e7;
  isolation: isolate;
}

body:before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  /* Houd de foto stabiel als de mobiele browserbalk in- of uitklapt. */
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  background:
    linear-gradient(rgba(224, 235, 235, 0.6), rgba(224, 235, 235, 0.6)),
    url("../img/homepage.jpeg") center top / cover no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  padding: 7px 18px;
}

.logo-link {
  display: block;
  width: min(420px, 75vw);
  height: 68px;
}

.logo-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-main {
  padding: 104px 28px 40px;
  min-height: 100vh;
}

.home-grid {
  max-width: 1536px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr);
  gap: 34px;
  align-items: start;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(5px);
  border-radius: var(--radius-outer);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.home-announcement {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid var(--border);
  border-left: 6px solid var(--primary-dark);
  background: rgba(244, 249, 247, 0.94);
  overflow-wrap: anywhere;
}

.home-announcement-label {
  display: block;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-announcement-title {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

.home-announcement-description {
  margin: 8px 0 0;
  white-space: pre-line;
}

.paper {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.about-paper {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.section-kicker {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 2px;
  color: var(--text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  margin: 1.1em 0 0.5em;
}

h2:first-child,
h3:first-child {
  margin-top: 0;
}

p {
  line-height: 1.62;
  margin: 0.8em 0;
}

.markdown-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-inner);
  margin: 18px auto;
}

.about-card .markdown > p:last-child {
  margin-bottom: 0;
}

.about-card .markdown > p:last-child .markdown-image {
  margin-bottom: 0;
}

.agenda-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn,
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--primary-dark);
}

.tab-btn {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  padding: 6px 16px;
  color: var(--primary);
  outline: none;
}

.tab-btn.active {
  border-color: rgba(99, 156, 156, 0.55);
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(99, 156, 156, 0.22);
}

.btn-outline {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn:hover,
.tab-btn:hover {
  background: rgba(99, 156, 156, 0.14);
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  background: var(--paper);
  border: 1px solid rgba(99, 156, 156, 0.16);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(31, 55, 55, 0.08);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px;
  background: #eef4f3;
  border-radius: 12px;
  color: var(--primary-dark);
  line-height: 1;
}

.event-day {
  font-size: 2.15rem;
  font-weight: 700;
}

.event-month {
  margin-top: 4px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-year {
  margin-top: 7px;
  font-size: 0.78rem;
  color: var(--muted);
}

.event-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-time {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
}

.event-location {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eee;
  border-radius: 999px;
  padding: 3px 9px 3px 6px;
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0 0 4px;
}

.location-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: #737373;
}

.event-composers {
  margin: 7px 0 0;
  line-height: 1.4;
}

.event-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(99, 156, 156, 0.22);
  gap: 7px;
  color: var(--primary-dark);
  font-weight: 700;
}

.event-link:hover,
.event-link:focus-visible {
  color: #365e5e;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.event-card-compact {
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.event-card-compact .event-date {
  padding-top: 8px;
  padding-bottom: 8px;
}

.event-card-compact .event-day {
  font-size: 1.8rem;
}

.archive-panel[hidden],
.agenda-panel[hidden] {
  display: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 0 2px;
}

.page-link {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(99, 156, 156, 0.4);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--primary-dark);
  font-weight: 650;
}

.page-link:hover {
  background: #fff;
  border-color: var(--primary);
}

.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-arrow {
  font-size: 1.4rem;
}

.mobile-agenda {
  display: none;
  width: 100%;
  margin-bottom: 22px;
}

.liturgy-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.liturgy-shell {
  --shell-padding: 24px;
  --body-padding: 26px;
  --liturgy-inner-radius: 12px;
  background: var(--glass);
  border-radius: 32px;
  padding: var(--shell-padding);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.liturgy-body {
  background: var(--paper);
  border-radius: 20px;
  padding: var(--body-padding);
}

.liturgy-body > .church-year,
.liturgy-body > .welcome-box,
.liturgy-body > .next-box,
.liturgy-body > .footer-box {
  border-radius: var(--liturgy-inner-radius);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-dark);
  font-weight: 600;
  margin: 0;
}

.link-arrow {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.liturgy-shell > h1 {
  margin: 24px 0 8px;
}

.liturgy-date {
  margin: 0 0 16px;
  line-height: 1.4;
}

.church-year {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
}

.welcome-box {
  background: rgba(224, 235, 235, 0.55);
  border-radius: var(--radius-inner);
  padding: 20px;
  margin: 18px 0;
}

.liturgy-body > .welcome-box:first-child {
  margin-top: 0;
}

.welcome-box > :last-child {
  margin-bottom: 0;
}

.next-box,
.footer-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 15px 16px;
}

.next-box {
  margin-top: 22px;
}

.next-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 2px;
  line-height: 1.4;
}

.next-details .chip {
  margin: 0;
}

.footer-box {
  margin-top: 12px;
}

.footer-box h3:first-child {
  margin: 0 0 10px;
}

.footer-box p {
  margin: 7px 0;
}

.footer-box ul {
  margin: 8px 0 4px;
  padding-left: 22px;
}

.footer-box .btn {
  margin-top: 9px;
}

.form-card {
  max-width: 760px;
  margin: 0 auto;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #b7c5c5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: inherit;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.form-row {
  margin-bottom: 16px;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
}

.notice.success {
  background: #e7f5eb;
}

.notice.error {
  background: #fde8e8;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

@media (max-width: 900px) {
  .site-main {
    padding: 430px 12px 30px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .mobile-agenda {
    display: flex;
  }

  .about-card {
    order: 1;
  }

  .agenda-card {
    order: 2;
  }

  .glass {
    padding: 16px;
  }

  .liturgy-shell {
    --shell-padding: 14px;
    --body-padding: 18px;
  }

  .site-main:not(.home) {
    padding-top: 110px;
  }
}

@media (max-width: 520px) {
  .event-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .agenda-head .tab-btn {
    font-size: 1.55rem;
    padding: 7px 10px;
  }

  .site-header {
    min-height: 70px;
  }

  .logo-link {
    height: 58px;
  }

  .liturgy-shell {
    --body-padding: 14px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .site-header {
    min-height: 48px;
    padding: 4px 18px;
  }

  .logo-link {
    width: min(260px, 60vw);
    height: 40px;
  }

  .site-main:not(.home) {
    padding-top: 64px;
  }
}

.newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.newsletter-consent input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin-top: 0.3rem;
}

/* Shared newsletter invitation on the homepage and below a liturgy. */
.newsletter-signup {
  margin-top: 28px;
  padding: 26px;
  border-radius: 16px;
  background: #f3f7f5;
  border-top: 3px solid #639c9c;
  color: #2d4038;
}
.newsletter-signup-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #52796e;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.newsletter-signup-heading svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.newsletter-signup h2 {
  margin: 14px 0 10px;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.2;
}
.newsletter-signup > p {
  margin: 0 0 20px;
  line-height: 1.5;
}
.newsletter-signup .newsletter-email-label {
  margin: 0 0 7px;
  font-size: 16px;
}
.newsletter-signup-controls {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.newsletter-signup-controls input {
  flex: 1 1 200px;
  min-width: 0;
  background: #fff;
}
.newsletter-signup-controls .btn {
  border: 1px solid #9db8af;
  border-radius: 10px;
  padding: 10px 18px;
  gap: 12px;
  margin: 0;
}
.newsletter-signup .newsletter-consent {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.4;
}
.newsletter-signup .newsletter-signup-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #596c63;
}
@media (max-width: 600px) {
  .newsletter-signup {
    padding: 20px;
  }
}
@media print {
  .newsletter-signup {
    display: none;
  }
}

.home-invitations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.home-invitations > .newsletter-signup {
  min-width: 0;
  margin-top: 0;
}

.home-invitations .newsletter-signup-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.home-invitations .newsletter-signup-controls input {
  width: 100%;
}

.home-invitations .newsletter-signup-controls .btn {
  justify-self: start;
  margin: 0;
}

@media (max-width: 600px) {
  .home-invitations {
    grid-template-columns: 1fr;
  }
}

/* Standalone public forms and confirmation states. */
.newsletter-page,
.prayer-page,
.donation-page {
  max-width: 660px;
  margin: 20px auto 0;
}

.newsletter-page > .back-link,
.prayer-page > .back-link,
.donation-page > .back-link {
  margin: 0 0 16px 4px;
}

.newsletter-page-kicker,
.prayer-page-kicker,
.donation-page-kicker {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1.4;
}

.newsletter-page h1,
.prayer-page h1,
.donation-page h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.15;
  font-weight: 600;
}

.newsletter-page-card > p:not(.newsletter-page-kicker),
.prayer-page-card > p:not(.prayer-page-kicker) {
  margin: 0 0 22px;
}

.newsletter-page .btn,
.prayer-page .btn,
.donation-page .btn {
  min-height: 44px;
  border-color: #9db8af;
  border-radius: 10px;
}

.newsletter-page-card > p.newsletter-page-secondary {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.newsletter-page-secondary a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.newsletter-page a:focus-visible,
.prayer-page a:focus-visible,
.newsletter-page button:focus-visible,
.prayer-page button:focus-visible,
.donation-page a:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 4px;
}

.newsletter-page-note,
.prayer-page-note,
.donation-page-note {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.newsletter-page .newsletter-consent {
  font-weight: 400;
}

.newsletter-page-card > :last-child,
.prayer-page-card > :last-child,
.donation-page-card > :last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .newsletter-page,
  .prayer-page,
  .donation-page {
    margin-top: 0;
  }
  .newsletter-page-card,
  .prayer-page-card,
  .donation-page-card {
    padding: 24px 20px;
  }
}

.prayer-page-note {
  display: block;
  margin-top: 8px;
}

.donation-page-card > .markdown {
  margin-bottom: 24px;
}

.donation-page-note {
  margin: 18px 0 0;
}

.donation-page-card h2 {
  font-size: 23px;
  line-height: 1.3;
}

.donation-account {
  margin: 24px 0;
}

.donation-account dt {
  color: var(--muted);
  font-size: 15px;
}

.donation-account dd {
  margin: 4px 0 18px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
