/* =========================================================
   IPA Limeira — Design System v2
   Inspirado em referência de landing page para igrejas:
   tipografia grande e sóbria, faixas fotográficas de
   respiro, títulos emoldurados — adaptado à paleta
   branco / verde-escuro #333c29 da marca Aliança.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,500&family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ink:        #23281c;
  --green-deep: #333c29;
  --green-shade:#20261a;
  --green-sage: #697b56;
  --green-lime: #bfd072;
  --cream:      #FAF7F0;
  --white:      #FFFFFF;
  --stone:      #83867a;
  --line:       rgba(51,60,41,0.15);
  --line-on-dark: rgba(250,247,240,0.22);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Work Sans', 'Segoe UI', Helvetica, Arial, sans-serif;

  --container: 1200px;
  --container-narrow: 760px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
  color: var(--green-deep);
}
h1 { font-size: clamp(2.6rem, 3.4vw + 1.3rem, 4.6rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 1.8vw + 1.2rem, 2.7rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 0.5vw + 1.05rem, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
a { color: var(--green-sage); text-decoration: none; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 2px solid var(--green-lime); outline-offset: 3px; }

/* ---- on-dark: the single switch for light text on any dark
   or photo-band background. Apply alongside a bg-* class. ---- */
.on-dark { color: rgba(255,255,255,0.88); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--white); }
.on-dark p { color: rgba(255,255,255,0.82); }
.on-dark a:not(.btn) { color: var(--green-lime); }
.on-dark a:not(.btn):hover { color: var(--white); }
.on-dark .eyebrow { color: var(--green-lime); }
.on-dark .frame-title { color: var(--white); border-color: var(--line-on-dark); }
.on-dark .frame-title span { color: var(--white); }
.on-dark .frame-rule { background: var(--line-on-dark); }
.on-dark .frame-ring { color: var(--green-lime); }
.on-dark .lede { color: rgba(255,255,255,0.74); }
.on-dark .stone-text { color: rgba(255,255,255,0.68); }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--green-sage); margin-bottom: 1.2em;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }

/* =========================================================
   Signature — the covenant frame
   A section title set inside a hairline frame, flanked by
   rules that terminate in the interlocking rings from the
   mark's icon. Echoes the reference's ornamental section
   headers, but built from the church's own emblem.
   ========================================================= */
.frame-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 auto 1.3em; }
.frame-rule { flex: 1 1 auto; max-width: 130px; height: 1px; background: var(--line); }
.frame-ring { display: inline-flex; width: 20px; height: 12px; color: var(--green-sage); flex-shrink: 0; }
.frame-ring svg { width: 100%; height: 100%; }
.frame-title {
  font-family: var(--font-body); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--green-deep);
  border: 1px solid var(--line); padding: 12px 26px; white-space: nowrap;
}
.section-title { text-align: center; max-width: 640px; margin: 0 auto 3.6rem; }
.section-title h2 { text-align: center; }
.section-title .lede { color: var(--stone); font-size: 1.05rem; margin-top: 0.6em; }
.section-title.left { margin-left: 0; text-align: left; }
.section-title.left .frame-head { justify-content: flex-start; }
.section-title.left .frame-rule:first-child { max-width: 40px; }
.section-title.left h2 { text-align: left; }

/* =========================================================
   Sections & photo bands
   ========================================================= */
section { position: relative; }
.bg-cream { background: var(--cream); }
.bg-white { background: var(--white); }
.bg-green { background: var(--green-deep); }
.bg-green-shade { background: var(--green-shade); }

.pad-xl { padding: 128px 0; }
.pad-l { padding: 96px 0; }
.pad-m { padding: 64px 0; }
@media (max-width: 780px) {
  .pad-xl { padding: 80px 0; }
  .pad-l { padding: 64px 0; }
  .pad-m { padding: 48px 0; }
}

