:root {
  --smv-royal-blue: #3b73dd;
  --smv-mid-blue: #4983e8;
  --smv-light-blue: #5c94f2;
  --smv-gold-trim: #ceb15e;
  --smv-light-gold: #eace87;
  --smv-pale-gold: #f6ebce;
  --smv-parchment: #eff2f9;
  --smv-ink: #23356e;
  --smv-warm-cream: #fff9e9;
  --smv-footer-blue: #3b73dd;
}

/* Show the hero photography at its natural color. The element was also
   removed from the homepage; this rule protects against cached/legacy markup. */
.hero-overlay {
  display: none !important;
  background: transparent !important;
  opacity: 0 !important;
}

/* The parish-origin band uses its dedicated, Admin-managed theme role. */
.intro-section.intro-section {
  background: var(--smv-home-intro, #ebdea9) !important;
  padding-block: clamp(3.25rem, 6vw, 5rem) !important;
}

.heritage-section {
  background: var(--smv-warm-cream) !important;
  padding-block: clamp(3.25rem, 6vw, 5rem) !important;
}

/* The heritage text panels keep the blue-and-gold identity without the former
   nearly black treatment. */
.heritage-section .section-title {
  color: #8a6408 !important;
}

.heritage-section .section-sub {
  color: var(--smv-ink) !important;
}

.heritage-card,
.heritage-card:hover {
  background: color-mix(in srgb, var(--smv-light-blue) 58%, white) !important;
  border-color: color-mix(in srgb, var(--smv-gold-trim) 78%, #6a5418) !important;
  box-shadow: 0 12px 30px rgba(35, 53, 110, .14);
}

.heritage-text h3 {
  color: #7a5700 !important;
  text-shadow: 0 1px 0 rgba(255, 249, 233, .65) !important;
}

.heritage-text p {
  color: #172751 !important;
  text-shadow: none !important;
}

/* Homepage parish introduction and restored 2020 saints carousel. */
.intro-section .intro-with-saints {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.saints-feature {
  min-width: 0;
  text-align: center;
}

.saints-feature-kicker {
  margin: 0 0 .35rem;
  color: var(--smv-ink);
  font-family: "Cinzel", Georgia, serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.saints-feature h2 {
  margin: 0 0 1.15rem;
  color: var(--smv-ink);
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.05;
}

.saints-carousel {
  position: relative;
  margin: 0 auto;
  max-width: 500px;
  border: 1px solid var(--smv-gold-trim);
  border-radius: 4px;
  background: var(--smv-warm-cream);
  box-shadow: 0 18px 45px rgba(35, 53, 110, .16);
  overflow: hidden;
}

.saints-carousel-viewport {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8e0cf;
}

.saint-slide {
  display: block;
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease;
}

.saint-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.saint-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saint-slide figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.saints-carousel-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 2.55rem;
  height: 2.55rem;
  margin: 0;
  padding: 0 0 .18rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 249, 233, .8);
  border-radius: 50%;
  background: rgba(35, 53, 110, .84);
  color: #fff9e9;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  transition: background .2s ease, transform .2s ease;
}

.saints-carousel-arrow:hover,
.saints-carousel-arrow:focus-visible {
  background: var(--smv-royal-blue);
  transform: translateY(-50%) scale(1.06);
}

.saints-carousel-prev { left: .7rem; }
.saints-carousel-next { right: .7rem; }

.saints-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.5rem;
  padding: .55rem 1rem;
  background: var(--smv-warm-cream);
}

.saints-carousel-dots button {
  width: .62rem;
  height: .62rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--smv-ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.saints-carousel-dots button.is-active {
  background: var(--smv-ink);
  box-shadow: 0 0 0 3px rgba(206, 177, 94, .35);
}

/* The five parish story squares now belong directly to Our Heritage. */
.heritage-section .historic-feature-grid {
  margin-top: 1.8rem;
}

/* Important Pages is the compact action-link band and intentionally uses the
   same live theme color as the footer. */
.quick-links.homepage-important {
  background: var(--smv-important-pages, var(--smv-footer-blue)) !important;
  padding-block: clamp(2.35rem, 4.2vw, 3.6rem) !important;
}

.homepage-important .section-title {
  color: var(--smv-footer-text, var(--smv-warm-cream)) !important;
}

.historic-feature-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.85rem, 1.5vw, 1.35rem);
  margin-top: 2.4rem;
}

