/* St. Paul Melkite Greek Catholic Mission: shared stylesheet.
   Values come from design_handoff/README.md and the reference pages. */

:root {
  --navy: #1F3A6B;
  --navy-dark: #16243F;
  --ink: #1C2331;
  --body: #3C4457;
  --muted: #4A5163;
  --muted-2: #6B7280;
  --muted-3: #434A55;
  --blue-light: #9FB0CE;
  --blue-pale: #E3E9F1;
  --rule: #D7DEE9;
  --rule-2: #C3CDDC;
  --tint: #F5F7FA;
  --tint-2: #EDF0F5;
  --white: #FFFFFF;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arabic: 'Noto Naskh Arabic', 'Geeza Pro', serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}
@media (min-width: 768px) { body { font-size: 19px; } }

img, video, iframe { max-width: 100%; }
img { height: auto; }
picture { display: contents; }

a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; color: var(--ink); }

.skip-link {
  position: absolute; inset-inline-start: 10px; top: -80px;
  background: var(--navy); color: var(--white); padding: 10px 14px; z-index: 10;
}
.skip-link:focus { top: 10px; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 22px;
  background: var(--white); border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand svg { width: 40px; height: 40px; flex: 0 0 auto; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 1.02em; line-height: 1.16; color: var(--navy); }

.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; font-weight: 500; }
.nav a { color: var(--navy); text-decoration: none; }
.nav a:hover { color: var(--navy-dark); text-decoration: underline; text-underline-offset: 4px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.nav .lang-ar { font-family: var(--arabic); }

.nav-toggle {
  display: none;
  font: 700 13px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--navy); background: var(--white);
  border: 1px solid var(--navy); border-radius: 4px; padding: 10px 12px; cursor: pointer;
}
.nav-toggle:hover { background: var(--tint-2); }

/* On small screens the six links collapse behind a Menu button.
   Without JavaScript the class is never added, so the links simply wrap. */
@media (max-width: 719px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .js .nav {
    display: none; flex-basis: 100%; flex-direction: column; gap: 0;
    border-top: 1px solid var(--rule); margin: 0 -22px -14px; padding: 4px 22px 8px;
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 11px 0; font-size: 16px; border-bottom: 1px solid var(--tint-2); }
  .js .nav a:last-child { border-bottom: 0; }
}

/* ---------- Layout ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding-left: 26px; padding-right: 26px; }
.wrap--mid { max-width: 900px; }
.wrap--wide { max-width: 1040px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.g4 { gap: 4px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; }
.g16 { gap: 16px; } .g18 { gap: 18px; } .g20 { gap: 20px; } .g30 { gap: 30px; } .g34 { gap: 34px; }

.pt28 { padding-top: 28px; } .pt40 { padding-top: 40px; } .pt44 { padding-top: 44px; }
.pt48 { padding-top: 48px; } .pt52 { padding-top: 52px; } .pt56 { padding-top: 56px; }
.pt64 { padding-top: 64px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; }
.center { align-items: center; text-align: center; }
.start { align-items: flex-start; }

.grid { display: grid; gap: 24px; }
.grid--240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: stretch; }
.grid--260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.grid--290 { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); align-items: start; }
.grid--300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

/* Photo beside text (pastor blocks) */
.media { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.media__fig { flex: 0 1 300px; min-width: 0; max-width: 300px; }
.media__fig--260 { flex-basis: 260px; max-width: 260px; }
.media__body { flex: 1 1 320px; min-width: 0; }
.media--tight { gap: 30px; }
.media--tight .media__body { flex-basis: 280px; }

/* ---------- Type ---------- */
.title { font-size: 1.95em; line-height: 1.12; }
.title--pastor { font-size: 1.7em; }
.h2 { font-size: 1.4em; line-height: 1.25; }
.h2-lg { font-size: 1.6em; line-height: 1.2; }
.h3 { font-size: 1.35em; line-height: 1.2; }
.rule { height: 1px; width: 72px; background: var(--navy); }
.lead { font-size: 1.02em; }
.small { font-size: 0.97em; }
.caption { font-size: 0.85em; color: var(--muted); }
.note { font-size: 0.85em; color: var(--muted-2); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.kicker { font-size: 0.82em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.text-link { color: var(--navy); font-weight: 500; font-size: 0.95em; text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--navy-dark); }
.u { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; align-self: flex-start;
  background: var(--navy); color: var(--white);
  border: 1px solid var(--navy); border-radius: 4px;
  padding: 14px 22px;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn--sm { padding: 12px 18px; font-size: 13px; }
.btn--outline { background: var(--white); color: var(--navy); }
.btn--outline:hover { background: var(--tint-2); color: var(--navy-dark); border-color: var(--navy); }
.btn--light { background: var(--white); color: var(--navy-dark); border-color: var(--white); padding: 15px 26px; }
.btn--light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy-dark); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); padding: 15px 25px; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); border-color: var(--white); }
.btn--text {
  background: none; border-color: transparent; color: var(--navy);
  padding: 14px 6px; text-decoration: underline; text-underline-offset: 4px;
}
.btn--text:hover { background: none; border-color: transparent; color: var(--navy-dark); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: default; }