.photo-band {
  position: relative;
  background: var(--green-shade);
  color: var(--white);
  overflow: hidden;
}
.photo-band .band-media { position: absolute; inset: 0; z-index: 0; }
.photo-band .band-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-band .band-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(32,38,26,0.72) 0%, rgba(32,38,26,0.55) 45%, rgba(32,38,26,0.86) 100%);
}
.photo-band .band-content { position: relative; z-index: 1; }
.photo-band.tight .band-media::after { background: rgba(32,38,26,0.72); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 26px 0;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.is-solid { background: rgba(250,247,240,0.97); backdrop-filter: blur(6px); padding: 14px 0; box-shadow: 0 1px 0 var(--line); }
body.no-hero .site-header { background: rgba(250,247,240,0.97); backdrop-filter: blur(6px); padding: 14px 0; box-shadow: 0 1px 0 var(--line); }

.brand img { height: 36px; width: auto; }
/* Um único arquivo de logo serve os dois estados. Sobre o hero escuro ele
   precisa ser branco, e o filtro entrega exatamente o mesmo resultado do
   arquivo branco, que é monocromático. Assim o navegador deixa de baixar
   um segundo SVG de 71 KB em toda página só para trocar de cor. */
.brand-logo { filter: brightness(0) invert(1); transition: filter 0.35s ease; }
.site-header.is-solid .brand-logo, body.no-hero .brand-logo { filter: none; }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a {
  color: var(--white); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.site-header.is-solid .main-nav a, body.no-hero .main-nav a { color: var(--ink); }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; background: var(--green-lime); transition: right 0.25s ease; }
.main-nav a:hover::after, .main-nav a.is-active::after { right: 0; }
.main-nav a:hover, .main-nav a.is-active { color: var(--green-lime); }
.site-header.is-solid .main-nav a:hover, .site-header.is-solid .main-nav a.is-active,
body.no-hero .main-nav a:hover, body.no-hero .main-nav a.is-active { color: var(--green-sage); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 34px; height: 26px; position: relative; padding: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}
.nav-toggle span { top: 12px; }
.nav-toggle span::before { top: -9px; }
.nav-toggle span::after { top: 9px; }
.site-header.is-solid .nav-toggle span, .site-header.is-solid .nav-toggle span::before, .site-header.is-solid .nav-toggle span::after,
body.no-hero .nav-toggle span, body.no-hero .nav-toggle span::before, body.no-hero .nav-toggle span::after { background: var(--green-deep); }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(9px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 960px) {
  /* O backdrop-filter do header o transforma em containing block dos filhos
     position:fixed, fazendo o inset:0 do menu resolver contra a faixa de 64px
     do header em vez do viewport. Sem isso o menu abria como uma caixinha. */
  .site-header.is-solid,
  body.no-hero .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }

  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 340px); background: var(--green-deep);
    flex-direction: column; align-items: flex-start; padding: 100px 32px 40px; gap: 30px;
    transform: translateX(100%); transition: transform 0.35s ease;
    height: 100vh; height: 100dvh; overflow-y: auto; }
  .nav-open .main-nav { transform: translateX(0); box-shadow: -12px 0 30px rgba(0,0,0,0.2); }
  .main-nav ul { flex-direction: column; gap: 22px; }
  .main-nav a { color: var(--white); font-size: 1rem; }
  .main-nav .btn-app { color: var(--white); border-color: var(--green-lime); margin-top: 4px; }
  .nav-toggle { display: block; }

  /* Escurece a página atrás do menu e trava o scroll por baixo dele.
     z-index 99 fica abaixo do header (100), então o botão de fechar
     continua clicável. */
  body.nav-open::before { content: ""; position: fixed; inset: 0; z-index: 99; background: rgba(32,38,26,0.62); }
  body.nav-open { overflow: hidden; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 15px 30px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: all 0.22s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-lime); color: var(--green-shade); border-color: var(--green-lime); }
