
/* =========================================================
   FULL-SITE PAGE FIXES
   The shared site header is transparent/white on the homepage.
   On this light internal page it needs its own solid treatment.
   ========================================================= */

.parish-history-page {
  margin: 0;
  background: #fbf8f1;
}

.parish-history-page .site-header {
  position: relative;
  z-index: 20;
  background: #172330;
  color: #fff;
}

.parish-history-page .utility-bar {
  background: #101923;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.parish-history-page .masthead {
  background: #172330;
}

.parish-history-page .identity,
.parish-history-page .identity strong,
.parish-history-page .identity small,
.parish-history-page .primary-nav > a,
.parish-history-page .utility-bar,
.parish-history-page .utility-bar a,
.parish-history-page .utility-button,
.parish-history-page .language-control,
.parish-history-page .language-select {
  color: #fff;
}

.parish-history-page .primary-nav > a {
  opacity: .82;
}

.parish-history-page .primary-nav > a:hover,
.parish-history-page .primary-nav > a:focus-visible,
.parish-history-page .primary-nav > a[aria-current="page"] {
  opacity: 1;
}

.parish-history-page .cross-mark {
  color: #d8c38f;
}

.parish-history-page .menu-toggle span {
  background: #fff;
}

/* Keep the page content clear of the site header */
.parish-history-page .parish-history {
  padding-top: 82px;
}

/* On desktop all timeline eras should fit without a scrollbar */
@media (min-width: 1050px) {
  .parish-history-page .history-timeline-wrap {
    overflow-x: visible;
  }

  .parish-history-page .history-timeline {
    min-width: 0;
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .parish-history-page .history-point {
    padding-inline: 8px;
  }

  .parish-history-page .history-year {
    font-size: .71rem;
  }

  .parish-history-page .history-label {
    font-size: .57rem;
  }
}

/* Smaller screens retain intentional horizontal timeline scrolling */
@media (max-width: 1049px) {
  .parish-history-page .history-timeline {
    min-width: 1320px;
  }
}

@media (max-width: 760px) {
  .parish-history-page .parish-history {
    padding-top: 58px;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.parish-history {
  --navy: #172330;
  --deep: #0e1821;
  --wine: #741b31;
  --gold: #b89a5c;
  --gold-light: #dcc995;
  --paper: #fbf8f1;
  --cream: #f2ece1;
  --stone: #d9d0c2;
  --text: #302b25;
  --muted: #756d63;
  padding: 90px 0 110px;
  background: var(--paper);
}

.history-shell {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.history-hero {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 72px;
  align-items: stretch;
  margin-bottom: 58px;
}

.history-header {
  min-width: 0;
  padding: 8px 0;
}

.history-hero-image {
  position: relative;
  min-height: 350px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(184,154,92,.34);
  background:
    linear-gradient(135deg, rgba(184,154,92,.12), rgba(116,27,49,.06)),
    #e8e1d5;
}

.history-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 9px solid rgba(255,255,255,.16);
  pointer-events: none;
}

.history-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.03);
  transition: transform .7s ease;
}

.history-hero-image:hover img {
  transform: scale(1.015);
}

.history-eyebrow,
.history-content-eyebrow {
  margin: 0 0 14px;
  color: var(--wine);
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.history-header h1 {
  margin: 0;
  color: var(--navy);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: .98;
}

.history-intro {
  max-width: 700px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

/* Timeline */
.history-timeline-wrap {
  position: relative;
  overflow-x: auto;
  padding: 8px 0 24px;
  scrollbar-width: thin;
}

.history-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(120px, 1fr));
  min-width: 1450px;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  top: 14px;
  height: 1px;
  background: var(--stone);
}

.history-point {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
}

.history-point:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 5px;
}

.history-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 7px 0 18px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--stone);
  box-shadow: 0 0 0 1px var(--stone);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.history-year {
  display: block;
  color: var(--navy);
  font-family: "Cinzel", Georgia, serif;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
}

.history-label {
  display: block;
  margin-top: 5px;
  font-family: Arial, sans-serif;
  font-size: .62rem;
  line-height: 1.35;
}

.history-point:hover .history-dot,
.history-point.is-active .history-dot {
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
  transform: scale(1.25);
}

.history-point.is-active .history-year { color: var(--wine); }
.history-point.is-active .history-label { color: var(--text); font-weight: 700; }

/* Main display */
.history-display {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 60px;
  margin-top: 34px;
  padding: 58px 62px;
  background:
    radial-gradient(circle at 100% 0, rgba(184,154,92,.15), transparent 30%),
    var(--navy);
  color: #fff;
}

.history-era {
  padding-right: 34px;
  border-right: 1px solid rgba(255,255,255,.16);
}

.history-era-number {
  display: block;
  color: var(--gold-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 4rem;
  line-height: 1;
}

.history-era-years {
  display: block;
  margin-top: 18px;
  color: rgba(255,255,255,.58);
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.5;
  text-transform: uppercase;
}

.history-content-eyebrow { color: var(--gold-light); }

.history-content h2 {
  max-width: 760px;
  margin: 0 0 25px;
  color: #fff;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.13;
}

.history-copy {
  max-width: 820px;
}

.history-copy p {
  margin: 0 0 17px;
  color: rgba(255,255,255,.78);
  font-size: .94rem;
  line-height: 1.86;
}

.history-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 31px;
}

.history-detail {
  padding: 16px 17px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.history-detail small {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-light);
  font-family: Arial, sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.history-detail span {
  color: rgba(255,255,255,.82);
  font-size: .75rem;
  line-height: 1.5;
}

/* Nav controls */
.history-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 23px;
}

.history-nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 13px 18px;
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}

.history-nav-button:last-child {
  justify-content: flex-end;
  text-align: right;
}

.history-nav-button:hover:not(:disabled),
.history-nav-button:focus-visible:not(:disabled) {
  border-color: var(--gold);
  background: var(--cream);
}

.history-nav-button:disabled {
  opacity: .34;
  cursor: default;
}

.history-nav-button small,
.history-nav-button strong {
  display: block;
}

.history-nav-button small {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.history-nav-button strong {
  font-family: "Cinzel", Georgia, serif;
  font-size: .76rem;
}

.history-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: .66rem;
}

.history-progress-line {
  width: 48px;
  height: 1px;
  background: var(--stone);
}

.history-source-note {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.6;
}

@media (max-width: 780px) {
  .parish-history { padding: 70px 0 90px; }
  .history-shell { width: min(100% - 30px, 1180px); }

  .history-hero {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .history-hero-image,
  .history-hero-image img {
    min-height: 300px;
  }

  .history-display {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 28px;
  }

  .history-era {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 0 0 22px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }

  .history-era-number { font-size: 2.8rem; }
  .history-era-years { margin-top: 0; }

  .history-details { grid-template-columns: 1fr; }

  .history-controls {
    grid-template-columns: 1fr 1fr;
  }

  .history-progress {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
  }

  .history-nav-button { grid-row: 2; }
}

@media (max-width: 470px) {
  .history-header h1 { font-size: 2.65rem; }

  .history-hero-image,
  .history-hero-image img {
    min-height: 230px;
  }

  .history-nav-button {
    min-height: 66px;
    padding: 10px 12px;
  }

  .history-nav-button strong { font-size: .67rem; }

  .history-display { padding: 32px 22px; }
}
