*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f7f7f5;
  --white:     #ffffff;
  --grey-100:  #f0f0ee;
  --grey-200:  #e2e2de;
  --grey-400:  #9a9a94;
  --grey-600:  #5c5c58;
  --grey-800:  #2e2e2c;
  --green:     #3a5c3b;
  --green-mid: #4e7a50;
  --green-pale:#eef3ee;
  --border:    #d8d8d4;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--grey-800);
  font-size: 16px;
  line-height: 1.75;
}

body::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--green);
}

/* ── Header ── */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 1.8rem 1rem 1.6rem;
}

.parish-name {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 4vw, 1.9rem);
  color: var(--green);
}

.parish-subtitle {
  font-weight: 400;
  color: var(--grey-800);
  font-size: 0.97rem;
  margin-top: 0.3rem;
}

/* ── Nav ── */
.nav-toggle {
  display: none;
  width: 100%;
  background: var(--green);
  border: none;
  color: #fff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  padding: 0.85rem 1.2rem;
  text-align: left;
  cursor: pointer;
}
.nav-toggle .hamburger { float: right; }

nav {
  background: var(--green);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.75rem 1.2rem;
  display: block;
  border-bottom: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
nav a.active { color: #fff; border-bottom-color: rgba(255,255,255,0.5); }

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  nav { display: none; flex-direction: column; }
  nav.open { display: flex; }
  nav a {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-left: 3px solid transparent;
  }
  nav a.active {
    border-left-color: rgba(255,255,255,0.5);
    border-bottom-color: rgba(255,255,255,0.1);
  }
}

/* ── Layout ── */
.page-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ── Hero banner ── */
.hero-banner {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #2a3a2a;
}

@media (max-width: 640px) { .hero-banner { height: 220px; } }

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  opacity: 0.72;
}

.hero-banner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.hero-banner-text h1 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.hero-banner-text p {
  color: rgba(255,255,255,0.9);
  font-size: clamp(0.88rem, 2vw, 1.02rem);
  text-shadow: 0 1px 5px rgba(0,0,0,0.45);
  max-width: 540px;
  line-height: 1.6;
}

/* ── Welcome block (image + text side by side) ── */
.welcome-block {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin: 1.8rem 0;
}

.page-photo {
  display: block;
  max-width: 582px;
  width: 100%;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.welcome-block-text {
  flex: 1;
}

.welcome-mass-times {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.welcome-mass-times h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--green);
  margin-bottom: 0.65rem;
}

.welcome-block-text h1 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--green);
  margin-bottom: 0.9rem;
}

.welcome-block-text p {
  color: var(--grey-600);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  line-height: 1.7;
}

@media (max-width: 680px) {
  .welcome-block {
    flex-direction: column;
  }
  .page-photo {
    max-width: 100%;
  }
}

/* ── Welcome strip ── */
.welcome-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.2rem;
}

.welcome-strip-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.welcome-strip p {
  color: var(--grey-600);
  font-size: 0.93rem;
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.lang-rule {
  width: 1px;
  height: 2.2em;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .lang-rule { display: none; }
  .welcome-strip p + p { border-top: 1px solid var(--border); padding-top: 0.6rem; }
}

/* ── Newsletter bar ── */
.newsletter-bar {
  background: var(--green-pale);
  border: 1px solid var(--grey-200);
  border-radius: 4px;
  padding: 0.75rem 1.1rem;
  margin: 1.4rem 0;
  font-size: 0.92rem;
  color: var(--grey-600);
}

.newsletter-bar strong { color: var(--green); }

.newsletter-bar a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.newsletter-bar a:hover { color: var(--green-mid); }

/* ── Main grid ── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 285px;
  gap: 2.5rem;
  padding: 0 0 3rem;
}

@media (max-width: 760px) {
  .main-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Section heading ── */
h2.section-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Church tabs ── */
.church-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.church-tab {
  background: none;
  border: none;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--grey-600);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.church-tab:hover { color: var(--green); }
.church-tab.active { color: var(--green); font-weight: 600; border-bottom-color: var(--green); }

.church-panel { display: none; }
.church-panel.active { display: block; }

/* ── Intentions block ── */
.intentions-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.mass-day { border-bottom: 1px solid var(--grey-100); }
.mass-day:last-child { border-bottom: none; }

.mass-day-header {
  background: var(--grey-100);
  padding: 0.4rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--green);
  border-left: 3px solid var(--green);
}

.mass-day ul {
  list-style: none;
  padding: 0.5rem 1rem 0.55rem 1rem;
}

.mass-day ul li {
  font-size: 0.9rem;
  color: var(--grey-800);
  padding: 0.08rem 0 0.08rem 0.9rem;
  position: relative;
}

.mass-day ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--grey-400);
}

/* ── Safeguarding ── */
.safeguarding {
  background: var(--grey-100);
  border-radius: 4px;
  padding: 0.85rem 1.1rem;
  font-size: 0.87rem;
  color: var(--grey-600);
  margin-top: 1.2rem;
}
.safeguarding strong { color: var(--grey-800); }

/* ── Sidebar ── */
.sidebar > * + * { margin-top: 1.1rem; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  padding: 1rem 1.15rem;
}

.sidebar-card h3 .material-icons,
.bottom-panel h3 .material-icons {
  font-size: 1rem;
  vertical-align: middle;
  margin-right: 0.3rem;
  position: relative;
  top: -1px;
}