.btn-primary:hover { background: transparent; color: var(--green-lime); }
.on-dark .btn-primary:hover, .photo-band .btn-primary:hover { color: var(--green-lime); }
.btn-outline-light { border-color: rgba(255,255,255,0.5); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: var(--white); color: var(--green-shade); border-color: var(--white); }
.btn-outline-dark { border-color: var(--green-deep); color: var(--green-deep); background: transparent; }
.btn-outline-dark:hover { background: var(--green-deep); color: var(--white); }
.btn-solid-dark { background: var(--green-deep); color: var(--white); border-color: var(--green-deep); }
.btn-solid-dark:hover { background: var(--green-shade); border-color: var(--green-shade); }
.btn-app { background: rgba(191,208,114,0.16); border: 1px solid var(--green-lime); color: var(--white); font-size: 0.7rem; padding: 12px 28px; }
.site-header.is-solid .btn-app, body.no-hero .btn-app { color: var(--green-deep); border-color: var(--green-sage); }
.btn-app:hover { background: var(--green-lime); color: var(--green-shade); }
.btn-text { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.btn-text svg { width: 15px; height: 11px; transition: transform 0.2s ease; }
.btn-text:hover svg { transform: translateX(4px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =========================================================
   Hero (centered, dramatic)
   ========================================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--white); overflow: hidden; text-align: center; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(32,38,26,0.42) 0%, rgba(32,38,26,0.38) 45%, rgba(32,38,26,0.88) 100%); }
.hero-media .img-placeholder { position: absolute; inset: 0; min-height: 0; border: none; border-radius: 0; align-items: flex-start; padding-top: 110px; }
@media (max-width: 600px) {
  .hero-media .img-placeholder { padding-top: 82px; }
  .hero-media .ph-detail { display: none; }
  .hero-media .ph-label { padding: 10px 16px; }
}
.hero-content { position: relative; z-index: 1; padding: 0 24px; max-width: 900px; }
.hero .eyebrow { justify-content: center; color: var(--green-lime); }
.hero .eyebrow::after { content: ""; width: 24px; height: 1px; background: currentColor; }
.hero h1 { color: var(--white); text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(2.3rem, 4vw + 1rem, 4.4rem); }
.hero .subtitle { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(1.05rem, 1vw + 0.8rem, 1.35rem); color: rgba(255,255,255,0.86); margin-top: 0.6rem; }
.hero-rule { width: 60px; height: 1px; background: var(--green-lime); margin: 2.2rem auto; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 0.6rem; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 1;
  color: rgba(255,255,255,0.65); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-lime); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(6px); opacity: 1; } }
@media (max-width: 780px) { .hero-scroll { display: none; } }

/* Interior page header (photo band variant) */
.page-header { padding: 176px 0 88px; text-align: center; }
.page-header .eyebrow { justify-content: center; }
.page-header h1 { text-transform: uppercase; font-size: clamp(2.1rem, 2.6vw + 1.1rem, 3.2rem); }
.page-header .lede { max-width: 56ch; margin: 0 auto; font-size: 1.05rem; }

/* =========================================================
   Placeholder images
   ========================================================= */
.img-placeholder {
  position: relative; width: 100%;
  background: repeating-linear-gradient(135deg, rgba(51,60,41,0.07) 0 12px, rgba(51,60,41,0.02) 12px 24px), var(--white);
  border: 1.5px dashed rgba(51,60,41,0.35);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.img-placeholder::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(105,123,86,0.1), rgba(191,208,114,0.14)); }
.img-placeholder .ph-label {
  position: relative; z-index: 1; text-align: center; padding: 16px 20px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; color: var(--green-sage);
  background: rgba(255,255,255,0.85); line-height: 1.5;
}
.img-placeholder .ph-label b { display: block; color: var(--green-deep); font-size: 0.8rem; margin-bottom: 3px; }
.img-placeholder.ratio-hero { min-height: 100vh; }
.img-placeholder.ratio-16-9 { aspect-ratio: 16/9; }
.img-placeholder.ratio-4-5 { aspect-ratio: 4/5; }
.img-placeholder.ratio-1-1 { aspect-ratio: 1/1; }
.img-placeholder.ratio-3-2 { aspect-ratio: 3/2; }
.img-placeholder.ratio-21-9 { aspect-ratio: 21/9; }
.img-placeholder.ratio-3-4 { aspect-ratio: 3/4; }
.photo-band .img-placeholder { border: none; background: none; align-items: flex-start; padding-top: 22px; }
.photo-band .img-placeholder::before { display: none; }
.photo-band .img-placeholder .ph-label { background: rgba(0,0,0,0.4); color: rgba(255,255,255,0.85); }
.photo-band .img-placeholder .ph-label b { color: var(--white); }
.photo-band.page-header .img-placeholder { padding-top: 100px; }

