/* ============================================================
   St. Gabriel Catholic Church — Design System
   Palette: navy / gold / cream (ecclesiastical)
   Type: serif display (Playfair Display) + sans body (Source Sans 3)
   ============================================================ */

:root {
  --navy: #12233d;
  --navy-2: #1b3255;
  --navy-3: #24406b;
  --gold: #c9a227;
  --gold-light: #e3c766;
  --cream: #f7f3ec;
  --cream-2: #efe8db;
  --white: #ffffff;
  --ink: #22293a;
  --ink-soft: #4c5568;
  --line: #dcd4c5;
  --red-accent: #8c2f2f;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --container: 1180px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(18, 35, 61, 0.12);
  --shadow-soft: 0 4px 14px rgba(18, 35, 61, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy-2); color: var(--white); }
.btn-navy:hover { background: var(--navy-3); color: var(--white); }

.section-label {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title { font-size: 38px; margin-bottom: 18px; }

/* ---------- Image placeholders (swap with real photos) ---------- */
.img-ph {
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.img-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(201,162,39,0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(201,162,39,0.18), transparent 40%);
}
.img-ph span { position: relative; padding: 12px; }
.img-ph.light { background: var(--cream-2); color: var(--ink-soft); }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
}
.topbar-inner {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 8px 24px;
  max-width: var(--container);
  margin: 0 auto;
  flex-wrap: wrap;
}
.topbar .contact-info { margin-right: auto; display: flex; gap: 22px; color: rgba(255,255,255,0.85); }
.topbar a { color: rgba(255,255,255,0.85); letter-spacing: 0.03em; }
.topbar a:hover { color: var(--gold-light); }
.topbar a.donate { color: var(--gold-light); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 500;
  transition: box-shadow 0.25s ease;
}
.site-header.stuck { box-shadow: var(--shadow-soft); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { width: 52px; height: 52px; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.brand-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--navy);
  display: inline-flex;
  border-radius: 4px;
}
.icon-btn:hover { background: var(--cream); color: var(--gold); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Primary nav (desktop: navy strip below brand row) ---------- */
.nav-row { background: var(--navy-2); }
@media (min-width: 1025px) {
  .nav-row .primary-nav > ul { justify-content: center; flex-wrap: wrap; max-width: var(--container); margin: 0 auto; }
  .nav-row .primary-nav > ul > li > a { color: var(--white); padding: 13px 13px; font-size: 14.5px; }
  .nav-row .primary-nav > ul > li > a:hover { color: var(--gold-light); }
}
.primary-nav ul { list-style: none; display: flex; gap: 4px; }
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a {
  display: block;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--navy);
}
.primary-nav > ul > li > a:hover { color: var(--gold); }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 600;
}
.primary-nav li:hover > .dropdown,
.primary-nav li:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown ul { display: block; }
.dropdown a {
  display: block;
  padding: 9px 22px;
  font-size: 15px;
  color: var(--ink);
}
.dropdown a:hover { background: var(--cream); color: var(--navy); }

/* ---------- Mobile nav ---------- */
.nav-toggle { display: none; }
@media (max-width: 1024px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }
  .primary-nav.open { display: block; }
  .primary-nav > ul { flex-direction: column; gap: 0; padding: 10px 0; }
  .primary-nav > ul > li > a { padding: 13px 26px; border-bottom: 1px solid var(--cream-2); }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--gold);
    margin: 0 0 8px 26px;
    display: none;
  }
  .primary-nav li.open > .dropdown { display: block; }
  .nav-toggle { display: inline-flex; }
  .brand-name { font-size: 19px; }
  .brand svg { width: 42px; height: 42px; }
}

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 35, 61, 0.96);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
}
.search-overlay.open { display: flex; }
.search-box { width: min(680px, 88vw); }
.search-box label {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
}
.search-box input {
  width: 100%;
  margin-top: 12px;
  padding: 16px 4px;
  font-size: 26px;
  font-family: var(--font-display);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold);
  color: var(--white);
  outline: none;
}
.search-close {
  position: absolute;
  top: 28px;
  right: 34px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}
