/* Mar Abraham Chaldean Catholic Church — homepage redesign preview
   Original palette (rooted in the parish's own seal, not any prior theme):
   deep maroon #7A2E2E, warm desert sand #E4C9A0, dark ink #2E2422,
   warm cream background. Headings in Playfair Display, body in Lora —
   both open-source Google Fonts, distinct from the current live site. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --maroon: #7a2e2e;
  --maroon-dark: #5c2020;
  --maroon-light: rgba(122, 46, 46, 0.08);
  --sand: #e4c9a0;
  --sand-light: #f6ecda;
  --gold: #b98a3e;
  --ink: #2e2422;
  --muted: #6b5d55;
  --cream: #fbf6ef;
  --border: #e8dcc8;
  --heading-font: 'Playfair Display', 'Georgia', serif;
  --body-font: 'Lora', 'Georgia', serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 1.08rem;
}

p { text-align: left; }

a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 6px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 28px;
}

.btn, .btn-outline, .btn-outline-light {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 4px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
}
.btn {
  background: var(--maroon);
  color: #fff;
  border: 2px solid var(--maroon);
}
.btn:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--maroon);
  border: 2px solid var(--maroon);
}
.btn-outline:hover { background: var(--maroon); color: #fff; }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
}
.btn-outline-light:hover { background: #fff; color: var(--maroon-dark); }

/* (preview banner styles retained harmlessly) */
.preview-banner {
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.preview-banner a { color: var(--sand); text-decoration: underline; }

/* Floating utility elements */
.social-rail {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.social-rail a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon);
  color: #fff;
}
.social-rail a:hover { background: var(--ink); }

