/* =========================================================
   St. Sebastian Major Archiepiscopal Pilgrim Church, Nedumkandam
   Design tokens
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&family=Noto+Serif+Malayalam:wght@500;600;700&family=Noto+Sans+Malayalam:wght@400;500;600&display=swap');

:root{
  --ink:        #241c14;
  --ink-soft:   #4a3f30;
  --paper:      #faf6ec;
  --stone:      #eee5d0;
  --stone-line: #ddcfae;
  --gold:       #85601f; /* darkened from #a9782f so gold text/buttons reach 4.5:1 on cream */
  --gold-bright:#d9aa4e;
  --glass-blue: #1f3a5c;
  --glass-blue-soft: #2c4d76;

  --font-display-en: 'Cinzel', 'Georgia', serif;
  --font-body-en: 'Source Serif 4', 'Georgia', serif;
  --font-display-ml: 'Noto Serif Malayalam', serif;
  --font-body-ml: 'Noto Sans Malayalam', sans-serif;

  --container: 1120px;
  --arch-radius: 999px 999px 0 0;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; overflow-x:hidden; max-width:100%; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body-en);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  max-width:100%;
}
h1, h2, h3, p, .eyebrow, .badge-diocese, .brand-text, .btn, .ministry-chip, figcaption{
  overflow-wrap:break-word;
  word-break:break-word;
}
body.lang-ml h1, body.lang-ml h2, body.lang-ml .eyebrow, body.lang-ml .badge-diocese{
  /* Malayalam compound words can run long without spaces; allow mid-word
     breaks only for this language so layout never overflows the viewport */
  overflow-wrap:anywhere;
}

/* language switching --------------------------------------------------- */
body.lang-en [data-lang="ml"]{ display:none; }
body.lang-ml [data-lang="en"]{ display:none; }
body.lang-ml{ font-family:var(--font-body-ml); }
body.lang-ml h1, body.lang-ml h2, body.lang-ml h3, body.lang-ml .eyebrow{
  font-family:var(--font-display-ml);
}
h1,h2,h3{ font-family:var(--font-display-en); font-weight:600; margin:0 0 .5em; color:var(--ink); letter-spacing:.01em; }
p{ margin:0 0 1em; color:var(--ink-soft); }
a{ color:inherit; }
img{ max-width:100%; display:block; }
.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }

/* ---- Gothic arch motif : the signature element ------------------------
   Echoes the real colonnade arches on the church facade. Used to frame
   photos, cards and the prayer/announcement panels throughout the site. */
.arch-frame{
  position:relative;
  overflow:hidden;
  border-radius: 46% 46% 4px 4px / 30% 30% 4px 4px;
  border:3px solid var(--gold);
  box-shadow:0 18px 40px -18px rgba(36,28,20,.45);
}
.arch-frame img{ width:100%; height:100%; object-fit:cover; }
.arch-card{
  background:var(--paper);
  border-radius: 40% 40% 6px 6px / 22% 22% 6px 6px;
  border:2px solid var(--stone-line);
  padding:44px 28px 28px;
  text-align:center;
}

/* eyebrow / labels */
.eyebrow{
  display:inline-block;
  font-family:var(--font-display-en);
  font-size:.72rem;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--gold);
  margin-bottom:14px;
}

/* buttons ---------------------------------------------------------------*/
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-display-en);
  font-size:.82rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-decoration:none;
  padding:14px 28px;
  border-radius:2px;
  border:1.5px solid var(--gold);
  color:var(--gold);
  background:transparent;
  transition:background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
  cursor:pointer;
}
.btn:hover{ background:var(--gold); color:var(--paper); transform:translateY(-2px); }
.btn.solid{ background:var(--gold); color:var(--paper); }
.btn.solid:hover{ background:var(--gold-bright); border-color:var(--gold-bright); color:var(--ink); }
.btn.on-dark{ color:var(--gold-bright); border-color:var(--gold-bright); }
.btn.on-dark:hover{ background:var(--gold-bright); color:var(--glass-blue); }
.btn-row{ display:flex; flex-wrap:wrap; gap:14px; }

