/* Igreja Cidade de David: the site's look (no framework). */
:root {
    --brand: #f8a925;
    --brand-dark: #d8881c;
    --brand-soft: #fef3e2;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --radius: 1.25rem;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --nav-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--text); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(72rem, 100%); margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(248, 169, 37, .35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }
.btn-ghost { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }

/* Top bar: clear over the video, white once scrolled */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background .25s, box-shadow .25s; }
.nav.is-solid { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav-inner { width: min(72rem, 100%); height: 100%; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1rem; }
.nav-logo img { height: 2.6rem; width: auto; filter: brightness(0) invert(1); transition: filter .25s; }
.nav.is-solid .nav-logo img { filter: none; }
.nav-links { margin-left: auto; display: flex; gap: .25rem; }
.nav-links a { padding: .5rem .85rem; border-radius: 999px; color: #fff; font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
/* Narrow computers: a little less room around each link, so the menu stays on one line */
@media (min-width: 901px) and (max-width: 1100px) { .nav-links a { padding: .5rem .55rem; font-size: .88rem; } }
.nav.is-solid .nav-links a { color: var(--ink); }
.nav-links a:hover { background: rgba(255, 255, 255, .15); }
.nav.is-solid .nav-links a:hover { background: var(--soft); }
.nav-links a.is-active { color: var(--brand); }
/* On the white bar (and the phone's open menu) the link colour above would win: the section on screen keeps its mark */
.nav.is-solid .nav-links a.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem; cursor: pointer; }
.nav.is-solid .nav-toggle { background: var(--soft); color: var(--ink); }
@media (max-width: 900px) {
    .nav-toggle { display: grid; place-items: center; }
    .nav-links { position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; gap: 0; padding: .5rem 1rem 1rem; background: #fff; box-shadow: var(--shadow); transform: translateY(-120%); transition: transform .25s; }
    .nav-links.is-open { transform: none; }
    .nav-links a { color: var(--ink); padding: .85rem 1rem; border-radius: .75rem; }
    .nav-links a:hover { background: var(--soft); }
}

/* Hero: the service video under a dark veil */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; overflow: hidden; color: #fff; text-align: center;
    /* The video's first frame while it loads */
    background: #2a1206 url(../videos/hero-desktop.jpg) center / cover; }
@media (max-width: 760px) and (orientation: portrait) { .hero { background-image: url(../videos/hero-mobile.jpg); } }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* At the top of the page the hero shows the logo and the social links large: the bar's and the floating ones wait */
.nav-logo, .social-float { transition: opacity .25s, visibility .25s; }
body.at-top .nav:not(.is-solid) .nav-logo, body.at-top .social-float { opacity: 0; visibility: hidden; }
.hero-top { position: relative; z-index: 1; padding: calc(var(--nav-h) + clamp(.75rem, 3vh, 2.5rem)) 1.25rem 0; }
.hero-content { position: relative; z-index: 1; align-self: center; padding: 1.5rem 1.25rem; max-width: 52rem; }
/* The year's theme, then the church's logo as the page's title (as on the 2026 banner) */
.hero-theme { display: block; width: clamp(140px, 17vw, 230px); height: auto; margin: 0 auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.hero-title { margin: 0; line-height: 0; }
.hero-title img { display: block; width: clamp(250px, 52vw, 640px); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .35)); }
@media (max-width: 640px) { .hero-title img { width: 78vw; } .hero-theme { width: 42vw; } }
.hero-lead { margin-top: 1.25rem; font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.5rem); opacity: .95; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
/* Contacts and social networks at the foot of the video */
.hero-social { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.75rem; padding: 1rem 1.25rem 3.75rem; }
.hero-social a { display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-size: .9rem; text-decoration: none; opacity: .92; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); transition: opacity .15s, color .15s; }
.hero-social a:hover { opacity: 1; color: #fde68a; }
.hero-social i { font-size: 1.1rem; }
/* Phones: icons only, in one row (the names stay for screen readers) */
@media (max-width: 640px) {
    .hero-social { flex-wrap: nowrap; gap: .75rem; padding-bottom: 3.9rem; }
    .hero-social a { justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(4px); }
    .hero-social a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .hero-social i { font-size: 1.15rem; }
}
.hero-times { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2rem; }
.hero-times span { padding: .55rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(6px); font-size: .9rem; }
.hero-times i { color: var(--brand); margin-right: .25rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.hero-down { position: absolute; z-index: 1; bottom: 1.5rem; left: 50%; translate: -50% 0; color: #fff; font-size: 1.2rem; opacity: .8; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* Live now: a dark glass pill under the hero's buttons while the YouTube channel is live, in the site's colours: the
   brand's orange for the live dot and the "Assistir" button */
.live-bar { display: inline-flex; align-items: center; max-width: 100%; margin-top: 1.5rem; text-align: left; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(15, 23, 42, .82); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); color: #fff; box-shadow: 0 14px 36px rgba(15, 23, 42, .3); animation: live-in .4s cubic-bezier(.2, .8, .2, 1); }
.live-bar[hidden] { display: none; }
.live-link { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .45rem .45rem .45rem .55rem; color: inherit; text-decoration: none; }
.live-badge { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(248, 169, 37, .16); color: var(--brand); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.live-badge i { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: var(--brand); }
.live-badge i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--brand); animation: live-ping 1.6s ease-out infinite; }
.live-title { min-width: 0; overflow: hidden; font-size: .92rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.live-go { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem 1rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 800; box-shadow: 0 6px 16px rgba(248, 169, 37, .35); transition: background .15s; }
.live-link:hover .live-go { background: var(--brand-dark); }
.live-go i { transition: transform .15s; }
.live-link:hover .live-go i { transform: translateX(3px); }
.live-x { flex: none; width: 2.25rem; height: 2.25rem; margin-right: .3rem; border: 0; border-radius: 50%; background: none; color: #cbd5e1; font-size: .9rem; cursor: pointer; }
.live-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@keyframes live-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes live-in { from { opacity: 0; transform: translateY(-.5rem); } }
@media (max-width: 640px) {
    .live-bar { width: 100%; }
    .live-link { flex: 1; gap: .55rem; }
    .live-title { flex: 1; font-size: .85rem; }
    .live-go { padding: .4rem .75rem; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .live-bar, .live-badge i::after { animation: none; } }

/* Social links on the side (at the bottom on phones) */
.social-float { position: fixed; z-index: 40; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.social-float a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: var(--shadow); text-decoration: none; transition: transform .15s; }
.social-float a:hover { transform: scale(1.08); }
.social-float a.is-whatsapp { background: #25d366; color: #fff; }
.social-float a.is-podcast { background: #1db954; color: #fff; }
@media (max-width: 640px) { .social-float a:not(.is-whatsapp) { display: none; } .social-float a.is-whatsapp { width: 56px; height: 56px; font-size: 1.5rem; } }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-soft { background: var(--soft); }
.section-dark { background: radial-gradient(ellipse at top, #1e293b, var(--ink)); color: #cbd5e1; }
.heading { max-width: 42rem; margin: 0 auto 3rem; text-align: center; }
.heading img { width: 2.4rem; height: 2.4rem; object-fit: contain; margin: 0 auto 1rem; }
.heading h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
.heading h2 em { font-style: normal; color: var(--brand); }
.heading p { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }
.heading-light h2 { color: #fff; }
.heading-light p { color: #94a3b8; }

/* About: the four pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.pillar { padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.pillar-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: 1rem; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.3rem; }
.pillar h3 { font-size: 1.15rem; font-weight: 800; }
.pillar p { margin-top: .6rem; font-size: .95rem; color: var(--muted); }

/* Verses */
.verses { position: relative; padding: clamp(4rem, 9vw, 6.5rem) 0; color: #fff; text-align: center; overflow: hidden; }
.verses-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(120, 53, 15, .78)), url('../images/bg-biblia.jpg') center / cover; }
.verses-inner { position: relative; }
.verses-mark { font-size: 2rem; color: var(--brand); opacity: .9; }
.verses-track { position: relative; display: grid; min-height: 9rem; margin-top: 1rem; }
.verse { grid-area: 1 / 1; display: grid; place-items: center; margin: 0; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s; pointer-events: none; }
.verse.is-active { opacity: 1; transform: none; pointer-events: auto; }
.verse p { max-width: 46rem; font-family: 'Playfair Display', serif; font-size: clamp(1.25rem, 3vw, 1.9rem); line-height: 1.45; }
.verses-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.verses-arrow { width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: transparent; color: #fff; cursor: pointer; }
.verses-arrow:hover { background: rgba(255, 255, 255, .12); }
.verses-dots { display: flex; gap: .4rem; }
.verses-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .4); cursor: pointer; transition: width .25s, background .25s; }
.verses-dots button.is-active { width: 26px; background: var(--brand); }

/* Ministries */
.ministries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1.25rem; }
.ministry { position: relative; display: flex; flex-direction: column; padding: 1.75rem; border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.ministry:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ministry-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 1rem; background: linear-gradient(135deg, var(--brand), #fbbf24); color: #fff; font-size: 1.25rem; box-shadow: 0 8px 18px rgba(248, 169, 37, .3); }
.ministry-tag { margin-top: 1.1rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); }
.ministry h3 { margin-top: .25rem; font-size: 1.2rem; font-weight: 800; }
.ministry p { margin-top: .6rem; flex: 1; font-size: .93rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ministry-more { align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.1rem; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-weight: 800; cursor: pointer; }
.ministry-more i { transition: transform .15s; }
.ministry-more:hover i { transform: translateX(4px); }
.ministry-more::after { content: ''; position: absolute; inset: 0; }

/* Schedule */
.schedule-group { max-width: 48rem; margin: 2.2rem auto .8rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.schedule-group:first-of-type { margin-top: 0; }
.schedule { list-style: none; margin: 0 auto; padding: 0; max-width: 48rem; display: grid; gap: .75rem; }
.schedule li { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: 1rem; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.schedule li i { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: .8rem; background: rgba(248, 169, 37, .15); color: var(--brand); }
.schedule-body { flex: 1; min-width: 0; }
.schedule-day { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.schedule li strong { display: block; margin-top: .15rem; color: #fff; font-size: 1.05rem; }
.schedule-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.schedule-time { flex: none; font-size: 1.05rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.class-join[hidden] { display: none; }
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.class-join { flex: none; min-height: 34px; margin-top: .25rem; padding: .3rem .9rem; font-size: .85rem; box-shadow: none; }
.schedule li .class-join i { width: auto; height: auto; background: none; color: inherit; border-radius: 0; }
.class-choices { display: grid; gap: .6rem; }
.class-choice { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.class-choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.class-choice i { flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: .75rem; background: var(--brand-soft); color: var(--brand-dark); }
.class-choice strong { display: block; font-size: 1rem; }
.class-choice small { display: block; color: var(--muted); font-size: .82rem; }
.schedule li.is-main { background: rgba(248, 169, 37, .12); border-color: rgba(248, 169, 37, .45); }
@media (max-width: 560px) {
    .schedule li { gap: .85rem; padding: 1rem; }
    .schedule li > i { width: 2.2rem; height: 2.2rem; border-radius: .7rem; font-size: .9rem; }
    .schedule-day { font-size: .7rem; }
    .schedule-time { font-size: .95rem; }
    .schedule li strong { font-size: 1rem; }
}
@media (max-width: 400px) {
    .schedule li > i { display: none; }
}

/* Pastors */
/* Several pastors: a card each (one alone keeps the large card) */
.pastors.is-many { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 17rem)); justify-content: center; gap: 1.25rem; }
.pastors.is-many .pastor { grid-template-columns: 1fr; align-items: start; align-content: start; gap: 1rem; padding: 1rem; text-align: center; max-width: none; margin: 0; }
.pastors.is-many .pastor img, .pastors.is-many .pastor-photo { max-width: none; }
.pastors.is-many .pastor-text h3 { font-size: 1.3rem; margin-bottom: .9rem; }
.pastor-photo { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); background: linear-gradient(135deg, #fbbf24, var(--brand) 55%, #b45309); color: #fff; font-size: 3rem; font-weight: 800; }
.dlg-text ul.bio-list li strong { color: var(--ink); }
.pastor { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); align-items: center; gap: 2rem; max-width: 46rem; margin: 0 auto; padding: 1.25rem; border-radius: calc(var(--radius) + .5rem); background: var(--soft); border: 1px solid var(--line); }
.pastor img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius); } /* the face is usually near the top */
.pastor-text span { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); }
.pastor-text h3 { margin: .35rem 0 1.25rem; font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; }
@media (max-width: 640px) { .pastor { grid-template-columns: 1fr; text-align: center; } .pastor img { max-width: 18rem; margin: 0 auto; } }

/* Where we are */
/* Where we are: the map fills the block and the address card floats over it (frosted glass); on phones the card goes
   under the map */
.contact { position: relative; display: grid; align-items: center; min-height: 32rem; border-radius: calc(var(--radius) + .5rem); overflow: hidden; background: var(--line); box-shadow: var(--shadow); isolation: isolate; }
.contact-map { position: absolute; inset: 0; }
/* Google's own place box (top left of the map, the address again) is pushed out above the block: the map is taller
   than the block and moved up. Google's logo and terms, at the bottom, stay in sight. */
.contact-map iframe { position: absolute; top: -150px; left: 0; display: block; width: 100%; height: calc(100% + 150px); border: 0; filter: saturate(.85); }
.contact-card { position: relative; z-index: 1; width: min(25rem, calc(100% - 3rem)); margin: 1.5rem; padding: 1.75rem; border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--radius); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 24px 60px rgba(15, 23, 42, .2); }
.contact-pin { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; background: linear-gradient(135deg, var(--brand), #fbbf24); color: #fff; font-size: 1.2rem; box-shadow: 0 8px 18px rgba(248, 169, 37, .35); }
.contact-tag { display: block; margin-top: 1.1rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-dark); }
.contact-address { margin-top: .35rem; font-style: normal; font-size: 1.35rem; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.contact-actions .btn { flex: 1 1 auto; }
.contact-social { display: flex; align-items: center; gap: .5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.contact-social span { margin-right: auto; font-size: .85rem; font-weight: 700; color: var(--muted); }
.contact-social a { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.contact-social a:hover { border-color: var(--brand); background: var(--brand); color: #fff; transform: translateY(-2px); }
@media (max-width: 760px) {
    .contact { min-height: 0; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
    .contact-map { position: relative; height: 18rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
    .contact-map iframe { top: -150px; height: calc(100% + 150px); }
    /* Under the map, not over it: the map's bottom row (Google's logo, terms and buttons) stays in sight */
    .contact-card { width: auto; margin: .75rem 0 0; padding: 1.4rem; background: #fff; }
}

/* Footer */
.footer { padding: 2.5rem 0; background: var(--ink); color: #94a3b8; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner img { height: 2.4rem; width: auto; }
.footer-social { display: flex; gap: .5rem; }
.footer-social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.footer-social a:hover { background: var(--brand); }
@media (max-width: 640px) { .footer-inner { flex-direction: column; text-align: center; } }

/* The ministries' pages and the biography: a window over the site (a sheet from the bottom on phones), with its
   header, an index of its sections (beside on large screens, as chips on top on phones) and the sections in turn */
.dlg { width: min(64rem, calc(100% - 2rem)); height: min(88vh, 54rem); max-height: none; padding: 0; border: 0; border-radius: 1.75rem; box-shadow: 0 40px 100px rgba(0, 0, 0, .4); color: var(--text); overflow: hidden; }
.dlg::backdrop { background: rgba(15, 23, 42, .65); backdrop-filter: blur(6px); }
.dlg[open] { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.dlg-box { display: flex; flex-direction: column; height: 100%; }

.dlg-head { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.5rem 1.75rem; color: #fff; background: radial-gradient(ellipse at top left, #fbbf24, var(--brand) 35%, #b45309); overflow: hidden; }
.dlg-head::after { content: ''; position: absolute; right: -4rem; top: -4rem; width: 14rem; height: 14rem; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.dlg-icon { position: relative; z-index: 1; flex: none; width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 1.1rem; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); font-size: 1.45rem; }
.dlg-titles { position: relative; z-index: 1; flex: 1; min-width: 0; }
.dlg-titles span { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.dlg-titles h3 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 800; letter-spacing: -.01em; }
.dlg-x { position: relative; z-index: 1; flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 1.05rem; cursor: pointer; transition: background .15s; }
.dlg-x:hover { background: rgba(255, 255, 255, .32); }

.dlg-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.dlg-main:has(.dlg-toc:not(:empty)) { grid-template-columns: 15.5rem minmax(0, 1fr); }
.dlg-toc { overflow-y: auto; padding: 1.25rem .75rem; border-right: 1px solid var(--line); background: var(--soft); display: flex; flex-direction: column; gap: .2rem; }
.dlg-toc:empty { display: none; }
.dlg-toc a { position: relative; padding: .6rem .85rem; border-radius: .75rem; color: var(--muted); font-size: .86rem; font-weight: 600; line-height: 1.35; text-decoration: none; transition: background .15s, color .15s; }
.dlg-toc a:hover { background: #fff; color: var(--ink); }
.dlg-toc a.is-current { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.dlg-toc a.is-current::before { content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 3px; background: var(--brand); }

.dlg-body { min-height: 0; overflow-y: auto; padding: 1.75rem clamp(1.25rem, 3vw, 2.5rem) 2.5rem; scroll-behavior: smooth; }
.dlg-intro { max-width: 58rem; margin-bottom: 1.25rem; }
.dlg-intro h4 { margin: .75rem 0 .35rem; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.dlg-intro p { font-size: 1.05rem; line-height: 1.7; color: var(--text); text-align: left; }
.dlg-intro hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.dlg-part { max-width: 58rem; padding: 1.5rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.dlg-part:first-of-type { border-top: 0; padding-top: .25rem; }
.dlg-part h4 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .9rem; font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.dlg-part h4::before { content: ''; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); transform: translateY(-.15rem); }
.dlg-text { font-size: 1rem; line-height: 1.7; }
.dlg-text p { margin: 0 0 .85rem; }
.dlg-text p:last-child { margin-bottom: 0; }
.dlg-text ul, .dlg-text ol { margin: .25rem 0 .9rem; padding: 0; list-style: none; display: grid; gap: .55rem; }
.dlg-text > ul > li, .dlg-text > ol > li { position: relative; padding: .7rem .9rem .7rem 2.4rem; border-radius: .9rem; background: var(--soft); }
.dlg-text > ul > li::before, .dlg-text > ol > li::before { content: '\f00c'; position: absolute; left: .85rem; top: .85rem; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: .75rem; color: var(--brand-dark); }
.dlg-text li ul { margin: .5rem 0 0; gap: .3rem; }
.dlg-text li li { position: relative; padding-left: 1rem; }
.dlg-text li li::before { content: ''; position: absolute; left: 0; top: .7em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--brand); }
.dlg-text strong { color: var(--ink); }
.dlg-text a { color: var(--brand-dark); font-weight: 600; }
.dlg-text hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
/* A table in a text from the system (it scrolls sideways when it does not fit, on phones) */
.dlg-table { overflow-x: auto; margin: .5rem 0 1rem; }
.dlg-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dlg-table th { padding: .6rem .75rem; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; }
.dlg-table td { padding: .6rem .75rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.dlg-table tr:last-child td { border-bottom: 0; }

.dlg-foot { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; border-top: 1px solid var(--line); background: #fff; }
.dlg-step { display: inline-flex; align-items: center; gap: .5rem; max-width: 40%; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.dlg-step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-step:hover { border-color: var(--brand); color: var(--brand-dark); }
.dlg-step.is-next { margin-left: auto; }
.dlg-close { margin-left: auto; }
.dlg-step.is-next + .dlg-close { margin-left: 0; }

@media (max-width: 760px) {
    .dlg { width: 100%; max-width: 100%; height: 94vh; margin: auto 0 0; border-radius: 1.5rem 1.5rem 0 0; }
    .dlg-head { padding: 1.1rem 1.1rem 1rem; }
    .dlg-icon { width: 3rem; height: 3rem; font-size: 1.2rem; }
    /* The index goes on top (a row of chips); this must outweigh the computer's index column (:has() above) */
    .dlg-main, .dlg-main:has(.dlg-toc:not(:empty)) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .dlg-toc { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: .6rem .75rem; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
    .dlg-toc::-webkit-scrollbar { display: none; }
    .dlg-toc a { flex: none; max-width: 15rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .dlg-toc a.is-current { border-color: var(--brand); background: var(--brand-soft); box-shadow: none; }
    .dlg-toc a.is-current::before { display: none; }
    .dlg-body { padding: 1.25rem 1.1rem 2rem; }
    .dlg-foot { padding: .7rem 1rem max(.7rem, env(safe-area-inset-bottom)); }
    .dlg-step { padding: 0 .85rem; }
    .dlg-step span { display: none; }
    .dlg-close { flex: 1; }
}
body.has-dialog { overflow: hidden; }

/* Appearing as the page scrolls */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-down { animation: none; }
}

/* Announcements of the members (from the church's system) */
.board-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: -1rem 0 2rem; }
.board-filters button { min-height: 40px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.board-filters button.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
/* An endless row that moves by itself (and by hand); with few announcements it stands still, centered. */
.board { display: flex; align-items: flex-start; gap: 1.25rem; padding: .5rem 0 1rem; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.board::-webkit-scrollbar { display: none; }
.board.is-static { flex-wrap: wrap; justify-content: center; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.board-loading, .board-empty { flex: 1; padding: 2.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }
.board-empty i { display: block; margin-bottom: .6rem; font-size: 1.8rem; color: #cbd5e1; }
.post { flex: 0 0 min(19rem, 82vw); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s, box-shadow .2s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--brand-soft), #fff7ed); display: grid; place-items: center; color: var(--brand-dark); font-size: 2.2rem; }
.post-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-type { position: absolute; top: .75rem; left: .75rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--brand-dark); font-size: .75rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.post-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.25rem 1.35rem; }
.post-body h3 { font-size: 1.12rem; font-weight: 800; }
.post-text { margin-top: .5rem; font-size: .93rem; color: var(--muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post.is-open .post-text { -webkit-line-clamp: unset; display: block; }
.post-more { align-self: flex-start; margin-top: .35rem; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.post-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.post-actions a { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .95rem; border-radius: 999px; font-size: .88rem; font-weight: 700; text-decoration: none; }
.post-actions .is-whatsapp { background: #25d366; color: #fff; }
.post-actions .is-link { border: 1px solid var(--line); color: var(--ink); }
.board-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 2.5rem; padding: 1.75rem 2rem; border-radius: calc(var(--radius) + .25rem); background: radial-gradient(ellipse at top left, #fbbf24, var(--brand) 40%, #b45309); color: #fff; }
.board-cta h3 { color: #fff; font-size: 1.3rem; font-weight: 800; }
.board-cta p { margin-top: .35rem; max-width: 40rem; opacity: .92; }
.board-cta .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: none; }
.board-cta .btn-primary:hover { background: #fff7ed; }

/* Announcements: the category's fields as tags, and the members' comments */
.post-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.post-tags span { padding: .2rem .6rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; font-weight: 700; }
.post-talk { display: grid; gap: .55rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.post-talk:empty { display: none; }
.post-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.post-stars { display: inline-flex; align-items: center; gap: .15rem; color: #f59e0b; font-size: .85rem; }
.post-stars b { margin-left: .3rem; color: var(--ink); }
.post-stars small { color: var(--muted); }
.post-stars.is-empty { color: var(--muted); font-size: .82rem; }
.post-rate, .post-comment { display: inline-flex; align-items: center; gap: .4rem; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.post-comment { justify-self: start; color: var(--muted); font-weight: 700; }
.post-rate:hover, .post-comment:hover { text-decoration: underline; }
.post-photos { display: flex; gap: .45rem; margin-top: .75rem; }
.post-photos button { width: 4.6rem; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: #f8fafc; cursor: zoom-in; }
.post-photos img { width: 100%; height: 100%; object-fit: cover; }
.cmt-stars { display: flex; justify-content: center; gap: .35rem; }
.cmt-stars[hidden], .cmt-field[hidden], .cmt-note[hidden] { display: none; }
.cmt-stars button { width: 3rem; height: 3rem; border: 0; border-radius: 999px; background: #fff7ed; color: #f59e0b; font-size: 1.5rem; cursor: pointer; }
.cmt-stars button.is-on { background: #fef3c7; }
.photo { width: min(60rem, calc(100% - 2rem)); padding: 0; border: 0; border-radius: 1rem; background: #0f172a; overflow: hidden; }
.photo::backdrop { background: rgba(15, 23, 42, .85); }
.photo img { display: block; width: 100%; max-height: 80vh; object-fit: contain; }
.photo-x, .photo-arrow { position: absolute; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--ink); cursor: pointer; }
.photo-x { top: .75rem; right: .75rem; }
.photo-arrow { top: 50%; transform: translateY(-50%); }
.photo-arrow.is-prev { left: .75rem; }
.photo-arrow.is-next { right: .75rem; }
.photo-arrow[hidden] { display: none; }
.photo-count { position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); padding: .2rem .7rem; border-radius: 999px; background: rgba(15, 23, 42, .7); color: #fff; font-size: .8rem; }
.photo-count:empty { display: none; }
.cmt { width: min(30rem, calc(100% - 2rem)); padding: 0; border: 0; border-radius: calc(var(--radius) + .25rem); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.cmt::backdrop { background: rgba(15, 23, 42, .55); }
.cmt-box { display: grid; gap: .9rem; padding: 1.4rem; }
.cmt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cmt-head h3 { font-size: 1.2rem; font-weight: 800; }
.cmt-about { margin-top: .2rem; font-size: .88rem; color: var(--muted); }
.cmt-x { flex: none; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 999px; background: #f3f4f6; color: var(--ink); cursor: pointer; }
.cmt-field { display: grid; gap: .35rem; font-size: .88rem; font-weight: 700; }
.cmt-field input, .cmt-field textarea, .cmt-field select { width: 100%; box-sizing: border-box; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: .75rem; font: inherit; font-size: 16px; font-weight: 400; resize: vertical; }
.cmt-field input:focus, .cmt-field textarea:focus, .cmt-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cmt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cmt-note { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.cmt-msg:empty { display: none; }
.cmt-msg { padding: .6rem .8rem; border-radius: .6rem; font-size: .88rem; font-weight: 700; }
.cmt-msg.is-ok { background: #dcfce7; color: #166534; }
.cmt-msg.is-error { background: #fee2e2; color: #991b1b; }
.cmt-actions { display: flex; justify-content: flex-end; gap: .5rem; }
@media (max-width: 640px) {
    .cmt { width: 100%; max-width: none; margin: auto 0 0; border-radius: 1.25rem 1.25rem 0 0; }
    .cmt-actions .btn { flex: 1; }
}

/* The church system's forms inside the site, and the way to become a member */
.board-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.board-cta .btn-light { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .6); box-shadow: none; }
.board-cta .btn-light:hover { background: rgba(255, 255, 255, .28); }
.cmt-join { font-size: .85rem; color: var(--muted); }
.cmt-join.is-on { padding: .6rem .8rem; border-radius: .6rem; background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.cmt-join button { padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* The site's forms to announce and to become a member */
.form-dlg { width: min(40rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); }
.form-dlg[open] .cmt-box { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); overflow: hidden; }
.form-dlg .cmt-box > * { flex: none; min-width: 0; }
.form-dlg .form-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; overflow-y: auto; padding: .2rem .2rem .4rem; margin: 0 -.2rem; }
.cmt-field .lbl { display: block; }
.form-dlg .form-body[hidden], .form-dlg [hidden] { display: none !important; }
.form-dlg .cmt-about { line-height: 1.45; }
.cmt-field em { font-style: normal; font-weight: 500; color: var(--muted); }
.cmt-field small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.cmt-field input, .cmt-field select { line-height: 1.3; }
.cmt-field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right .9rem center; padding-right: 2.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; }
.form-row.is-wide { grid-template-columns: 2fr 1fr; }
.cat-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; }
.cat-fields:empty { display: none; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.cat-grid label { position: relative; }
.cat-grid input { position: absolute; opacity: 0; pointer-events: none; }
.cat-grid span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 4.6rem; padding: .6rem .4rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.cat-grid i { font-size: 1.15rem; color: #94a3b8; }
.cat-grid input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.cat-grid input:checked + span i { color: var(--brand); }
.cat-grid input:focus-visible + span { outline: 2px solid var(--brand); }
.nif-state { margin-top: -.4rem; font-size: .85rem; font-weight: 600; }
.nif-state.is-ok { color: #15803d; }
.nif-state.is-off { padding: .55rem .75rem; border-radius: .6rem; background: var(--brand-soft); color: var(--ink); }
.nif-state button { padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.form-part { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fcfcfd; }
.form-part h4 { display: flex; align-items: center; gap: .5rem; font-size: .92rem; font-weight: 800; color: var(--ink); }
.form-part h4 > span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; }
.form-part h4 em { font-style: normal; font-weight: 500; color: var(--muted); }
.form-hint { font-size: .82rem; color: var(--muted); }
.cmt-field .lbl { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .35rem; }
.cmt-field .lbl .count { margin-left: auto; font-size: .75rem; font-weight: 600; }
.photo-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 8.5rem)); gap: .6rem; }
.photo-slot { position: relative; aspect-ratio: 1; border-radius: .8rem; overflow: hidden; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot button[data-unpick] { position: absolute; top: .35rem; right: .35rem; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 999px; background: rgba(15, 23, 42, .75); color: #fff; font-size: .75rem; cursor: pointer; }
.photo-slot.is-add { display: grid; place-content: center; justify-items: center; gap: .35rem; border: 2px dashed var(--brand); background: var(--brand-soft); color: var(--brand-dark); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.photo-slot.is-add i { font-size: 1.3rem; }
.photo-slot.is-empty { border: 2px dashed var(--line); }
.file-pick { position: relative; padding: .9rem 1rem; border: 2px dashed var(--brand); border-radius: .8rem; background: var(--brand-soft); color: var(--brand-dark); cursor: pointer; }
.file-pick .lbl { justify-content: flex-start; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field-error { margin: 0; font-size: .8rem; font-weight: 700; color: #b91c1c; }
.has-error input, .has-error textarea, .has-error select, .has-error .cat-grid span, .has-error .seg span { border-color: #f87171 !important; }
.steps { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { flex: 1; display: flex; align-items: center; gap: .45rem; padding-top: .55rem; border-top: 3px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--muted); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; background: #f1f5f9; font-size: .72rem; }
.steps li.is-on { border-color: var(--brand); color: var(--ink); }
.steps li.is-on::before { background: var(--brand); color: #fff; }
.seg { display: flex; gap: .5rem; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .7rem; border: 1px solid var(--line); border-radius: .75rem; text-align: center; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.form-dlg .step { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.review { display: grid; margin: 0; }
.review div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.review dt { font-size: .82rem; font-weight: 700; color: var(--muted); }
.review dd { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.form-done { display: grid; justify-items: center; gap: .6rem; padding: 1rem 0 .25rem; text-align: center; }
.form-done .done-icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 999px; background: #dcfce7; color: #16a34a; font-size: 1.6rem; }
.form-done h3 { font-size: 1.25rem; font-weight: 800; }
.form-done p { max-width: 28rem; color: var(--muted); line-height: 1.5; }
.form-done .done-note:empty { display: none; }
.form-done .done-note { font-style: italic; }
.form-done .cmt-actions { justify-content: center; margin-top: .5rem; }
/* The prayer form opened by its link: once sent, only the thanks, then the site opens (5 s, see site.js) */
.done-leaving { display: none; }
.form-dlg.is-sent .cmt-head, .form-dlg.is-sent .form-done .cmt-actions { display: none; }
.form-dlg.is-sent .form-done { flex: 1 1 auto; align-content: center; }
.form-dlg.is-sent .done-leaving { display: grid; gap: .5rem; justify-items: center; margin-top: 1rem; font-size: .85rem; }
.done-leaving span { width: 8rem; height: 3px; border-radius: 3px; background: var(--brand); transform-origin: left; animation: leaving 5s linear forwards; }
@keyframes leaving { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 640px) {
    .form-dlg { width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
    .form-dlg[open] .cmt-box { height: 100%; max-height: none; padding: 1.1rem 1rem max(1rem, env(safe-area-inset-bottom)); }
    .form-row, .form-row.is-wide, .cat-fields { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-dlg.is-direct .direct-brand { display: flex; justify-content: center; margin: -1.1rem -1rem 1rem; padding: 1.1rem 1rem; background: radial-gradient(ellipse at top, #1e293b, var(--ink)); }
    .form-dlg.is-direct .direct-brand img { width: min(13rem, 60vw); height: auto; }
    .form-dlg.is-direct .cmt-x, .form-dlg.is-direct form > .cmt-actions [data-cmt-close] { display: none; }
}
.direct-brand { display: none; }

/* The prayer request: topics that start a line of the request, and "remember me" */
.topics { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .2rem; }
.topics button { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.topics button i { color: var(--brand); }
.topics button.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.remember { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); cursor: pointer; }
.remember input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }

/* The forms keep their natural height: a short form does not stretch its rows (nor its fields) to fill the window */
.cmt-box, .cmt-field, .form-dlg .form-body, .form-dlg .step, .form-part, .form-row, .cat-fields { align-content: start; }
.cmt-field > input, .cmt-field > select { height: auto; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* Gallery: album chips, a grid of photos and the photo viewer */
.gal-stories { display: flex; gap: 1.1rem; justify-content: center; margin: -1rem auto 2.25rem; padding: .25rem; }
.gal-story { flex: none; display: grid; justify-items: center; gap: .45rem; width: 5.5rem; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.gal-story i { display: block; padding: 3px; border-radius: 50%; background: conic-gradient(from 210deg, #f8a925, #ef4444, #d946ef, #f8a925); transition: transform .15s; }
.gal-story.is-seen i { background: var(--line); }
.gal-story img { display: block; width: 4.6rem; height: 4.6rem; border: 3px solid #fff; border-radius: 50%; object-fit: cover; }
.gal-story:hover i { transform: scale(1.05); }
.gal-story span { max-width: 100%; overflow: hidden; font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.gal-item { position: relative; overflow: hidden; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 1rem; background: var(--soft); cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item span { position: absolute; inset: auto 0 0; padding: 2rem .9rem .7rem; background: linear-gradient(transparent, rgba(15, 23, 42, .75)); color: #fff; font-size: .82rem; font-weight: 600; text-align: left; opacity: 0; transition: opacity .2s; }
.gal-item:hover span, .gal-item:focus-visible span { opacity: 1; }
.gal-more { display: flex; justify-content: center; margin-top: 1.75rem; }
.gal-more [hidden] { display: none; }
@media (max-width: 760px) {
    .gal-stories { justify-content: flex-start; gap: .8rem; overflow-x: auto; margin: -1.5rem -1.25rem 1.5rem; padding: .25rem 1.25rem; scrollbar-width: none; }
    .gal-story { width: 4.7rem; }
    .gal-story img { width: 4.1rem; height: 4.1rem; }
    .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .gal-item { border-radius: .8rem; }
}

.gal-view { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 24, .96); color: #fff; }
.gal-view::backdrop { background: rgba(8, 12, 24, .96); }
.gal-view[open] { display: grid; grid-template-rows: auto 1fr; }
.gal-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.gal-count { font-size: .9rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.gal-x { width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; cursor: pointer; }
.gal-stage { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: .8rem; min-height: 0; margin: 0; padding: 0 4.5rem 1.5rem; touch-action: pan-y; }
.gal-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: .5rem; user-select: none; }
.gal-stage figcaption { font-size: .95rem; color: #cbd5e1; text-align: center; }
.gal-stage figcaption small { display: block; margin-top: .2rem; color: #94a3b8; }
.gal-nav { position: absolute; top: 50%; width: 3rem; height: 3rem; margin-top: -1.5rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; cursor: pointer; transition: background .15s; }
.gal-nav:hover, .gal-x:hover { background: rgba(255, 255, 255, .2); }
.gal-prev { left: 1rem; }
.gal-next { right: 1rem; }
@media (max-width: 760px) {
    .gal-stage { padding: 0 0 1.25rem; }
    .gal-stage img { border-radius: 0; }
    .gal-nav { top: auto; bottom: 1rem; margin: 0; width: 2.75rem; height: 2.75rem; }
    .gal-stage figcaption { padding: 0 4rem; }
}

/* Stories: an event's photos one after the other (5 s each, bars on top); tap the right or left side to go on or back,
   hold to pause. Full screen on phones, a portrait frame on computers. */
.story { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #000; }
.story::backdrop { background: rgba(0, 0, 0, .92); }
.story[open] { display: grid; place-items: center; }
.story-frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff; user-select: none; -webkit-user-select: none; }
.story-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.55); transform: scale(1.15); }
.story-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.story-bars { position: absolute; inset: .6rem .6rem auto; z-index: 2; display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.story-bars b { display: block; height: 100%; width: 0; background: #fff; }
.story-bars .is-done b { width: 100%; }
.story-head { position: absolute; inset: 1.3rem .75rem auto; z-index: 3; display: flex; align-items: center; gap: .6rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.story-head > div { flex: 1; min-width: 0; line-height: 1.2; }
.story-head strong { display: block; font-size: .92rem; }
.story-head small { font-size: .78rem; opacity: .8; }
.story-avatar { width: 2.2rem; height: 2.2rem; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.story-x { width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.story-caption { position: absolute; inset: auto 0 0; z-index: 2; margin: 0; padding: 3rem 1.25rem max(1.5rem, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-size: .95rem; text-align: center; }
.story-tap { position: absolute; top: 4.5rem; bottom: 5rem; z-index: 1; width: 35%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.story-back { left: 0; }
.story-fwd { right: 0; width: 65%; }
@media (min-width: 761px) {
    .story { background: transparent; }
    .story-frame { width: auto; height: min(92vh, 52rem); aspect-ratio: 9 / 16; border-radius: 1rem; }
}
