/*
Theme Name: St. Joseph Prayer Center Serene
Theme URI: https://stjosephprayercenter.com/
Author: St. Joseph Prayer Center
Description: A quiet, welcoming, easy-to-maintain theme created for St. Joseph's Prayer Center.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: sjpc-serene
*/

:root {
  --cream: #f8f4eb;
  --paper: #fffdf8;
  --blue: #173957;
  --blue-soft: #365d78;
  --sage: #6f806d;
  --sage-pale: #e7ece4;
  --gold: #b08a45;
  --gold-pale: #eadfc8;
  --ink: #273237;
  --muted: #687378;
  --line: rgba(23, 57, 87, .16);
  --shadow: 0 18px 50px rgba(31, 47, 57, .10);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 {
  color: var(--blue);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
}
h1 { font-size: clamp(2.35rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.25rem; }
.screen-reader-text { position: absolute; left: -10000px; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .97);
}
.brand-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 150px;
  padding: 18px 0 12px;
}
.site-logo { display: block; width: auto; }
.site-logo img { display: block; width: auto; max-width: 270px; height: 156px; object-fit: contain; }
.brand-kicker {
  color: var(--sage);
  font-family: var(--serif);
  font-size: .98rem;
  font-style: italic;
  letter-spacing: .03em;
}
.brand-contact { justify-self: end; text-align: right; color: var(--muted); font-size: .9rem; }
.brand-contact a { display: block; text-decoration: none; }

.menu-toggle { display: none; }
.primary-nav { border-top: 1px solid var(--line); }
.primary-nav ul { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-nav a, .primary-nav .menu-label {
  display: block;
  width: auto;
  padding: 14px 17px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: .84rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
}
.primary-nav li { position: relative; }
.primary-nav .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  display: none;
  min-width: 290px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { padding: 10px 12px; letter-spacing: .02em; text-transform: none; }

.hero {
  position: relative;
  display: grid;
  min-height: 660px;
  place-items: center;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  text-align: center;
}
.hero::before {
  position: absolute;
  inset: 0;
  content: '';
  background:
    linear-gradient(180deg, rgba(11, 32, 50, .42), rgba(11, 32, 50, .74)),
    url('assets/chapel-hero.jpeg') center 47% / cover no-repeat;
}
.hero-content { position: relative; width: min(840px, calc(100% - 40px)); padding: 100px 0; }
.eyebrow { color: #f2ddae; font-size: .78rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.hero h1 { margin: 14px 0 20px; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero p { max-width: 700px; margin: 0 auto 32px; font-family: var(--serif); font-size: clamp(1.18rem, 2vw, 1.5rem); }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.button {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover { background: #987438; color: #fff; }
.button.secondary { border-color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); }

.section { padding: 92px 0; }
.section.paper { background: var(--paper); }
.section.sage { background: var(--sage-pale); }
.section-heading { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.section-heading .eyebrow { color: var(--gold); }
.section-heading h2 { margin: 10px 0 16px; }
.section-heading p { color: var(--muted); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); }
.ornament::before, .ornament::after { width: 55px; height: 1px; content: ''; background: var(--gold-pale); }

.welcome-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 66px; align-items: center; }
.welcome-grid .photo { overflow: hidden; border-radius: 120px 120px 12px 12px; box-shadow: var(--shadow); }
.welcome-grid .photo img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.welcome-copy { font-family: var(--serif); font-size: 1.1rem; }
.house-note { display: flex; gap: 16px; align-items: center; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.house-note img { width: 132px; border-radius: 6px; }
.house-note p { margin: 0; color: var(--muted); font-family: var(--sans); font-size: .9rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(31, 47, 57, .05);
}
.card-icon { color: var(--gold); font-family: var(--serif); font-size: 1.6rem; }
.card h3 { margin: 10px 0; }
.card p { color: var(--muted); font-size: .95rem; }
.card-link { margin-top: auto; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }

.retreat-band { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: 14px; background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.retreat-band img { width: 100%; height: 100%; min-height: 430px; object-fit: cover; }
.retreat-copy { padding: clamp(36px, 6vw, 72px); }
.retreat-copy h2 { color: #fff; }
.retreat-copy .eyebrow { color: #f2ddae; }

.events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.event-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 10px 34px rgba(31,47,57,.07); }
.event-card img { display: block; width: 100%; aspect-ratio: 16/10; padding: 18px; object-fit: contain; background: #ece8df; }
.event-card-body { padding: 28px; }
.event-card h3 { margin: 0 0 10px; }
.event-card p { color: var(--muted); }
.event-meta { margin-bottom: 8px; color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.page-hero { padding: 76px 0 56px; border-bottom: 1px solid var(--line); background: var(--sage-pale); text-align: center; }
.page-hero h1 { margin: 0; }
.content-wrap { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 90px; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3 { margin-top: 2em; }
.entry-content img { border-radius: 8px; }
.entry-content iframe { max-width: 100%; }
.entry-content .alignleft { float: left; margin: .4rem 2rem 1rem 0; }
.entry-content .alignright { float: right; margin: .4rem 0 1rem 2rem; }
.entry-content::after { display: block; clear: both; content: ''; }
.single-sjpc_event .entry-content > img { display: block; width: auto; max-height: 900px; margin: 0 auto 34px; object-fit: contain; }

.site-footer { padding: 62px 0 28px; background: #122f48; color: rgba(255,255,255,.8); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 50px; }
.footer-logo { width: 180px; padding: 8px; border-radius: 8px; background: #fff; }
.site-footer h3 { margin-top: 0; color: #fff; font-size: 1.15rem; }
.site-footer a { color: #fff; }
.footer-bottom { margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem; text-align: center; }

@media (max-width: 820px) {
  .site-shell { width: min(100% - 28px, 680px); }
  .brand-row { grid-template-columns: 1fr auto; min-height: 112px; }
  .site-logo img { max-width: 185px; height: 104px; }
  .brand-kicker { display: none; }
  .brand-contact { display: none; }
  .menu-toggle { display: block; justify-self: end; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--blue); }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; padding: 8px 14px 18px; }
  .primary-nav .sub-menu { position: static; display: none; min-width: 0; margin-left: 14px; border: 0; box-shadow: none; }
  .primary-nav .submenu-open > .sub-menu { display: block; }
  .hero { min-height: 570px; }
  .welcome-grid, .retreat-band, .footer-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .welcome-grid .photo img { aspect-ratio: 4/3; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .cards { grid-template-columns: 1fr; }
  .hero-content { padding: 72px 0; }
  .entry-content .alignleft, .entry-content .alignright { float: none; display: block; margin: 1.2rem auto; }
}
