/* =========================================================
   St. Mary's Syro Malabar Mission · Parish Newsletter
   Shared styles for every page. You normally never need
   to edit this file. Colours are set once here.
   ========================================================= */

:root {
  --navy: #14234B;
  --navy-2: #1E3366;
  --gold: #C9A24A;
  --gold-soft: #E9D9AE;
  --ivory: #FBF7EF;
  --champagne: #F1E6CF;
  --crimson: #8E1B2C;
  --ink: #1F2433;
  --muted: #5D6275;
  --line: #E6DCC6;
  --card: #FFFFFF;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20,35,75,.06), 0 8px 24px rgba(20,35,75,.07);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --nav-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.15; margin: 0; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* ---------- Home header ---------- */
.masthead {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(201,162,74,.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  text-align: center;
  padding: 36px 20px 30px;
}
.masthead .logo {
  width: 132px; height: 132px; margin: 0 auto 18px;
  border-radius: 50%; padding: 4px; background: var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.masthead .logo img { width: 100%; height: 100%; border-radius: 50%; }
.eyebrow {
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 600; margin-bottom: 10px;
}
.masthead h1 { color: var(--gold); font-size: clamp(30px, 8.5vw, 42px); font-weight: 700; }
.masthead .place { margin-top: 6px; font-size: 17px; color: #E8EAF2; }
.issue-pill {
  display: inline-block; margin-top: 16px; padding: 6px 16px;
  border: 1px solid var(--gold); border-radius: 999px;
  color: #fff; font-weight: 600; font-size: 14.5px; letter-spacing: .02em;
}
.motto { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 19px; color: #DCE0EC; }

/* ---------- Inner page header ---------- */
.topbar {
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.topbar img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); }
.topbar .t1 { font-family: var(--serif); color: var(--gold); font-weight: 700; font-size: 19px; line-height: 1.1; }
.topbar .t2 { font-size: 13px; color: #CFD5E6; }
.page-title { padding: 26px 0 6px; }
.page-title h1 { font-size: 34px; }
.page-title p { color: var(--muted); margin-top: 6px; }

/* ---------- Sections & cards ---------- */
section { margin-top: 26px; scroll-margin-top: 12px; }
.sec-head { margin-bottom: 14px; }
.sec-head .rule { width: 36px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 10px; }
.sec-head h2 { font-size: 28px; font-weight: 700; }
.sec-head .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 14px; }
.card.tint { background: var(--champagne); border-color: #E6D6B3; }
.card.navy { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border: 0; }
.card.navy h2, .card.navy h3 { color: var(--gold); }

.media { border-radius: var(--radius); overflow: hidden; background: var(--champagne); box-shadow: var(--shadow); }
.media img, .media video, .media iframe { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 0; display: block; }
.media.video iframe { aspect-ratio: 16 / 9; }
.card .media { box-shadow: none; margin: -20px -20px 16px; border-radius: var(--radius) var(--radius) 0 0; }
.caption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* In this issue chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; text-decoration: none; color: var(--navy);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14.5px; font-weight: 600;
}
.chip:active { background: var(--champagne); }

/* Priest message */
.priest { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.priest img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); flex: 0 0 auto; }
.priest .name { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--navy); line-height: 1.15; }
.priest .role { font-size: 14px; color: var(--muted); }
.signoff { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--navy); }

/* Verse */
.verse { text-align: center; padding: 28px 22px; }
.verse .mark { font-family: var(--serif); font-size: 64px; line-height: .6; color: var(--gold); display: block; margin-bottom: 8px; }
.verse blockquote { margin: 0; font-family: var(--serif); font-size: 23px; line-height: 1.35; }
.verse cite { display: block; margin-top: 12px; font-style: normal; font-weight: 600; letter-spacing: .06em; color: var(--gold-soft); font-size: 14px; text-transform: uppercase; }

/* Events */
.event { display: flex; gap: 14px; align-items: flex-start; }
.datebox {
  flex: 0 0 64px; text-align: center; border-radius: 14px;
  background: var(--navy); color: #fff; padding: 8px 4px 9px;
}
.datebox .d { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1; color: var(--gold); }
.datebox .m { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.event.feast .datebox { background: var(--crimson); }
.event.feast .datebox .d { color: #fff; }
.event h3 { font-size: 22px; font-weight: 700; }
.meta { font-size: 15px; color: var(--muted); margin-top: 2px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--crimson); margin-bottom: 2px; }
.event-body p { margin-top: 8px; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--gold); color: var(--navy); background: #fff;
  font-family: var(--sans);
}
.btn.solid { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn.wa { background: #1F7A4D; border-color: #1F7A4D; color: #fff; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn:active { transform: translateY(1px); }

/* Family units accordion */
details.unit { border-top: 1px solid var(--line); }
details.unit:first-of-type { border-top: 0; }
details.unit summary {
  list-style: none; cursor: pointer; padding: 14px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-weight: 600; color: var(--navy);
}
details.unit summary::-webkit-details-marker { display: none; }
details.unit summary small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
details.unit summary::after {
  content: ""; width: 10px; height: 10px; flex: 0 0 auto;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg); transition: transform .2s; margin-right: 4px;
}
details.unit[open] summary::after { transform: rotate(-135deg); }
details.unit .body { padding: 0 0 16px; }

/* Celebrations */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.tile .ic { font-size: 26px; line-height: 1; }
.tile h3 { font-size: 19px; margin: 8px 0 4px; }
.tile p { font-size: 15px; color: var(--muted); }

/* Lists */
ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean li { padding: 10px 0 10px 26px; position: relative; border-top: 1px solid var(--line); }
ul.clean li:first-child { border-top: 0; }
ul.clean li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Mass times */
.day { padding: 16px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; padding-top: 4px; }
.day .dn { font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.slot { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--muted); }
.slot b { color: var(--navy); white-space: nowrap; font-weight: 600; }
.slot.main span { color: var(--ink); font-weight: 600; }
.slot.main b { font-weight: 700; }
.day.today { background: var(--champagne); margin: 0 -20px; padding-left: 20px; padding-right: 20px; border-radius: 12px; border-top-color: transparent; }
.today-badge { display: none; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--crimson); color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 10px; vertical-align: middle; font-family: var(--sans); }
.day.today .today-badge { display: inline-block; }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery button { padding: 0; border: 0; background: var(--champagne); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery button:first-child { grid-column: span 2; }
.gallery button:first-child img { aspect-ratio: 16 / 10; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,16,34,.94);
  display: none; flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 76vh; width: auto; max-width: 100%; border-radius: 10px; }
.lightbox .lb-cap { color: #E8EAF2; margin-top: 12px; text-align: center; font-size: 15px; max-width: 560px; }
.lightbox .lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer;
}
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Contact rows */
.row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.row:first-child { border-top: 0; }
.row .ri { width: 44px; height: 44px; border-radius: 12px; background: var(--champagne); display: grid; place-items: center; flex: 0 0 auto; }
.row .ri svg { width: 22px; height: 22px; color: var(--navy); }
.row .rl { font-size: 13px; color: var(--muted); }
.row .rv { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; font-size: 16px; }

/* Past issue banner (shown automatically on archived copies) */
.past-banner { display: none; background: var(--crimson); color: #fff; text-align: center; font-size: 15px; padding: 10px 16px; }
.past-banner a { color: #fff; font-weight: 700; }
.is-past .past-banner { display: block; }

/* Footer */
.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 34px 0 10px; }
.footer img { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px; border: 2px solid var(--gold); }
.footer a { color: var(--navy); }

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0 6px; max-width: 640px; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a {
  height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--navy); }
.tabbar a[aria-current="page"] svg { color: var(--gold); }

.note { font-size: 14px; color: var(--muted); margin-top: 10px; }
.center { text-align: center; }
.mt { margin-top: 14px; }

@media (min-width: 700px) {
  body { font-size: 18px; }
  .masthead { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Photo slider (any section with more than one photo) ---------- */
.carousel { position: relative; }
.carousel .track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track img { flex: 0 0 100%; width: 100%; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
.carousel .dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.carousel .dots button {
  pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.65); box-shadow: 0 0 0 1px rgba(20,35,75,.25); cursor: pointer; transition: width .2s, background .2s;
}
.carousel .dots button.on { width: 22px; background: var(--gold); }
.carousel .count {
  position: absolute; top: 10px; right: 10px; background: rgba(20,35,75,.72); color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.carousel .nav {
  display: none; position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--navy); font-size: 22px; line-height: 1;
  box-shadow: 0 2px 8px rgba(20,35,75,.2);
}
.carousel .nav.prev { left: 10px; }
.carousel .nav.next { right: 10px; }
@media (hover: hover) { .carousel .nav { display: block; } }
.media img { cursor: zoom-in; }
@media (prefers-reduced-motion: reduce) { .carousel .dots button { transition: none; } }
[hidden] { display: none !important; }

/* Event posters (tap to view full screen) */
.card .event-body .media { margin: 12px 0 0; border-radius: 12px; box-shadow: none; border: 1px solid var(--line); }
.media.poster img { aspect-ratio: 3 / 4; object-fit: cover; }
.event-body .full { margin-left: -78px; }