/* =========================================================
   Three pillars (icon feature row)
   ========================================================= */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pillar { background: var(--cream); padding: 50px 42px; text-align: center; }
.pillar-icon { width: 46px; height: 46px; margin: 0 auto 1.6rem; color: var(--green-sage); }
.pillar h3 { margin-bottom: 0.6em; }
.pillar p { color: var(--stone); font-size: 0.95rem; margin-bottom: 1.2em; }
@media (max-width: 780px) { .pillars { grid-template-columns: 1fr; } }

/* =========================================================
   Area doors (six-ways grid) — refined frame variant
   ========================================================= */
.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.door-card { background: var(--white); padding: 48px 40px; transition: background 0.25s ease; }
.door-card:hover { background: var(--cream); }
.door-card .frame-ring { margin-bottom: 1.4em; width: 26px; height: 16px; }
.door-card h3 { margin-bottom: 0.5em; }
.door-card p { color: var(--stone); font-size: 0.94rem; margin-bottom: 1.2em; }
@media (max-width: 940px) { .door-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .door-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Schedule
   ========================================================= */
.schedule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-on-dark); }
.schedule-card { background: var(--green-deep); padding: 36px 30px; }
.bg-green-shade .schedule-card { background: var(--green-shade); }
.schedule-card .day { font-family: var(--font-display); font-style: italic; color: var(--green-lime); font-size: 1.1rem; margin-bottom: 1.1em; display: block; }
.schedule-item { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-on-dark); }
.schedule-item:first-of-type { border-top: none; }
.schedule-item time { font-weight: 600; color: var(--white); white-space: nowrap; font-size: 0.92rem; }
.schedule-item span.what { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
@media (max-width: 860px) { .schedule-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .schedule-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Verse / quote band
   ========================================================= */
.verse-band { text-align: center; padding: 120px 0; }
.verse-mark { width: 54px; height: 54px; margin: 0 auto 2rem; color: var(--green-lime); }
.verse-text { font-family: var(--font-display); font-style: italic; font-size: clamp(1.5rem, 1.6vw + 1.05rem, 2.3rem); line-height: 1.5; color: var(--white); max-width: 800px; margin: 0 auto 1.3rem; }
.verse-cite { color: var(--green-lime); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }

/* =========================================================
   Ministries (editorial rows)
   ========================================================= */
.ministry-list { display: flex; flex-direction: column; }
.ministry-row { display: grid; grid-template-columns: 0.85fr 1.6fr; gap: 56px; padding: 54px 0; border-top: 1px solid var(--line); align-items: start; }
.ministry-row:first-child { border-top: none; }
.ministry-row .ministry-tag { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--green-sage); }
.ministry-row blockquote { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--green-deep); margin: 0 0 0.9em; line-height: 1.5; }
.ministry-row p.desc { color: var(--stone); margin-bottom: 0; }
@media (max-width: 780px) { .ministry-row { grid-template-columns: 1fr; gap: 18px; padding: 38px 0; } }

/* =========================================================
   Leadership — photo cards, always-visible caption
   ========================================================= */
.leader-group { margin-bottom: 4rem; }
.leader-group:last-child { margin-bottom: 0; }
.leader-group > h4 { text-align: center; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--green-sage); margin-bottom: 2.2em; }
.leader-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 400px)); gap: 26px; justify-content: center; }
.leader-photo { position: relative; }
.leader-photo .img-placeholder { aspect-ratio: 4/5; }
.leader-photo img { width: 100%; max-width: 400px; aspect-ratio: 4/5; object-fit: cover; display: block; }
.leader-caption { text-align: center; padding-top: 1rem; }
.leader-caption .name { font-family: var(--font-display); font-weight: 600; color: var(--green-deep); font-size: 1.02rem; }
.leader-caption .role { color: var(--stone); font-size: 0.84rem; letter-spacing: 0.03em; margin-top: 0.15em; }