.sidebar-card h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--green);
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.church-label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--grey-600);
  margin: 0.7rem 0 0.2rem;
}
.church-label:first-of-type { margin-top: 0; }

.mass-time-table { width: 100%; border-collapse: collapse; }
.mass-time-table td { padding: 0.15rem 0; font-size: 0.87rem; color: var(--grey-800); }
.mass-time-table td:last-child { text-align: right; font-weight: 600; color: var(--green); }

.sidebar-card p { font-size: 0.9rem; color: var(--grey-600); margin-bottom: 0.3rem; }
.sidebar-card a { color: var(--green); text-decoration: none; }
.sidebar-card a:hover { text-decoration: underline; }

.office-hours { list-style: none; }
.office-hours li { font-size: 0.9rem; color: var(--grey-600); padding: 0.1rem 0; }

.link-list { list-style: none; }
.link-list li { border-bottom: 1px solid var(--grey-100); padding: 0.32rem 0; }
.link-list li:last-child { border: none; }
.link-list a {
  color: var(--green);
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.link-list a::before { content: '›'; color: var(--grey-400); }
.link-list a:hover { text-decoration: underline; }

/* ── Content images (floated alongside text) ── */
.content-section {
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.content-img {
  float: right;
  margin: 0.2rem 0 1rem 1.5rem;
  border-radius: 4px;
  max-width: 160px;
  height: auto;
}

.content-figure {
  float: right;
  margin: 0.2rem 0 1rem 1.5rem;
  text-align: center;
}

.content-figure img {
  display: block;
  border-radius: 4px;
  max-width: 160px;
  height: auto;
}

.content-figure figcaption {
  font-size: 0.78rem;
  color: var(--grey-400);
  margin-top: 0.4rem;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .content-img,
  .content-figure {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 100%;
  }
}

/* ── Inner pages ── */
.inner-page {
  padding: 2.2rem 0 3rem;
  max-width: 720px;
}

.inner-page h1 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: var(--green);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.inner-page h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--green);
  margin: 1.8rem 0 0.7rem;
}

.inner-page p { color: var(--grey-600); margin-bottom: 0.85rem; font-size: 0.97rem; }

.inner-page blockquote {
  border-left: 3px solid var(--green);
  padding: 0.6rem 1.1rem;
  background: var(--green-pale);
  border-radius: 0 4px 4px 0;
  margin: 1.2rem 0;
  font-size: 0.97rem;
  color: var(--grey-800);
}

.sacrament-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.3rem;
}

@media (max-width: 520px) { .sacrament-grid { grid-template-columns: 1fr; } }

.sacrament-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem;
}

.sacrament-card h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.sacrament-card p { font-size: 0.9rem; color: var(--grey-600); margin-bottom: 0.4rem; }
.sacrament-card a { color: var(--green); }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--grey-400);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 0.4rem; }

/* ── Info box ── */
.info-box {
  background: var(--green-pale);
  border: 1px solid var(--grey-200);
  border-left: 3px solid var(--green);
  border-radius: 0 4px 4px 0;
  padding: 0.85rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.93rem;
  color: var(--grey-800);
}

.info-box strong { color: var(--green); display: block; margin-bottom: 0.3rem; }

/* ── Requirement list ── */
.req-list { list-style: none; margin: 0.5rem 0 0.85rem; }
.req-list li {
  font-size: 0.95rem;
  color: var(--grey-600);
  padding: 0.25rem 0 0.25rem 1.2rem;
  position: relative;
}
.req-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}

/* ── Cost table ── */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.93rem;
}
.cost-table td { padding: 0.35rem 0.5rem; color: var(--grey-600); }
.cost-table td:last-child { text-align: right; font-weight: 600; color: var(--green); }
.cost-table tr { border-bottom: 1px solid var(--grey-100); }
.cost-table tr:last-child { border-bottom: none; }

/* ── Church info cards ── */
.church-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.3rem 0;
}

@media (max-width: 520px) { .church-info-grid { grid-template-columns: 1fr; } }

.church-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem;
}

.church-info-card h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.church-info-card .church-location {
  font-size: 0.82rem;
  color: var(--grey-400);
  margin-bottom: 0.7rem;
}

.church-info-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
  display: block;
  margin: -1.1rem -1.1rem 1rem -1.1rem;
  width: calc(100% + 2.2rem);
}

.church-info-card p { font-size: 0.9rem; color: var(--grey-600); margin-bottom: 0.3rem; }

/* ── Bottom panels ── */
.bottom-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.bottom-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: 4px;
  padding: 1.1rem 1.15rem;
}

.bottom-panel h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--green);
  margin-bottom: 0.6rem;
}

.bottom-panel p {
  font-size: 0.9rem;
  color: var(--grey-600);
  line-height: 1.6;
}

.bottom-panel a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.bottom-panel a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .bottom-panels { grid-template-columns: 1fr; }
}

/* ── Footer ── */
footer {
  background: var(--green);
  color: rgba(255,255,255,0.72);
  text-align: center;
  padding: 1.8rem 1rem;
  font-size: 0.88rem;
}

.footer-name {
  font-family: 'Source Serif 4', serif;
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

footer a { color: rgba(255,255,255,0.88); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-sep { margin: 0 0.4rem; opacity: 0.4; }