.mobile-call-btn {
  display: none;
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 45;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.mobile-call-btn:hover { background: var(--maroon-dark); }

.floating-cta {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 45;
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.floating-cta:hover { background: var(--maroon-dark); color: #fff; }

@media (max-width: 900px) {
  .social-rail { display: none; }
  .mobile-call-btn { display: flex; }
  .floating-cta { padding: 11px 16px; font-size: 0.82rem; }
}

/* Header */
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.site-title { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; }
.site-title::before,
.site-title::after {
  content: "";
  flex: 1;
  max-width: 160px;
  height: 1px;
  background: var(--border);
  align-self: center;
}
.site-title a { color: inherit; display: block; }
.site-title h1 {
  font-size: 1.9rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--maroon-dark);
  white-space: nowrap;
}

/* Nav */
nav.main-nav {
  background: var(--maroon);
}
nav.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
nav.main-nav > .container > ul > li { position: relative; }
nav.main-nav a,
nav.main-nav .nav-label {
  display: block;
  padding: 15px 20px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
/* The dropdown headings (About Us, Sacraments, Faith Formation) aren't
   links on desktop — they just open the menu on hover — so show a normal
   arrow there. Real links keep the pointer. Mobile re-enables the pointer
   below because tapping the heading expands the section. */
nav.main-nav .nav-label { cursor: default; }
nav.main-nav a:hover { background: var(--maroon-dark); color: #fff; }
nav.main-nav a.active { background: var(--maroon-dark); }
nav.main-nav .nav-give { background: var(--gold); }
nav.main-nav .nav-give:hover { background: #a3782f; }

nav.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  display: none;
  z-index: 30;
  padding: 6px 0;
}
nav.main-nav .has-sub-sub { position: relative; }

@media (min-width: 901px) {
  /* A little extra room between top-level items on desktop. */
  nav.main-nav > .container > ul > li > a,
  nav.main-nav > .container > ul > li > .nav-label { padding-left: 28px; padding-right: 28px; }

  /* Hover-based dropdowns only apply on desktop — see mobile click-toggle
     rules below. iOS Safari keeps a tapped element's :hover state active
     until a tap elsewhere, which would otherwise fight the mobile
     accordion toggle. */
  nav.main-nav .has-sub:hover .sub-menu { display: block; }
  nav.main-nav .has-sub-sub:hover .sub-sub-menu { display: block; }
}

nav.main-nav .sub-sub-menu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  display: none;
  z-index: 31;
  padding: 6px 0;
}
nav.main-nav .sub-sub-menu a { color: var(--ink); padding: 10px 18px; font-weight: 500; }
nav.main-nav .sub-sub-menu a:hover { background: var(--sand-light); color: var(--maroon-dark); }

nav.main-nav .sub-menu a {
  color: var(--ink);
  padding: 10px 18px;
  font-weight: 500;
  font-size: 0.9rem;
}
nav.main-nav .sub-menu a:hover { background: var(--sand-light); color: var(--maroon-dark); }

.nav-toggle {
  display: none;
  width: 100%;
  background: var(--maroon-dark);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  header.site-header { padding: 14px 0; }
  .site-title h1 { font-size: 1.3rem; }
  .site-title::before,
  .site-title::after { display: none; }

  .nav-toggle { display: block; }
  nav.main-nav .container > ul { display: none; flex-direction: column; }
  nav.main-nav .container > ul.open { display: flex; }
  nav.main-nav > .container > ul > li { width: 100%; }
  nav.main-nav .has-sub .sub-menu { position: static; display: none; box-shadow: none; border: none; background: var(--maroon-dark); }
  nav.main-nav .has-sub.sub-open > .sub-menu { display: block; }
  nav.main-nav .has-sub-sub .sub-sub-menu { position: static; display: none; box-shadow: none; padding-left: 14px; background: var(--maroon-dark); }
  nav.main-nav .has-sub-sub.sub-open > .sub-sub-menu { display: block; }
  nav.main-nav .sub-menu a,
  nav.main-nav .sub-sub-menu a { color: #fff; }
  nav.main-nav .sub-menu a:hover,
  nav.main-nav .sub-sub-menu a:hover { background: var(--maroon); color: #fff; }
  nav.main-nav .nav-label {
    position: relative;
    padding-right: 46px;
    cursor: pointer;
  }
  nav.main-nav .nav-label::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
  }
  nav.main-nav .has-sub.sub-open > .nav-label::after { content: '\2212'; }
}

/* Hero */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 380px;
  max-height: 560px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46,36,34,0.15) 0%, rgba(46,36,34,0.75) 100%);
  display: flex;
  align-items: flex-end;
  z-index: 5;
}
.hero-overlay-inner {
  padding: 0 24px 40px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  color: #fff;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 8px;
}
.hero-overlay-inner h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 10px;
}
.hero-sub {
  color: rgba(255,255,255,0.9);
  font-size: 1.02rem;
  margin: 0 auto 20px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  .hero-slideshow { height: 48vh; min-height: 320px; }
  .hero-overlay-inner h2 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.95rem; }
}

/* Sections */
.block { padding: 64px 0; }
.block.alt { background: var(--sand-light); }

/* Holy day banner */
.holyday-banner {
  background: var(--maroon-light);
  border: 1px solid var(--sand);
  border-left: 5px solid var(--maroon);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.holyday-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 8px;
}
.holyday-banner .event-name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 6px;
}

/* Mass schedule cards */
.mass-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.mass-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
}
.mass-card h3 {
  font-size: 1.2rem;
  color: var(--maroon-dark);
  border-bottom: 2px solid var(--sand);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.mass-card-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}
.mass-card .btn-outline { margin-top: 14px; }

.schedule-row { display: flex; flex-direction: column; row-gap: 4px; margin: 0 0 12px; }
.schedule-row:last-of-type { margin-bottom: 0; }
.schedule-line {
  display: grid;
  grid-template-columns: 120px 90px 1fr;
  column-gap: 8px;
  align-items: baseline;
}
.schedule-row .day-label { font-weight: 600; color: var(--ink); }
.schedule-row .time { color: var(--maroon-dark); font-weight: 600; }
.schedule-row .detail { color: var(--muted); font-size: 0.92rem; }
.schedule-row .detail.full { grid-column: 2 / 4; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 900px) {
  .mass-grid { grid-template-columns: 1fr; }
  .schedule-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    row-gap: 2px;
  }
  .schedule-row .day-label,
  .schedule-row .time { flex: 0 0 auto; }
  .schedule-row .detail,
  .schedule-row .detail.full { flex: 1 1 100%; }
}