/* =========================================================
   Congregações — cartão com foto do pastor, endereço e botão
   ========================================================= */
.congregation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.congregation-card { background: var(--white); display: flex; flex-direction: column; }
.congregation-photo { position: relative; }
.congregation-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.congregation-photo .img-placeholder { aspect-ratio: 4/5; }
.congregation-body { padding: 34px 32px 38px; flex: 1; display: flex; flex-direction: column; }
.congregation-body h3 { font-size: 1.08rem; margin-bottom: 0.3em; }
.congregation-body .pastor-name { color: var(--green-sage); font-size: 0.86rem; letter-spacing: 0.02em; margin-bottom: 1.3em; }
.congregation-body .address { display: flex; gap: 10px; align-items: flex-start; color: var(--stone); font-size: 0.88rem; line-height: 1.5; margin-bottom: 1.8em; }
.congregation-body .address svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--green-sage); }
.congregation-body .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 900px) { .congregation-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }

/* =========================================================
   Gallery grid (sermons) — 1 vídeo em destaque (1080x608)
   + 3 miniaturas abaixo (497x280 cada). Só estes 4, sempre.
   Os tamanhos abaixo são o tamanho pedido em telas largas;
   encolhem proporcionalmente (mantendo a proporção 16:9) em
   telas menores, e no celular viram uma lista única, do mais
   recente para o mais antigo, todos do mesmo tamanho.
   ========================================================= */
.sermon-layout { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.gallery-featured { width: 100%; max-width: 1080px; }
.gallery-featured .tile-thumb { aspect-ratio: 1080 / 608; }
.gallery-featured .tile-thumb .img-placeholder { aspect-ratio: 1080 / 608; align-items: flex-start; padding-top: 24px; }

.gallery-thumbs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 497px)); gap: 20px;
  width: 100%; max-width: calc(497px * 3 + 40px); justify-content: center;
}
.gallery-tile .tile-thumb { aspect-ratio: 497 / 280; }
.gallery-tile .tile-thumb .img-placeholder { aspect-ratio: 497 / 280; align-items: flex-start; padding-top: 14px; }

.gallery-tile, .gallery-featured { position: relative; overflow: hidden; cursor: pointer; }
.gallery-tile .tile-thumb, .gallery-featured .tile-thumb { overflow: hidden; transition: transform 0.5s ease; }
.gallery-tile .tile-thumb img, .gallery-featured .tile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-tile:hover .tile-thumb, .gallery-featured:hover .tile-thumb { transform: scale(1.03); }

.tile-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 52px; height: 52px; border-radius: 50%; background: rgba(20,24,16,0.5);
  border: 1.3px solid rgba(255,255,255,0.75); display: flex; align-items: center; justify-content: center;
  color: var(--white); transition: background 0.25s ease, border-color 0.25s ease; pointer-events: none;
}
.tile-play svg { width: 16px; height: 16px; margin-left: 2px; }
.gallery-tile:hover .tile-play, .gallery-featured:hover .tile-play { background: var(--green-sage); border-color: var(--green-sage); }
.gallery-featured .tile-play { width: 78px; height: 78px; }
.gallery-featured .tile-play svg { width: 24px; height: 24px; margin-left: 3px; }

.gallery-tile .tile-caption, .gallery-featured .tile-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 20px; background: linear-gradient(0deg, rgba(32,38,26,0.85), transparent 80%);
  color: var(--white); opacity: 0; transition: opacity 0.25s ease;
}
.gallery-tile:hover .tile-caption { opacity: 1; }
.gallery-tile .tile-caption .meta, .gallery-featured .tile-caption .meta { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-lime); margin-bottom: 0.3em; }
.gallery-tile .tile-caption h3 { color: var(--white); font-size: 1rem; margin: 0; }

.gallery-featured .tile-caption {
  opacity: 1; padding: 40px;
  background: linear-gradient(0deg, rgba(20,24,16,0.9), rgba(20,24,16,0.1) 65%, transparent 100%);
}
.gallery-featured .tile-caption h3 { color: var(--white); font-family: var(--font-display); font-size: clamp(1.3rem, 2.3vw, 1.9rem); margin: 0; max-width: 720px; }