.historic-feature {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--smv-gold-trim) 82%, #70581c);
  border-radius: 3px;
  background: var(--smv-ink);
  box-shadow: 0 12px 28px rgba(35, 53, 110, .16);
  color: var(--smv-warm-cream) !important;
  isolation: isolate;
}

.historic-feature::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 50, .04) 25%, rgba(10, 20, 50, .9) 100%);
  transition: background .25s ease;
}

.historic-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.historic-feature:nth-child(2) img { object-position: center 35%; }
.historic-feature:nth-child(3) img { object-position: center 28%; }
.historic-feature:nth-child(4) img { object-position: center 18%; }

.historic-feature-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(.8rem, 1.5vw, 1.2rem);
}

.historic-feature-copy strong {
  display: block;
  color: var(--smv-light-gold) !important;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(.78rem, 1.18vw, 1rem);
  font-style: normal;
  line-height: 1.22;
  text-shadow: 0 2px 7px rgba(0, 0, 0, .72);
}

.historic-feature-copy small {
  display: block;
  margin-top: .38rem;
  color: var(--smv-warm-cream);
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(.72rem, 1vw, .9rem);
  line-height: 1.22;
}

.historic-feature:hover img,
.historic-feature:focus-visible img { transform: scale(1.045); }
.historic-feature:hover::after,
.historic-feature:focus-visible::after { background: linear-gradient(180deg, rgba(10, 20, 50, .02) 18%, rgba(10, 20, 50, .96) 100%); }
.historic-feature:focus-visible { outline: 3px solid var(--smv-royal-blue); outline-offset: 3px; }

.homepage-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
  margin: clamp(1.15rem, 2.2vw, 1.7rem) auto 0;
}

.homepage-actions a {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem .6rem;
  border: 1px solid var(--smv-gold-trim);
  border-radius: 3px;
  background: var(--smv-warm-cream);
  box-shadow: 0 5px 15px rgba(35, 53, 110, .08);
  color: var(--smv-ink) !important;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(.65rem, .9vw, .78rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.homepage-actions a span {
  color: #8a6408;
  font-size: 1.08rem;
}

.homepage-actions a:hover,
.homepage-actions a:focus-visible {
  background: color-mix(in srgb, var(--smv-light-blue) 24%, white);
  box-shadow: 0 9px 20px rgba(35, 53, 110, .14);
  transform: translateY(-2px);
}

.homepage-announcements-band {
  padding-block: clamp(2.5rem, 4.8vw, 4rem);
  background: var(--smv-content, var(--smv-warm-cream)) !important;
}

.homepage-announcements {
  margin-top: 0;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--smv-gold-trim) 72%, white);
  border-radius: 4px;
  background: color-mix(in srgb, var(--smv-warm-cream) 88%, white);
  box-shadow: 0 13px 34px rgba(35, 53, 110, .1);
}

.homepage-announcements-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Maintain clear section boundaries while removing the oversized gaps from
   the original long-form homepage layout. */
.prayer-section {
  padding-block: clamp(3rem, 5.5vw, 4.75rem) !important;
}