/* Homily card */
.homily-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  max-width: 640px;
  margin: 0 auto;
}

/* Quick links */
.quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.quicklink-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quicklink-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.quicklink-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.quicklink-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46,36,34,0) 45%, rgba(46,36,34,0.82) 100%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.quicklink-overlay span {
  color: #fff;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Events */
.events-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 26px;
}
.event-item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.event-item:last-child { border-bottom: none; }
.event-date {
  flex: 0 0 200px;
  color: var(--maroon-dark);
  font-weight: 600;
  font-size: 0.92rem;
}
.event-item a { font-weight: 600; color: var(--ink); }
.event-item a:hover { color: var(--maroon); }
.section-cta { margin-top: 22px; }

@media (max-width: 700px) {
  .event-item { flex-direction: column; gap: 2px; }
  .event-date { flex: 0 0 auto; }
}

/* Connect + map */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.connect-col { min-width: 0; }
/* Instagram (LightWidget) 3x3 grid, capped to match the Facebook box. */
.lightwidget-box { width: 100%; max-width: 500px; max-height: 500px; overflow: hidden; border: 2px solid var(--maroon); border-radius: 8px; background: #fff; }
.lightwidget-widget { display: block; width: 100%; border: 0; overflow: hidden; }
.social-embed-title {
  font-size: 1.05rem;
  color: var(--maroon-dark);
  margin-bottom: 12px;
}
.social-embed-box {
  min-height: 200px;
  background: #fff;
  border: 2px solid var(--maroon);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connect-address { color: var(--muted); margin-bottom: 12px; }
.connect-map-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

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

/* Footer */
footer.site-footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 0;
}
footer.site-footer a { color: rgba(255,255,255,0.85); }
footer.site-footer a:hover { color: #fff; }
footer.site-footer p { text-align: left; }
.footer-logo { width: 60px; height: 60px; margin-bottom: 12px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
}
footer.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 18px 0;
  font-size: 0.85rem;
  text-align: center;
}

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

/* Mass Times & Directions modal */
.mt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46,36,34,0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mt-modal-overlay[hidden] { display: none; }
.mt-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.mt-modal-header h3 { margin: 0; font-size: 1.3rem; color: var(--maroon-dark); }
.mt-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.mt-modal-close:hover { color: var(--maroon); }
.mt-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.mt-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
.mt-tab.active { color: var(--maroon-dark); border-bottom-color: var(--maroon); }
.mt-modal-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  overflow-y: auto;
}
.mt-modal-content { padding: 20px 24px; }
.mt-modal-content h4 { font-size: 1rem; color: var(--maroon-dark); margin: 18px 0 10px; }
.mt-modal-content h4:first-child { margin-top: 0; }
.mt-row {
  display: grid;
  grid-template-columns: 110px 110px 1fr;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.92rem;
  align-items: baseline;
}
.mt-day { font-weight: 600; }
.mt-time { color: var(--maroon-dark); font-weight: 600; }
.mt-detail { color: var(--muted); }
.mt-event-name { font-weight: 700; margin: 0 0 6px; }
.mt-note { font-size: 0.88rem; color: var(--muted); }
.mt-schedule-btn { margin-top: 8px; }
.mt-modal-side {
  background: var(--sand-light);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mt-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.mt-modal-note { font-size: 0.85rem; color: var(--muted); margin: 0; }

@media (max-width: 700px) {
  .mt-modal-body { grid-template-columns: 1fr; }
  .mt-row { grid-template-columns: 90px 90px 1fr; font-size: 0.85rem; }
}

/* Footer: line the Quick Links / Connect headings up with the church name (below the seal) */
@media (min-width: 901px) {
  .footer-grid > div:not(:first-child) { padding-top: 60px; }
}