/* ---------- Frames and cards ---------- */
.frame { background: var(--white); border: 1px solid var(--navy); padding: 14px; }
.frame--12 { padding: 12px; }
.frame img, .frame video { display: block; width: 100%; }
.frame--300 { width: 100%; max-width: 300px; }
.frame--260 { width: 100%; max-width: 260px; }
.frame--560 { width: 100%; max-width: 560px; }
.frame--figure { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.frame--figure img { height: 300px; object-fit: cover; }
.portrait { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 14%; }

.card { background: var(--white); border: 1px solid var(--rule); }
.card--accent { border-top: 3px solid var(--navy); }
.card__pad { padding: 24px; }

/* ---------- Home ---------- */
.hero__media { position: relative; background: var(--rule-2); overflow: hidden; }
.hero__media img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9.2; object-fit: cover; object-position: 50% 0%;
}
@media (min-width: 768px) {
  .hero__media img { aspect-ratio: 16 / 3.81; transform: scale(1.13); transform-origin: 50% 0%; }
}
.hero__body {
  background: var(--tint); padding: 34px 26px 32px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  border-bottom: 1px solid var(--rule);
}
.hero__title { font-size: 1.9em; line-height: 1.08; max-width: 1000px; text-wrap: balance; }
.hero__sub { font-family: var(--serif); font-weight: 400; font-size: 1.3em; line-height: 1.2; color: var(--navy); }
.hero__body .rule { margin: 6px 0; }
.hero__time { font-size: 1.02em; max-width: 600px; }
.hero__addr { font-size: 0.95em; font-weight: 500; color: var(--navy); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 4px; }

.welcome-cards .card { display: flex; flex-direction: column; }
.welcome-cards .card__icon { padding: 22px 22px 0; }
.welcome-cards .card__icon img {
  display: block; width: 120px; height: 160px; object-fit: cover; border: 1px solid var(--rule);
}
.welcome-cards .card__body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.welcome-cards .card__body p { font-size: 0.97em; }
.welcome-cards .btn { margin-top: auto; }

.tour { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: stretch; }
.tour img { display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; object-position: 50% 40%; }
.tour__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.tour__body .note { font-size: 0.82em; color: var(--muted); }