.homepage-announcements-heading h2 {
  margin: 0;
  color: var(--smv-ink) !important;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.homepage-announcements-heading > a {
  color: var(--smv-ink) !important;
  font-family: "Cinzel", Georgia, serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.section-kicker {
  margin: 0 0 .15rem;
  color: #8a6408;
  font-family: "Cinzel", Georgia, serif;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.homepage-announcement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.homepage-announcement-card {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 7.5rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--smv-gold-trim) 55%, white);
  border-radius: 3px;
  background: white;
  color: var(--smv-ink) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.homepage-announcement-card.has-image { grid-template-columns: 5.5rem 1fr; }
.homepage-announcement-card:hover,
.homepage-announcement-card:focus-visible { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(35, 53, 110, .14); }
.homepage-announcement-card img { width: 100%; height: 100%; min-height: 7.5rem; object-fit: cover; }
.homepage-announcement-card > span { align-self: center; padding: 1rem; }
.homepage-announcement-card small { display: block; margin-bottom: .3rem; color: #6b5a2c; font-family: "Cinzel", Georgia, serif; font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.homepage-announcement-card strong { display: block; color: var(--smv-ink) !important; font-family: "EB Garamond", Georgia, serif; font-size: 1.08rem; line-height: 1.15; }
.homepage-announcement-card p { margin: .4rem 0 0; color: #4c5770 !important; font-size: .78rem; line-height: 1.35; }
.homepage-announcement-card.is-loading { grid-template-columns: 1fr; grid-column: 1 / -1; text-align: center; }

.contact-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* Safe defaults. /theme.css.php may override these with approved admin choices. */
.contact-section,
.smv-links-panel {
  background: var(--smv-warm-cream) !important;
  color: var(--smv-ink) !important;
  border-top: 4px solid var(--smv-gold-trim) !important;
  padding: 2.35rem 0 !important;
}
.contact-section h3,
.contact-section p,
.contact-section address,
.contact-section a,
.smv-links-panel h3,
.smv-links-panel p,
.smv-links-panel address,
.smv-links-panel a { color: var(--smv-ink) !important; }
.smv-links-panel .smv-directions { margin-top: 1rem; display: inline-block; border-color: var(--smv-ink) !important; }

.site-footer {
  background: var(--smv-footer-blue) !important;
  color: var(--smv-warm-cream) !important;
  border-top: 1px solid var(--smv-gold-trim) !important;
}
.site-footer::before,
.site-footer::after { background: var(--smv-gold-trim) !important; }
.site-footer a,
.site-footer .footer-copy,
.site-footer .footer-intercessions,
.site-footer .footer-logo,
.site-footer .footer-social-link { color: var(--smv-warm-cream) !important; }
.site-footer a:hover { color: var(--smv-light-gold) !important; }

/* Keep the site shell consistent on PHP pages. */
.public-site-page { background: var(--smv-parchment); }
.public-site-page .site-header { position: relative; }
.public-site-page .public-calendar-main { max-width: 1180px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); }
.public-site-page .calendar-heading { margin-bottom: 1.5rem; }
.public-site-page .calendar-heading h1 { margin-bottom: .6rem; }
.public-site-page .announcement-strip { margin-bottom: 2rem; }
.public-site-page .calendar-column { background: #fffdf8; }

/* Homepage nameplate v2: one type family, one typographic voice.
   The previous <em> treatment remains in the base stylesheet for rollback. */
.hero-title.hero-title-unified,
.hero-title.hero-title-unified span,
.hero-title.hero-title-unified strong {
  font-family: "Cinzel", Georgia, serif !important;
  font-style: normal !important;
  text-transform: none;
}
.hero-title.hero-title-unified {
  font-weight: 600 !important;
  letter-spacing: .025em;
  text-wrap: balance;
}
.hero-title.hero-title-unified strong {
  color: inherit !important;
  font-weight: 600 !important;
}

@media (max-width: 850px) {
  .intro-section.intro-section,
  .heritage-section { padding-block: 2.8rem !important; }
  .quick-links.homepage-important { padding-block: 2.35rem !important; }
  .homepage-announcements-band { padding-block: 2.4rem; }
  .prayer-section { padding-block: 2.8rem !important; }
  .smv-links-panel { padding: 2rem 0 !important; }
  .intro-section .intro-with-saints {
    grid-template-columns: 1fr;
    max-width: 820px;
  }
  .saints-feature { margin-top: .5rem; }
  .historic-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .homepage-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .homepage-announcement-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .historic-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .historic-feature:last-child { grid-column: 1 / -1; width: calc(50% - .45rem); justify-self: center; }
  .homepage-actions { grid-template-columns: 1fr 1fr; }
  .homepage-actions a:last-child { grid-column: 1 / -1; }
  .homepage-announcements-heading { display: block; }
  .homepage-announcements-heading > a { display: inline-block; margin-top: .6rem; }
  .contact-grid-compact { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  .saint-slide,
  .saints-carousel-arrow { transition: none; }
}