.search-close:hover { color: var(--gold-light); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: var(--navy);
  overflow: hidden;
}
.hero .img-ph { position: absolute; inset: 0; font-size: 15px; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(18,35,61,0.92) 0%, rgba(18,35,61,0.65) 55%, rgba(18,35,61,0.25) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; padding: 90px 0; }
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.hero h1 { color: var(--white); font-size: 52px; margin-bottom: 20px; }
.hero p { font-size: 19px; color: rgba(255,255,255,0.88); margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Quick access ---------- */
.quick-access { background: var(--cream); padding: 72px 0; }
.qa-head { text-align: center; margin-bottom: 44px; }
.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.qa-card {
  background: var(--white);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
}
.qa-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.qa-card h3 { font-size: 21px; margin-bottom: 10px; }
.qa-card p { font-size: 15px; color: var(--ink-soft); margin-bottom: 16px; }
.qa-card .more {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* ---------- Grow in faith strip ---------- */
.faith-strip { background: var(--navy-2); color: var(--white); }
.faith-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 24px;
  max-width: var(--container);
  margin: 0 auto;
  flex-wrap: wrap;
}
.faith-strip h3 { color: var(--white); font-size: 24px; }
.faith-strip nav { display: flex; gap: 26px; flex-wrap: wrap; }
.faith-strip nav a {
  color: var(--gold-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.faith-strip nav a:hover { color: var(--white); }

/* ---------- News ---------- */
.news-section { padding: 80px 0; }
.split-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.view-all {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.news-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card .img-ph { height: 170px; font-size: 12px; }
.news-card-body { padding: 20px; }
.news-cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red-accent);
}
.news-card h3 { font-size: 18px; margin: 8px 0 12px; color: var(--navy); }
.news-date { font-size: 14px; color: var(--ink-soft); }

/* ---------- Events ---------- */
.events-section { background: var(--cream); padding: 80px 0; }
.event-list { display: grid; gap: 18px; }
.event-card {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.event-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.event-date {
  flex-shrink: 0;
  width: 74px;
  text-align: center;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 0;
}
.event-date .mon {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red-accent);
}
.event-date .day {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
}
.event-body h3 { font-size: 21px; margin-bottom: 6px; }
.event-body p { font-size: 15px; color: var(--ink-soft); margin-bottom: 8px; }
.event-time { font-size: 14px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Welcome / pastor ---------- */
.welcome-section { padding: 90px 0; background: var(--navy); color: var(--white); }
.welcome-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 60px;
  align-items: center;
}
.welcome-photo .img-ph { height: 440px; border-radius: var(--radius); font-size: 13px; }
.welcome-copy .section-label { color: var(--gold-light); }
.welcome-copy h2 { color: var(--white); font-size: 40px; margin-bottom: 18px; }
.welcome-copy p { color: rgba(255,255,255,0.85); font-size: 18px; margin-bottom: 28px; }
.welcome-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sacrament cards ---------- */
.sacraments-section { padding: 80px 0; }
.sac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sac-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sac-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.sac-card .img-ph { height: 150px; font-size: 12px; }
.sac-body { padding: 20px; }
.sac-body h3 { font-size: 19px; margin-bottom: 8px; }
.sac-body p { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(120deg, var(--navy-2), var(--navy-3));
  color: var(--white);
  padding: 60px 0;
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.newsletter h2 { color: var(--white); font-size: 30px; }
.newsletter p { color: rgba(255,255,255,0.8); }
.newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 13px 18px;
  border-radius: 3px;
  border: none;
  font-size: 16px;
  min-width: 280px;
  font-family: var(--font-body);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.82); font-size: 15px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 64px 24px 44px;
  max-width: var(--container);
  margin: 0 auto;
}
.footer-brand .brand-name { color: var(--white); }
.footer-brand p { margin-top: 14px; line-height: 1.7; }
.site-footer h4 {
  color: var(--gold-light);
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: var(--gold-light); }
.social-row { display: flex; gap: 14px; margin-top: 20px; }
.social-row a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-row a:hover { border-color: var(--gold-light); }
.social-row svg { width: 17px; height: 17px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 20px 24px;
  font-size: 14px;
}
.footer-bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Inner page layout ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  position: relative;
  padding: 84px 0;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(201,162,39,0.22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(201,162,39,0.12), transparent 40%);
}
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: var(--white); }
.page-hero h1 { color: var(--white); font-size: 44px; }
.page-hero .lede { margin-top: 14px; font-size: 19px; color: rgba(255,255,255,0.85); max-width: 720px; }

.page-body { padding: 70px 0; }
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}
.prose h2 { font-size: 30px; margin: 36px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose li { margin-bottom: 8px; }
.prose .img-ph { height: 320px; border-radius: var(--radius); margin: 28px 0; }
.callout {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  margin: 28px 0;
}
.callout h3 { margin-top: 0; }

.sidebar { position: sticky; top: 110px; display: grid; gap: 28px; }
.sidebar-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 26px;
}
.sidebar-card h3 { font-size: 19px; margin-bottom: 14px; }
.sidebar-card ul { list-style: none; display: grid; gap: 10px; }
.sidebar-card li a { font-weight: 600; font-size: 15px; }
.sidebar-card li a.current { color: var(--gold); }
.sidebar-card.contact-card { background: var(--navy-2); color: var(--white); }
.sidebar-card.contact-card h3 { color: var(--white); }
.sidebar-card.contact-card p { font-size: 15px; color: rgba(255,255,255,0.85); margin-bottom: 14px; }

/* ---------- Listing pages (news/events full) ---------- */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
}
.chip.active, .chip:hover { background: var(--navy-2); color: var(--white); border-color: var(--navy-2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-form { display: grid; gap: 18px; }
.contact-form label { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  font-family: var(--font-body);
  margin-top: 6px;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.info-block { margin-bottom: 26px; }
.info-block h3 { font-size: 20px; margin-bottom: 6px; }
.map-ph { height: 300px; border-radius: var(--radius); margin-top: 20px; }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  border: none;
  cursor: pointer;
  font-size: 20px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 400;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--gold-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .qa-grid, .news-grid, .sac-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-photo .img-ph { height: 340px; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 42px; }
}
@media (max-width: 640px) {
  .qa-grid, .news-grid, .sac-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 480px; }
  .hero h1 { font-size: 34px; }
  .section-title { font-size: 30px; }
  .page-hero h1 { font-size: 32px; }
  .event-card { flex-direction: column; }
  .topbar-inner { justify-content: center; gap: 18px; }
  .newsletter-form input { min-width: 0; flex: 1; }
}