@media (max-width: 700px) {
  .gallery-featured, .gallery-thumbs { max-width: 480px; }
  .gallery-thumbs { grid-template-columns: 1fr; }
  .gallery-featured .tile-thumb, .gallery-tile .tile-thumb,
  .gallery-featured .tile-thumb .img-placeholder, .gallery-tile .tile-thumb .img-placeholder { aspect-ratio: 16 / 9; }
  .gallery-tile .tile-caption { opacity: 1; padding: 18px; }
  .gallery-featured .tile-caption { padding: 22px; }
}

/* =========================================================
   Agenda (events) — program list
   ========================================================= */
.agenda-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.agenda-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 30px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.agenda-row.has-thumb { grid-template-columns: 110px 72px 1fr auto; }
.agenda-date { text-align: center; }
.agenda-date b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--green-deep); line-height: 1; }
.agenda-date span { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
.agenda-date em { display: block; font-style: normal; font-size: 0.74rem; color: var(--green-sage); margin-top: 0.35em; }
.agenda-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--line); }
.agenda-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-info h3 { margin-bottom: 0.25em; font-size: 1.1rem; }
.agenda-info p { color: var(--stone); margin: 0; font-size: 0.92rem; }
.agenda-info .agenda-local { color: var(--stone); font-size: 0.82rem; margin: 0.4em 0 0; }
.agenda-status { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-sage); border: 1px solid var(--line); padding: 7px 14px; white-space: nowrap; }
.agenda-empty { color: var(--stone); text-align: center; padding: 2.6rem 0; }
@media (max-width: 620px) {
  .agenda-row { grid-template-columns: 70px 1fr; }
  .agenda-row.has-thumb { grid-template-columns: 70px 56px 1fr; }
  .agenda-thumb { width: 56px; height: 56px; }
  .agenda-status { grid-column: 1 / -1; justify-self: start; }
}

/* =========================================================
   Giving
   ========================================================= */