.announcements { display: flex; flex-direction: column; gap: 14px; }
.announcement { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.announcement div + div { margin-top: 3px; }

.hymn { position: relative; width: 100%; max-width: 540px; aspect-ratio: 16 / 9; border: 1px solid var(--rule-2); overflow: hidden; background: var(--navy-dark); }
.hymn video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-badge {
  position: absolute; right: 14px; bottom: 14px; width: 54px; height: 54px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.94); border: 2px solid var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); pointer-events: none;
}
.play-badge::after {
  content: ""; width: 0; height: 0; margin-left: 5px;
  border-left: 18px solid var(--navy); border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.hymn__play { position: absolute; inset: 0; display: block; }
.hymn__play:hover .play-badge { background: var(--white); }
.hymn.is-playing .hymn__play { display: none; }

/* ---------- Plan Your Visit ---------- */
.visit-hero { padding-bottom: 8px; }
.visit-hero .title { font-size: 2.3em; line-height: 1.1; }
.visit-hero__sub { font-family: var(--serif); font-size: 1.3em; line-height: 1.4; color: var(--navy); max-width: 580px; text-wrap: pretty; }
.visit-hero__facts { font-size: 0.97em; color: var(--ink); }
.visit-hero__facts p:first-child { font-weight: 500; }

.map { border: 1px solid var(--rule); background: var(--rule); margin-top: 4px; }
.map iframe { display: block; width: 100%; height: 320px; border: 0; }
.map--short iframe { height: 240px; }

/* ---------- Schedule ---------- */
.sunburst {
  display: block; width: 176px; height: 176px; margin: 0 auto;
  border: 2px solid var(--navy); border-radius: 999px; background: var(--white);
  padding: 10px; opacity: 0.85;
}
.table { border: 1px solid var(--rule); background: var(--white); }
.table__row { display: grid; grid-template-columns: 1.4fr 2fr 1fr; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--rule); font-size: 0.93em; }
.table__head { background: var(--tint-2); padding: 12px 16px; border-top: 0; font-size: 0.8em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.table__row .tba { color: var(--muted-2); }

/* ---------- Quotes ---------- */
.quote {
  margin: 0; padding-left: 20px; border-left: 3px solid var(--navy);
  font-family: var(--serif); font-size: 1.08em; line-height: 1.55; color: var(--ink);
  display: flex; flex-direction: column; gap: 14px;
}
.testimonial { margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.testimonial blockquote { margin: 0; font-family: var(--serif); font-size: 1.05em; line-height: 1.55; color: var(--ink); }
.testimonial figcaption { font-size: 0.88em; font-weight: 700; letter-spacing: 0.04em; color: var(--navy); }

.links { display: flex; flex-direction: column; gap: 9px; font-size: 0.97em; }

#roman-catholics { scroll-margin-top: 24px; padding: 26px 24px; }

/* ---------- Video ---------- */
.yt { position: relative; aspect-ratio: 16 / 9; background: var(--navy-dark); overflow: hidden; }
.yt--short { flex: 0 0 auto; width: min(220px, calc(50% - 7px)); aspect-ratio: 9 / 16; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.yt__btn {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer; color: inherit;
}
.yt__btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt__btn .play-badge { right: auto; bottom: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.yt__btn:hover .play-badge, .yt__btn:focus-visible .play-badge { background: var(--white); }
.shorts { display: flex; flex-wrap: wrap; gap: 14px; }
.homily { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.homily__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.homily__body h3 { font-size: 1.22em; line-height: 1.2; }
.homily__body p { font-size: 0.95em; }
.talk h3 { font-size: 1.05em; line-height: 1.25; }

/* ---------- Contact ---------- */
.contact-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 0.97em; }
.contact-card__name { font-family: var(--serif); font-size: 1.25em; color: var(--navy); }
.contact-card__sep { padding-top: 10px; border-top: 1px solid var(--rule); }

/* ---------- Forms ---------- */
.form { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85em; font-weight: 500; color: var(--navy); }
.input {
  font: 16px/1.4 var(--sans); padding: 12px; width: 100%;
  border: 1px solid var(--rule-2); border-radius: 3px; background: var(--white); color: var(--ink);
}
.input:focus { border-color: var(--navy); }
textarea.input { resize: vertical; }
.input[aria-invalid="true"] { border-color: #A1262B; }
.field-error { font-size: 0.95em; font-weight: 400; color: #A1262B; }
.form-status { font-size: 0.95em; }
.form-status--ok { color: var(--ink); background: var(--tint); border-left: 3px solid var(--navy); padding: 12px 14px; }
.form-status--err { color: #7A1C20; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Join band and footer ---------- */
.join {
  margin-top: 72px; background: var(--navy-dark); color: var(--white);
  padding: 52px 26px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.join h2 { color: var(--white); font-size: 1.75em; }
.join p { font-size: 1.02em; color: var(--blue-pale); }
.join .btn { align-self: auto; }

.site-footer {
  background: var(--white); border-top: 1px solid var(--rule);
  padding: 34px 26px 44px; display: flex; flex-direction: column; gap: 16px;
  font-size: 0.85em; color: var(--muted-3);
}
.site-footer__name { font-family: var(--serif); font-size: 1.15em; color: var(--navy); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 500; }
.site-footer__links a { color: var(--navy); text-decoration: none; }
.site-footer__links a:hover { color: var(--navy-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Arabic pages ---------- */
.ar body, body.ar { font-family: var(--arabic); }
body.ar main, body.ar .join, body.ar .site-footer { line-height: 1.95; }
body.ar h1, body.ar h2, body.ar h3 { font-family: var(--arabic); }
body.ar .h2 { font-size: 1.35em; font-weight: 700; }
body.ar .title { line-height: 1.35; }
body.ar .visit-hero .title { line-height: 1.3; }
body.ar .visit-hero__sub { font-family: var(--arabic); }
body.ar .nav { font-size: 15px; font-weight: 400; }
body.ar .nav .lang-en, body.ar .site-footer .lang-en { font-family: var(--sans); font-weight: 500; }
body.ar .brand-name { font-family: var(--arabic); line-height: 1.5; }
/* Letter-spacing and uppercase break Arabic letter joining. */
body.ar .btn, body.ar .kicker, body.ar .table__head { letter-spacing: 0; text-transform: none; font-family: var(--arabic); font-size: 15px; }
body.ar .table__head { font-size: 0.9em; }
body.ar .table__row { font-size: 1em; }
body.ar .field { font-size: 0.95em; font-weight: 700; }
body.ar .caption { font-size: 0.95em; }
body.ar .note { font-size: 1em; }
body.ar .join h2 { font-size: 1.7em; }
body.ar .join p { font-size: 1.05em; }
body.ar .site-footer { font-size: 0.95em; gap: 14px; }
body.ar .rtl-addr { text-align: right; }
.review-flag {
  font-family: ui-monospace, Menlo, monospace; font-size: 11px; line-height: 1.5; color: var(--muted-2);
  background: var(--tint-2); border-right: 3px solid var(--navy); padding: 9px 11px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header nav, .nav-toggle, .join, .yt, .map, form { display: none !important; }
}

/* Phone numbers never wrap; long emails may. */
a[href^="tel:"] { white-space: nowrap; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