/* nav ---------------------------------------------------------------- */
.site-nav{
  position:fixed; top:0; left:0; right:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 28px;
  box-shadow:0 4px 18px -12px rgba(36,28,20,.25);
}
/* The translucent blurred bar lives on a pseudo-element: backdrop-filter on .site-nav itself would make it the
   containing block for the fixed drawer/overlay and trap them inside the header instead of the viewport. */
.site-nav::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:rgba(250,246,236,.96);
  backdrop-filter:blur(6px);
}
.site-nav .brand{
  font-family:var(--font-display-en);
  font-size:.95rem;
  letter-spacing:.04em;
  color:var(--ink);
  text-decoration:none;
  display:flex; align-items:center; gap:10px;
  min-width:0; flex-shrink:1;
}
.site-nav .brand svg{ width:26px; height:26px; flex-shrink:0; }
.brand-text{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.nav-links{ display:flex; gap:20px; list-style:none; margin:0; padding:0; }
.nav-links a{
  font-size:.78rem; letter-spacing:.06em; text-transform:uppercase;
  text-decoration:none; color:var(--ink);
  padding-bottom:4px; border-bottom:1px solid transparent;
  transition:color .25s, border-color .25s;
  white-space:nowrap;
}
body.lang-ml .nav-links a{ letter-spacing:0; text-transform:none; font-size:.82rem; }
.nav-links a:hover{ color:var(--gold); border-color:var(--gold); }
/* Parish submenu: a disclosure button styled like the other links; dropdown on desktop. */
.has-sub{ position:relative; }
.sub-toggle{
  display:inline-flex; align-items:center; gap:6px;
  background:none; border:0; padding:0 0 4px; margin:0; cursor:pointer;
  font:inherit; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; color:var(--ink);
  border-bottom:1px solid transparent; white-space:nowrap;
  transition:color .25s, border-color .25s;
}
body.lang-ml .sub-toggle{ letter-spacing:0; text-transform:none; font-size:.82rem; }
.sub-toggle::after{
  content:""; width:6px; height:6px; margin-top:-3px;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg); transition:transform .25s var(--ease);
}
.sub-toggle[aria-expanded="true"]::after{ transform:rotate(-135deg); margin-top:3px; }
.sub-toggle:hover, .sub-toggle[aria-expanded="true"]{ color:var(--gold); border-color:var(--gold); }
.sub-menu{ display:none; list-style:none; margin:0; padding:0; }
.has-sub.sub-open .sub-menu{ display:block; }
@media (min-width:1400px){
  /* The extra Parish and Our Shepherds items need extra room; tighten Malayalam link spacing so the church name is not truncated at 1400px. */
  body.lang-ml .nav-links{ gap:8px; }
  .sub-menu{
    position:absolute; top:100%; left:-16px; z-index:60; min-width:220px;
    margin-top:10px; padding:8px 0;
    background:var(--paper); border:1px solid var(--stone-line); border-top:3px solid var(--gold);
    border-radius:4px; box-shadow:0 14px 30px -14px rgba(36,28,20,.45);
  }
  /* Invisible bridge so the pointer can travel from the button into the dropdown. */
  .sub-menu::before{ content:""; position:absolute; left:0; right:0; top:-14px; height:14px; }
  .sub-menu a{ display:block; padding:10px 16px; border-bottom:0; }
  .sub-menu a:hover, .sub-menu a[aria-current="page"]{ color:var(--gold); background:var(--stone); }
}
@media (min-width:1400px) and (max-width:1499px){
  /* Narrowest desktop range: trim link size and spacing so the nav stays on one line without clipping the church name. */
  .nav-links{ gap:14px; }
  .nav-links a, .sub-toggle{ font-size:.72rem; letter-spacing:.04em; }
  body.lang-ml .nav-links a, body.lang-ml .sub-toggle{ font-size:.78rem; }
  body.lang-ml .nav-links{ gap:8px; }
}
@media (min-width:1400px) and (hover:hover){
  .has-sub:hover .sub-menu{ display:block; }
}
.nav-right{ display:flex; align-items:center; gap:16px; flex-shrink:0; }
.lang-toggle{
  font-family:var(--font-display-en);
  font-size:.75rem; letter-spacing:.05em; font-weight:600;
  border:none; color:var(--paper);
  background:var(--gold); padding:9px 18px; border-radius:999px; cursor:pointer;
  white-space:nowrap;
  box-shadow:0 4px 14px -6px rgba(169,120,47,.6);
  transition:background .25s var(--ease), transform .15s var(--ease);
}
.lang-toggle:hover{ background:var(--gold-bright); color:var(--ink); transform:translateY(-1px); }
.lang-toggle:active{ transform:translateY(0); }
/* Desktop: the drawer wrapper is transparent to layout so the links sit in the header row. */
.nav-drawer{ display:contents; }
.nav-close-btn{ display:none; }
.nav-toggle-btn{
  display:none; background:none; border:none; cursor:pointer; padding:0;
  width:44px; height:44px; position:relative; flex-shrink:0;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.nav-toggle-btn span{
  display:block; width:24px; height:2px; background:var(--ink); margin:0;
  transition:transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle-btn.is-open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle-btn.is-open span:nth-child(2){ opacity:0; }
.nav-toggle-btn.is-open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
.nav-overlay{
  position:fixed; inset:0; background:rgba(15,12,8,.55); z-index:45;
  opacity:0; pointer-events:none; transition:opacity .35s var(--ease);
  overscroll-behavior:contain;
}
.nav-overlay.show{ opacity:1; pointer-events:auto; }
body.nav-open{ overflow:hidden; }

/* Compact navigation (hamburger + drawer) below 1400px: the full Malayalam link row needs ~1400px to fit
   beside the church name, language switch and Contact button without wrapping or truncating. */
@media (max-width:1399px){
  .site-nav{ padding:10px 20px; }
  .nav-toggle-btn{ display:flex; }
  .lang-toggle{ min-height:44px; min-width:44px; }
  .nav-drawer{
    display:block; position:fixed; top:0; right:0; z-index:46;
    height:100vh; height:100dvh; width:min(82vw, 290px);
    background:var(--paper); padding:68px 8px 24px;
    overflow-y:auto; overscroll-behavior:contain;
    box-shadow:-10px 0 30px rgba(0,0,0,.15);
    transform:translateX(100%); visibility:hidden;
    transition:transform .4s var(--ease), visibility 0s linear .4s;
  }
  .nav-drawer.open{ transform:translateX(0); visibility:visible; transition:transform .4s var(--ease), visibility 0s; }
  .nav-links{ flex-direction:column; gap:0; }
  .nav-links li{ border-bottom:1px solid var(--stone-line); }
  .nav-links li:last-child{ border-bottom:0; }
  .nav-links a{
    display:block; padding:14px 16px; min-height:44px; font-size:.9rem; letter-spacing:.05em;
    white-space:normal; border-bottom:0;
  }
  body.lang-ml .nav-links a{ font-size:1rem; letter-spacing:0; }
  /* In the drawer the Parish submenu expands inline as an indented list. */
  .sub-toggle{
    display:flex; justify-content:space-between; width:100%; text-align:left;
    padding:14px 16px; min-height:44px; font-size:.9rem; letter-spacing:.05em; border-bottom:0;
  }
  body.lang-ml .sub-toggle{ font-size:1rem; letter-spacing:0; }
  .sub-menu{ padding:0 0 6px 14px; }
  .nav-links .sub-menu li{ border-bottom:0; }
  .sub-menu a{ padding:10px 16px; font-size:.84rem; }
  body.lang-ml .sub-menu a{ font-size:.95rem; }
  .nav-close-btn{
    display:flex; align-items:center; justify-content:center;
    position:absolute; top:10px; right:10px; width:44px; height:44px;
    font-size:1.8rem; line-height:1; background:none; border:none; color:var(--ink);
    cursor:pointer; padding:0;
  }
}
@media (max-width:600px){
  .nav-right .btn{ display:none; }
  .nav-right{ gap:8px; }
  .brand-text{
    white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    line-height:1.2; font-size:.82rem; letter-spacing:.02em;
  }
}
@media (max-width:480px){
  .site-nav{ padding:8px 14px; }
  .lang-toggle{ padding:7px 12px; font-size:.68rem; }
}

/* hero ------------------------------------------------------------------*/
.hero{
  position:relative; height:100vh; min-height:560px;
  display:flex; align-items:flex-end;
  overflow:hidden; color:#fff;
}
.hero-media{ position:absolute; inset:0; z-index:0; }
.hero-media img{
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover; object-position:50% 20%;
  opacity:0; transition:opacity 1s ease-in-out;
}
/* Below 1240px the photos are height-bound (portrait/tablet), leaving no spare sky to shift, so start the
   image layer under the fixed nav (60px ≤480, ≥65px above) to keep the top cross clear of it. */
@media (max-width:1239px){ .hero-media{ top:65px; } }
@media (max-width:480px){ .hero-media{ top:60px; } }
.hero-media img.is-active{ opacity:1; z-index:2; }
.hero-media img.is-prev{ opacity:1; z-index:1; transition:none; }
/* hero arrows: vertically centred; compact circle (44px tap area) below 1240px, full size on wide screens.
   On mouse/trackpad devices they stay hidden until the hero is hovered (or an arrow has keyboard focus). */
.hero-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:44px; height:44px; padding:0; border:0; background:none;
  display:flex; align-items:center; justify-content:center;
  color:var(--gold-bright); cursor:pointer;
  transition:color .3s var(--ease), opacity .4s var(--ease);
}
.hero-arrow::before{
  content:""; position:absolute; inset:4px; border-radius:50%;
  border:1px solid rgba(217,170,78,.7); background:rgba(15,12,8,.35);
  transition:background-color .3s var(--ease), border-color .3s var(--ease);
}
.hero-arrow[hidden]{ display:none; }
.hero-arrow.prev{ left:4px; }
.hero-arrow.next{ right:4px; }
.hero-arrow svg{ position:relative; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.hero-arrow:hover{ color:var(--glass-blue); }
.hero-arrow:hover::before{ background:var(--gold-bright); border-color:var(--gold-bright); }
.hero-arrow:focus-visible{ outline:none; }
.hero-arrow:focus-visible::before{ outline:2px solid var(--gold-bright); outline-offset:3px; }
/* Below 1240px the arrows sit above the heading block (upper third) so they never cover the title. */
@media (max-width:1239px){ .hero-arrow{ top:30%; } }
@media (min-width:1240px){
  .hero-arrow{ width:48px; height:48px; }
  .hero-arrow::before{ inset:0; }
  .hero-arrow svg{ width:20px; height:20px; }
  .hero-arrow.prev{ left:24px; }
  .hero-arrow.next{ right:24px; }
}
@media (hover:hover) and (pointer:fine){
  .hero-arrow{ opacity:0; }
  .hero:hover .hero-arrow, .hero-arrow:focus-visible{ opacity:1; }
}
.hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(15,12,8,.35) 0%, rgba(15,12,8,.35) 40%, rgba(15,12,8,.86) 100%);
  z-index:1;
}
.hero-content{ position:relative; z-index:2; padding:0 24px 90px; max-width:var(--container); margin:0 auto; width:100%; }
.hero-content .eyebrow{ color:var(--gold-bright); text-shadow:0 2px 8px rgba(0,0,0,.4); }
.hero-content h1{
  color:#fff; font-size:clamp(2.1rem, 5vw, 3.4rem); line-height:1.15; max-width:760px;
  text-shadow:0 3px 14px rgba(0,0,0,.45);
}
.hero-content .tagline{ color:#f1e6cc; font-size:1.1rem; max-width:520px; margin-bottom:28px; text-shadow:0 2px 8px rgba(0,0,0,.4); }
.scroll-cue{
  position:absolute; bottom:26px; left:50%; transform:translateX(-50%); z-index:2;
  color:#f1e6cc; font-size:.7rem; letter-spacing:.2em; text-transform:uppercase;
  display:flex; flex-direction:column; align-items:center; gap:8px;
}
.scroll-cue span{ width:1px; height:34px; background:linear-gradient(#f1e6cc, transparent); animation:pulse 2s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{opacity:.3} 50%{opacity:1} }
/* The scroll hint collides with the CTA row on tablets/small laptops, so it only shows on wide screens. */
@media (max-width:1024px){ .scroll-cue{ display:none; } }
@media (max-width:600px){
  .scroll-cue{ display:none; }
  .hero-content{ padding-bottom:64px; }
}
/* Mobile hero composition (matches the supplied phone mock-ups) */
@media (max-width:480px){
  .hero{ height:100vh; height:100svh; min-height:680px; }
  .hero-content{ padding-bottom:32px; }
  /* sized so the longest Malayalam word (~11.7em wide) never breaks mid-word */
  .hero-content h1{ font-size:min(2.1rem, calc((100vw - 48px) / 12.3)); }
  .hero-content .tagline{ font-size:.9rem; }
  .hero .btn-row{ flex-direction:column; gap:12px; }
  .hero .btn-row .btn{ width:100%; justify-content:center; padding-left:16px; padding-right:16px; }
  /* per-slide focal point: centre each church's spire */
  .hero-media img:nth-child(3), .hero-media img:nth-child(5){ object-position:51.5% 20%; }
  .hero-media img:nth-child(4){ object-position:52% 20%; }
}

/* sections ---------------------------------------------------------------*/
section{ padding:100px 0; }
section.alt{ background:var(--stone); }
.section-head{ max-width:640px; margin-bottom:52px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }

.reveal{ opacity:0; transform:translateY(28px); transition:opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .hero-media img{ transition:none; }
}

/* two column ------------------------------------------------------------*/
.two-col{ display:grid; grid-template-columns:1.05fr .95fr; gap:64px; align-items:center; }
.two-col.reverse{ grid-template-columns:.95fr 1.05fr; }
.two-col.reverse .two-col-media{ order:2; }
@media (max-width:860px){
  .two-col, .two-col.reverse{ grid-template-columns:1fr; }
  .two-col.reverse .two-col-media{ order:0; }
}
.two-col-media{ aspect-ratio:4/5; }

/* quick info / mass strip ------------------------------------------------*/
.info-strip{
  display:grid; grid-template-columns:repeat(4,1fr); gap:18px;
  margin-top:10px;
}
@media (max-width:760px){ .info-strip{ grid-template-columns:repeat(2,1fr); gap:14px; } }
.info-strip .item{ padding:26px 14px; min-width:0; }
.info-strip .item .k{ font-family:var(--font-display-en); font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); margin-bottom:8px; }
.info-strip .item .v{ font-size:1rem; color:var(--ink); }
@media (max-width:600px){
  .arch-card{ padding:34px 14px 20px; }
  .info-strip .item .k{ font-size:.66rem; letter-spacing:.08em; }
  .info-strip .item .v{ font-size:.86rem; line-height:1.4; }
}
@media (max-width:380px){
  .info-strip{ grid-template-columns:1fr 1fr; gap:10px; }
  .arch-card{ padding:28px 10px 16px; }
}

.mass-times{ display:grid; grid-template-columns:repeat(2, 1fr); gap:24px; margin:30px 0; }
@media (max-width:760px){ .mass-times{ grid-template-columns:1fr; } }
.mass-times .box{ border:1px solid var(--stone-line); border-radius:6px; padding:28px; background:var(--paper); }
.mass-times .box h3{ font-size:.95rem; }
.mass-times .box .times{ font-size:1.15rem; color:var(--gold); font-family:var(--font-display-en); }
.mass-note{ font-size:.85rem; font-style:italic; color:var(--ink-soft); }


.saint-panel{ background:var(--glass-blue); color:#f1e6cc; border-radius:6px; padding:60px 48px; text-align:center; }
.saint-panel .prayer{ font-family:var(--font-display-en); font-size:1.3rem; line-height:1.5; max-width:620px; margin:20px auto 30px; color:#fff; }
body.lang-ml .saint-panel .prayer{ font-family:var(--font-display-ml); }



/* prayer form ---------------------------------------------------------------*/
.form-panel{ background:var(--glass-blue); border-radius: 8px; padding:56px; color:#f1e6cc; }
.form-panel .section-head h2, .form-panel .section-head p{ color:#fff; }
.form-panel .eyebrow{ color:var(--gold-bright); }
form .field{ margin-bottom:20px; }
form label{ display:block; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; margin-bottom:8px; color:#e5d8b8; }
form input:not([type="radio"]):not([type="checkbox"]), form textarea{
  width:100%; padding:12px 14px; border-radius:4px; border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.08); color:#fff; font-family:inherit; font-size:.95rem;
}
form input::placeholder, form textarea::placeholder{ color:rgba(255,255,255,.45); }
.form-confirm{ display:none; padding:18px 20px; border:1px solid var(--gold-bright); border-radius:6px; color:var(--gold-bright); margin-top:18px; font-size:.92rem; }
.form-confirm.show{ display:block; }
/* Contact form: a failed send must not look like the gold "sent" message. */
#prayerError{ border-color:#ef9a9a; color:#ffcdd2; }

/* gallery -----------------------------------------------------------------*/
.gallery-filters{ display:flex; flex-wrap:wrap; gap:10px; margin:0 0 32px; }
.filter-btn{
  font-family:var(--font-display-en); font-size:.74rem; letter-spacing:.08em; text-transform:uppercase;
  border:1.5px solid var(--stone-line); background:var(--paper); color:var(--ink-soft);
  padding:9px 18px; border-radius:999px; cursor:pointer; transition:all .25s var(--ease);
}
.filter-btn:hover{ border-color:var(--gold); color:var(--gold); }
.filter-btn.active{ background:var(--gold); border-color:var(--gold); color:var(--paper); }

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  grid-auto-rows:190px;
  gap:14px;
}
.gallery-grid figure{
  margin:0; position:relative; overflow:hidden; border-radius:6px; cursor:pointer;
  grid-column:span 1; grid-row:span 1;
  transition:opacity .4s var(--ease), transform .4s var(--ease);
}
.gallery-grid figure.g-wide{ grid-column:span 2; }
.gallery-grid figure.g-tall{ grid-row:span 2; }
.gallery-grid figure.hide{ display:none; }
.gallery-grid img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .6s var(--ease); }
.gallery-grid figure:hover img{ transform:scale(1.07); }
.gallery-grid figcaption{
  position:absolute; left:0; right:0; bottom:0; padding:14px 16px 12px;
  background:linear-gradient(0deg, rgba(15,12,8,.82) 0%, rgba(15,12,8,0) 100%);
  color:#f4ecd8; font-size:.78rem; letter-spacing:.02em;
  transform:translateY(8px); opacity:0; transition:opacity .3s var(--ease), transform .3s var(--ease);
}
.gallery-grid figure:hover figcaption{ opacity:1; transform:translateY(0); }
.gallery-grid figure::after{
  content:"⤢"; position:absolute; top:10px; right:10px; color:#fff;
  background:rgba(20,15,10,.55); width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:.9rem;
  opacity:0; transition:opacity .3s;
}
.gallery-grid figure:hover::after{ opacity:1; }
@media (max-width:900px){
  .gallery-grid{ grid-template-columns:repeat(2,1fr); grid-auto-rows:160px; }
  .gallery-grid figure.g-wide{ grid-column:span 2; }
}
@media (max-width:560px){
  .gallery-grid{ grid-template-columns:1fr; grid-auto-rows:220px; }
  .gallery-grid figure.g-wide, .gallery-grid figure.g-tall{ grid-column:span 1; grid-row:span 1; }
}

/* video embed ---------------------------------------------------------------*/
.video-embed-wrap{
  position:relative; margin-top:48px; border-radius: 40% 40% 6px 6px / 16% 16% 6px 6px;
  border:3px solid var(--gold); overflow:hidden; aspect-ratio:16/9; background:#000;
}
.video-embed-wrap iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.video-caption{ text-align:center; margin-top:16px; font-size:.85rem; color:var(--ink-soft); }

.lightbox{
  position:fixed; inset:0; background:rgba(12,9,6,.92); z-index:200;
  display:none; align-items:center; justify-content:center; padding:40px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:min(90vw, 900px); max-height:82vh; border-radius:4px; box-shadow:0 30px 60px rgba(0,0,0,.5); }
.lightbox-close{
  position:absolute; top:24px; right:28px; color:#fff; background:none; border:none;
  font-size:1.8rem; cursor:pointer; line-height:1; width:44px; height:44px; display:flex; align-items:center; justify-content:center;
}

/* ministries --------------------------------------------------------------*/
.ministry-chip{
  border:1px solid var(--stone-line); border-radius:999px; padding:10px 20px;
  font-size:.85rem; background:var(--paper); display:inline-flex;
}
.ministry-wrap{ display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }

/* parish overview (homepage previews of the inner pages) ---------------------*/
.overview-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap:24px; margin-top:48px; }
.overview-card{
  display:flex; flex-direction:column; min-width:0;
  background:var(--paper); border:2px solid var(--stone-line); border-top:4px solid var(--gold);
  border-radius:6px; padding:24px 24px 22px;
}
.overview-card h3{ font-size:1.1rem; line-height:1.4; color:var(--glass-blue); margin:0 0 .5em; }
.overview-card p{ font-size:.95rem; line-height:1.7; margin:0 0 1.1em; }
.read-more{
  margin-top:auto; align-self:flex-start; min-height:44px; display:inline-flex; align-items:center;
  font-family:var(--font-display-en); font-size:.78rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--gold); text-decoration:none; border-bottom:1px solid transparent;
}
.read-more::after{ content:"→"; margin-left:8px; transition:transform .25s var(--ease); }
.read-more:hover{ color:var(--glass-blue); }
.read-more:hover::after{ transform:translateX(3px); }
body.lang-ml .read-more{ font-family:var(--font-body-ml); font-size:.9rem; text-transform:none; }

/* contact / visit ------------------------------------------------------------*/
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:48px; }
@media (max-width:860px){ .contact-grid{ grid-template-columns:1fr; } }
.map-frame{ border-radius:6px; overflow:hidden; border:1px solid var(--stone-line); aspect-ratio:4/3; }
.map-frame iframe{ width:100%; height:100%; border:0; }
.contact-row{ display:flex; gap:14px; margin-bottom:16px; font-size:.98rem; }
.contact-row a{ overflow-wrap:anywhere; }
.contact-row .ic{ color:var(--gold); flex-shrink:0; }

/* footer ------------------------------------------------------------------*/
footer{ background:var(--ink); color:#d8ceb9; padding:60px 0 28px; }
footer .foot-top{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:32px; padding-bottom:36px; border-bottom:1px solid rgba(255,255,255,.12); }
footer h4{ color:#fff; font-family:var(--font-display-en); font-size:.85rem; letter-spacing:.1em; text-transform:uppercase; margin-bottom:16px; }
footer ul{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
footer a{ text-decoration:none; color:#d8ceb9; font-size:.9rem; }
footer a:hover{ color:var(--gold-bright); }
.foot-bottom{ padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:.8rem; color:#a89a7c; }

.badge-diocese{
  display:inline-block; margin-top:6px; font-size:.78rem; letter-spacing:.05em; color:var(--gold);
  border:1px solid rgba(133,96,31,.5); padding:4px 12px; border-radius:999px;
  max-width:100%; white-space:normal;
}

/* subpages (Malayalam-only content pages) -----------------------------------*/
.page-head{ background:linear-gradient(180deg, var(--ink) 0%, var(--glass-blue) 160%); color:#fff; padding:128px 0 48px; }
.page-head .eyebrow{ color:var(--gold-bright); }
.page-head h1{ color:#fff; font-size:clamp(1.5rem, 5vw, 2.6rem); line-height:1.3; max-width:820px; margin:0; text-shadow:0 3px 14px rgba(0,0,0,.35); }
.page-body{ padding:64px 0 90px; }
.page-body.alt{ background:var(--stone); }
.prose{ max-width:760px; margin:0 auto; }
.prose > :first-child{ margin-top:0; }
.prose p{ font-size:1.05rem; line-height:1.95; color:var(--ink-soft); margin:0 0 1.3em; }
.prose h2, .prose h3{ color:var(--glass-blue); line-height:1.4; margin:2.2em 0 .7em; }
.prose h2{ font-size:clamp(1.25rem, 3.6vw, 1.6rem); }
.prose h3{ font-size:clamp(1.15rem, 3.2vw, 1.4rem); padding-bottom:.35em; border-bottom:1px solid var(--stone-line); }
.prose a, .name-list a{ color:var(--glass-blue); text-decoration:none; border-bottom:1px solid var(--gold); }
.prose a:hover, .name-list a:hover{ color:var(--gold); }
.back-link{ font-size:.95rem; margin:0 0 1.8em; }
.page-figure{ margin:0 0 2em; border:3px solid var(--gold); border-radius:4px; overflow:hidden; box-shadow:0 18px 40px -18px rgba(36,28,20,.45); }
.page-figure img{ display:block; width:100%; height:auto; }
.name-list{ list-style:none; margin:0; padding:0; }
.name-list li{ position:relative; padding:12px 0 12px 28px; border-bottom:1px solid var(--stone-line); font-size:1.05rem; line-height:1.7; color:var(--ink-soft); overflow-wrap:anywhere; }
.name-list li::before{ content:""; position:absolute; left:6px; top:1.35em; width:7px; height:7px; border-radius:50%; background:var(--gold); }
.ward-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap:24px; align-items:start; }
.ward-card{ background:var(--paper); border:2px solid var(--stone-line); border-top:4px solid var(--gold); border-radius:6px; padding:22px 24px 12px; }
.ward-card h2{ font-size:1.2rem; line-height:1.5; margin:0 0 .6em; color:var(--glass-blue); }
.inst-group{ margin:0 0 2.2em; }
.inst-group h2{ margin:0 0 .5em; }
@media (max-width:480px){
  .page-head{ padding:100px 0 36px; }
  .page-body{ padding:44px 0 64px; }
  .prose p{ font-size:1rem; line-height:1.9; }
}

/* Phase 5: 2-up info strip, 2x2 Mass grid */
.info-strip.two{ grid-template-columns:repeat(2,1fr); max-width:560px; margin-left:auto; margin-right:auto; }

/* Phase 6B: subpage article content stays Malayalam in both languages (only the shell switches) */
body.subpage main{ font-family:var(--font-body-ml); }
body.subpage main h2, body.subpage main h3{ font-family:var(--font-display-ml); overflow-wrap:anywhere; }
body.lang-en.subpage .back-link{ font-family:var(--font-body-en); }

/* Phase 6D: accessibility polish -------------------------------------------*/
.skip-link{
  position:fixed; top:-120px; left:12px; z-index:200;
  padding:12px 18px; background:var(--paper); color:var(--ink);
  border:2px solid var(--glass-blue); border-radius:4px;
  font-size:.9rem; font-weight:600; text-decoration:none;
}
.skip-link:focus{ top:12px; }
main:focus{ outline:none; }
:focus-visible{ outline:3px solid var(--glass-blue); outline-offset:2px; }
.hero :focus-visible, .page-head :focus-visible, .saint-panel :focus-visible, .form-panel :focus-visible,
footer :focus-visible, .lightbox :focus-visible{ outline-color:#fff; }
.hero-arrow:focus-visible{ outline:none; }
.saint-panel .eyebrow{ color:var(--gold-bright); }
@media (max-width:1399px){ .filter-btn{ min-height:44px; } }

/* Malayalam script must not get Latin-style letter-spacing (it pulls conjuncts and vowel signs apart). */
body.lang-ml [data-lang="ml"], body.lang-ml [data-lang="ml"] *,
.lang-toggle[lang="ml"], main[lang="ml"] :is(h2, h3, p, li){ letter-spacing:0 !important; }

/* our shepherds (clergy portraits) ------------------------------------------*/
#shepherds{ padding-top:20px; scroll-margin-top:72px; } /* clear the fixed nav when jumped to from the menu */
.shepherd-grid{
  display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:24px;
  list-style:none; margin:0; padding:0;
}
@media (max-width:1023px){ .shepherd-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:560px){ .shepherd-grid{ grid-template-columns:1fr; max-width:360px; margin:0 auto; } }
.shepherd-card{
  display:flex; flex-direction:column; min-width:0; text-align:center;
  background:var(--paper); border:2px solid var(--stone-line); border-top:4px solid var(--gold);
  border-radius:6px; padding:16px 16px 22px;
}
.shepherd-photo{
  aspect-ratio:4/5; overflow:hidden; border-radius:4px; border:1px solid var(--stone-line);
  background:var(--stone); margin-bottom:18px;
}
.shepherd-photo img{ width:100%; height:100%; object-fit:cover; object-position:center top; }
.shepherd-card h3{ font-size:1.05rem; line-height:1.4; color:var(--glass-blue); margin:0 0 .35em; }
.shepherd-card p{ font-size:.92rem; line-height:1.6; margin:0; }