.give-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.give-card { background: var(--white); padding: 44px 38px; }
.give-card h3 { display: flex; align-items: center; gap: 12px; }
.give-card h3 svg { width: 22px; height: 22px; color: var(--green-sage); flex-shrink: 0; }
.give-card dl { margin: 1.4em 0 0; }
.give-card dt { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); margin-top: 1em; }
.give-card dt:first-child { margin-top: 0; }
.give-card dd { margin: 0.15em 0 0; font-weight: 600; color: var(--green-deep); font-family: var(--font-display); font-size: 1.05rem; }
@media (max-width: 940px) { .give-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Map card (pinned info panel)
   ========================================================= */
.map-frame { position: relative; }
.map-frame .img-placeholder { aspect-ratio: 21/9; }
.map-frame .map-embed { width: 100%; aspect-ratio: 21/9; border: 0; display: block; }
@media (max-width: 700px) { .map-frame .map-embed { aspect-ratio: 4/5; } }
.map-card {
  position: absolute; left: 40px; bottom: -40px; z-index: 2;
  background: var(--green-deep); color: var(--white);
  padding: 32px 34px; max-width: 320px;
  box-shadow: 0 18px 40px rgba(32,38,26,0.28);
}
.map-card h4 { color: var(--green-lime); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.14em; margin-bottom: 1em; }
.map-card p { font-size: 0.92rem; color: rgba(255,255,255,0.85); margin-bottom: 0.8em; }
.map-card a.btn { margin-top: 0.4em; }
@media (max-width: 700px) { .map-card { position: static; margin-top: -1px; max-width: none; } }

/* =========================================================
   Contact — drop us a line (photo band form) + list
   ========================================================= */
.contact-list { display: flex; flex-direction: column; }
.contact-option { display: flex; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.contact-option:first-child { border-top: none; }
.contact-option .icon { width: 40px; height: 40px; flex-shrink: 0; color: var(--green-sage); }
.contact-option h4 { margin-bottom: 0.3em; }
.contact-option p { margin-bottom: 0.5em; color: var(--stone); font-size: 0.95rem; }

.band-form { max-width: 640px; margin: 0 auto; }
.band-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.band-form .field { margin-bottom: 20px; }
.band-form label { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-lime); margin-bottom: 9px; }
.band-form input, .band-form textarea {
  width: 100%; border: none; border-bottom: 1.5px solid rgba(255,255,255,0.35);
  background: transparent; padding: 12px 2px; font-family: var(--font-body);
  font-size: 1rem; color: var(--white); resize: vertical;
}
.band-form input::placeholder, .band-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.band-form input:focus, .band-form textarea:focus { outline: none; border-color: var(--green-lime); }
.band-form .form-actions { text-align: center; margin-top: 1.6rem; }
@media (max-width: 600px) { .band-form .field-row { grid-template-columns: 1fr; } }

/* Formulário do Ordus System, embutido por iframe.
   Sem o form_embed.js de propósito: aquele script assume o controle do
   iframe, aplica visibility:hidden e falha de forma intermitente em
   revelá-lo, deixando a página sem formulário nenhum. Um iframe simples
   com src carrega sempre. O preço é a altura fixa em vez de automática,
   por isso a folga generosa abaixo. */
.band-form .form-embed {
  width: 100%; height: 650px; border: none; border-radius: 6px;
  background: #fff; display: block; visibility: visible;
}
.band-form .form-fallback { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 1.2rem; text-align: center; }
.band-form .form-fallback a { color: var(--green-lime); }
/* No celular os rótulos e o seletor de país ocupam mais linhas. */
@media (max-width: 600px) { .band-form .form-embed { height: 750px; } }

/* =========================================================
   Social row
   ========================================================= */
.social-ring-row { display: flex; gap: 16px; justify-content: center; }
.social-ring-row a {
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--green-deep);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.social-ring-row a:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.social-ring-row svg { width: 18px; height: 18px; }
.on-dark .social-ring-row a { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.85); }
.on-dark .social-ring-row a:hover { background: var(--green-lime); border-color: var(--green-lime); color: var(--green-shade); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--green-shade); color: rgba(255,255,255,0.78); padding: 90px 0 34px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 50px; padding-bottom: 60px; border-bottom: 1px solid var(--line-on-dark); }
.footer-brand img { height: 42px; margin-bottom: 20px; }
/* mesmo motivo do header: o rodapé é escuro, o logo precisa sair branco */
.footer-logo { filter: brightness(0) invert(1); }
.footer-brand p { max-width: 32ch; font-size: 0.92rem; color: rgba(255,255,255,0.6); }
.footer-col h4 { color: var(--white); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.5em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-col a:hover { color: var(--green-lime); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; flex-wrap: wrap; gap: 16px; }
.footer-bottom p { margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.social-row { display: flex; gap: 14px; }
.social-row a { width: 34px; height: 34px; border: 1px solid var(--line-on-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8); }
.social-row a:hover { background: var(--green-lime); border-color: var(--green-lime); color: var(--green-shade); }
.social-row svg { width: 15px; height: 15px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* =========================================================
   Video modal (lightbox player for sermon thumbnails)
   ========================================================= */
.gallery-tile { cursor: pointer; }
.video-modal {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(20,24,16,0.94); padding: 60px 24px 24px;
}
.video-modal.is-open { display: flex; }
.video-modal-frame {
  position: relative; width: 100%; max-width: 980px; aspect-ratio: 16/9;
  background: #000; box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal-empty {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: rgba(255,255,255,0.85); text-align: center; padding: 20px;
  font-family: var(--font-body); font-size: 0.95rem; line-height: 1.6;
}
.video-modal-close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 50%; background: transparent;
  color: var(--white); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.video-modal-close:hover { background: var(--green-lime); color: var(--green-shade); border-color: var(--green-lime); }

/* =========================================================
   Misc
   ========================================================= */
.tag { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-sage); background: rgba(105,123,86,0.12); padding: 6px 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 66px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 36px; } }
.prose p { max-width: 65ch; }
.col-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.stone-text { color: var(--stone); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green-deep); color: var(--white); padding: 12px 20px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }
