/* ==========================================================================
   Grace and Life Church — stylesheet
   Colors, type and spacing live in :root below. Change them there and the
   whole site follows.
   ========================================================================== */

/* Fonts: Alegreya and Alegreya Sans by Huerta Tipográfica (SIL Open Font
   License). Self-hosted in /fonts so no third-party font requests are made. */
@font-face {
    font-family: 'Alegreya';
    src: url('fonts/alegreya-latin-wght-normal.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Alegreya';
    src: url('fonts/alegreya-latin-wght-italic.woff2') format('woff2');
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Alegreya Sans';
    src: url('fonts/alegreya-sans-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Alegreya Sans';
    src: url('fonts/alegreya-sans-latin-400-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Alegreya Sans';
    src: url('fonts/alegreya-sans-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Alegreya Sans';
    src: url('fonts/alegreya-sans-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette */
    --noche: #1e2547;          /* deep indigo: text, dark panels, footer */
    --noche-soft: #2c3563;     /* hover on dark buttons */
    --papel: #ffffff;          /* page background */
    --cielo: #eef1f8;          /* soft alternate sections */
    --mandarina: #f0884a;      /* the G&L Ministries orange: buttons, accents */
    --mandarina-hover: #f39a62;
    --mandarina-ink: #a8481a;  /* orange that is dark enough for text on white */
    --gris: #424966;           /* secondary text */
    --linea: #d6dbe8;          /* hairlines and borders */
    --on-dark: #dfe3f2;        /* body text on --noche */

    /* Type */
    --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
    --sans: 'Alegreya Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Layout */
    --wrap: 1240px;
    --gutter: clamp(20px, 5vw, 64px);
    --section: clamp(64px, 9vw, 120px);
    --radius-photo: 6px;
    --radius-panel: 14px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--papel);
    color: var(--noche);
    font-family: var(--sans);
    font-size: 1.125rem;          /* 18px */
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
    font-family: var(--serif);
    color: var(--noche);
    margin: 0;
    text-wrap: balance;
}
h1 { font-weight: 800; line-height: .98; letter-spacing: -.02em; }
h2 { font-weight: 700; line-height: 1.04; letter-spacing: -.015em; font-size: clamp(2.25rem, 4.2vw, 3.5rem); }
h3 { font-weight: 700; line-height: 1.2; font-size: 1.5rem; }

p { margin: 0 0 1em; color: var(--gris); max-width: 62ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(1.18rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--gris); max-width: 48ch; }
.small { font-size: .95rem; }

:focus-visible { outline: 3px solid var(--noche); outline-offset: 4px; border-radius: 2px; }
.on-dark :focus-visible, .footer :focus-visible, .topline :focus-visible, .give-panel :focus-visible, .sunday-strip :focus-visible { outline-color: var(--mandarina); }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: var(--section); }
.tint { background: var(--cielo); }

.skip {
    position: fixed; left: 16px; top: -100px; z-index: 100;
    background: var(--papel); color: var(--noche);
    padding: 12px 18px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- Buttons and links ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 52px; padding: 12px 28px;
    border: 2px solid transparent; border-radius: 999px;
    font-family: var(--sans); font-size: 1.05rem; font-weight: 700; line-height: 1.2;
    text-decoration: none; text-align: center; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--mandarina); color: var(--noche); }
.btn-primary:hover { background: var(--mandarina-hover); }
.btn-dark { background: var(--noche); color: #fff; }
.btn-dark:hover { background: var(--noche-soft); }
.btn-outline { border-color: var(--noche); color: var(--noche); background: transparent; }
.btn-outline:hover { background: var(--noche); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 32px; }

.textlink {
    font-weight: 700;
    color: var(--noche);
    text-decoration: underline;
    text-decoration-color: var(--mandarina);
    text-decoration-thickness: 2px;
    text-underline-offset: .28em;
    transition: color .15s ease;
}
.textlink:hover { color: var(--mandarina-ink); }

/* ---------- Top line and language switch ---------- */
.topline { background: var(--noche); color: var(--on-dark); font-size: .95rem; }
.topline-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; }
.announcement { margin: 0; color: var(--on-dark); max-width: none; display: flex; flex-wrap: wrap; column-gap: 18px; }
.announcement-lang { color: #aab2d4; }

.language-switch {
    display: inline-flex; padding: 3px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); white-space: nowrap;
}
.language-switch a {
    padding: 4px 14px; border-radius: 999px;
    color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.language-switch a:hover { color: #fff; }
.language-switch a[aria-current] { background: var(--mandarina); color: var(--noche); font-weight: 700; }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--linea);
}
@supports (backdrop-filter: blur(8px)) {
    .header { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }
}
.navrow { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 84px; }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 236px; height: auto; }

.navlinks { display: flex; align-items: center; gap: 6px; }
.navlinks a:not(.btn) {
    padding: 8px 12px; border-radius: 6px;
    text-decoration: none; font-weight: 500; font-size: 1.05rem; color: var(--noche);
}
.navlinks a:not(.btn):hover { background: var(--cielo); }
.navlinks a[aria-current]:not(.btn) {
    text-decoration: underline; text-decoration-color: var(--mandarina);
    text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.navlinks .btn { margin-left: 12px; min-height: 46px; padding: 10px 22px; }

.menu {
    display: none;
    min-height: 44px; padding: 8px 18px;
    border: 2px solid var(--noche); border-radius: 999px;
    background: transparent; color: var(--noche); font-weight: 700; cursor: pointer;
}

/* ---------- Home hero ---------- */
.hero { padding-top: clamp(44px, 5.5vw, 80px); }
.hero h1 { font-size: clamp(3.1rem, 6.6vw, 6.25rem); }
.hero-line { display: block; }

/* The same welcome in the visitor's other language. The bilingual line is
   the one deliberate flourish on the page. */
.hero-translation {
    margin: 22px 0 0;
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(1.45rem, 2.5vw, 2.25rem); line-height: 1.2;
    color: var(--gris); max-width: none;
    display: flex; align-items: center; gap: 18px;
}
.hero-translation::before {
    content: ''; flex: 0 0 auto; width: 48px; height: 3px;
    background: var(--mandarina); border-radius: 2px;
}

.hero-sub {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: end; gap: 32px 60px;
    margin-top: clamp(32px, 4vw, 52px);
}
.hero-sub .lead { margin: 0; }
.hero-sub .btn-row { margin: 0; }

.hero-media { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.hero-photo {
    width: 100%; height: clamp(320px, 42vw, 560px);
    object-fit: cover; object-position: 50% 62%;
    border-radius: var(--radius-photo);
}

.sunday-strip {
    position: relative; z-index: 2;
    width: min(1060px, calc(100% - 48px));
    margin: -64px auto 0;
    background: var(--noche); color: #fff;
    border-radius: var(--radius-panel);
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 26px 8px;
    box-shadow: 0 18px 40px -24px rgba(30, 37, 71, .55);
}
.sunday-strip > div {
    display: flex; align-items: center; gap: 16px;
    padding: 4px 26px;
}
.sunday-strip > div + div { border-left: 1px solid rgba(255, 255, 255, .16); }
.sunday-strip svg {
    width: 32px; height: 32px; flex-shrink: 0;
    fill: none; stroke: var(--mandarina); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sunday-strip strong { display: block; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.sunday-strip small { display: block; font-size: .95rem; color: #b8c0e0; line-height: 1.4; }
.sunday-strip a { text-decoration: none; }
.sunday-strip a:hover small { color: #fff; text-decoration: underline; }

/* ---------- Statement ---------- */
.statement-grid {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 40px 72px; align-items: end;
}
.statement-grid h2 { font-size: clamp(2.3rem, 3.9vw, 3.4rem); }
.statement-body p { font-size: 1.18rem; margin-bottom: 22px; }

/* ---------- Section heads ---------- */
.sectionhead {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 20px 60px; align-items: end; margin-bottom: clamp(36px, 4vw, 56px);
}
.sectionhead p { margin: 0; font-size: 1.1rem; }

/* ---------- Ministry list ---------- */
.ministry-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 48px;
}
.ministry {
    display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 26px; align-items: center;
    padding: 20px 0; border-top: 1px solid var(--linea);
    text-decoration: none; color: inherit;
}
.ministry img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: var(--radius-photo);
}
.ministry h3 { margin-bottom: 8px; }
.ministry p { font-size: 1rem; margin-bottom: 12px; }
.ministry .textlink { font-size: 1rem; }
.ministry:hover h3 { text-decoration: underline; text-decoration-color: var(--mandarina); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.ministry:hover .textlink { color: var(--mandarina-ink); }

/* Per-photo framing for crops that would otherwise cut off faces or text */
.focus-top { object-position: 50% 20%; }
.focus-upper { object-position: 50% 30%; }
.focus-low { object-position: 50% 70%; }

/* ---------- Split (photo + text) ---------- */
.split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 100px); align-items: center;
}
.split-media { position: relative; margin: 0; }
.split-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-photo); }
.split-text h2 { margin-bottom: 24px; }
.split-text .lead { margin-bottom: 18px; }

.photo-tag {
    position: absolute; right: -28px; bottom: -28px;
    background: var(--mandarina); color: var(--noche);
    padding: 22px 26px; border-radius: var(--radius-panel); max-width: 250px;
}
.photo-tag strong { display: block; font-family: var(--serif); font-size: 1.85rem; line-height: 1.05; font-weight: 800; margin-bottom: 8px; }
.photo-tag span { display: block; font-size: 1rem; line-height: 1.35; }

/* ---------- Visit + FAQ ---------- */
.visit-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px clamp(48px, 7vw, 100px); align-items: start;
}
.visit h2 { margin-bottom: 20px; }
.visit-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 34px 0 36px; }
.visit-facts > div { border-top: 3px solid var(--mandarina); padding-top: 14px; }
.visit-facts dt { font-weight: 700; margin-bottom: 4px; }
.visit-facts dd { margin: 0; color: var(--gris); }
.visit-faq h3 { margin-bottom: 14px; }
.visit-faq .textlink { display: inline-block; margin-top: 26px; }

.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-child { border-top: 1px solid var(--linea); }
.faq summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 20px 0; font-weight: 700; font-size: 1.12rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ''; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    background:
        linear-gradient(var(--noche), var(--noche)) center / 12px 2px no-repeat,
        linear-gradient(var(--noche), var(--noche)) center / 2px 12px no-repeat,
        var(--papel);
    border: 1px solid var(--linea);
    transition: transform .2s ease;
}
.tint .faq summary::after { border-color: transparent; }
.faq details[open] summary::after {
    background: linear-gradient(var(--noche), var(--noche)) center / 12px 2px no-repeat, var(--mandarina);
    border-color: var(--mandarina);
}
.faq summary:hover { color: var(--mandarina-ink); }
.faq details p { margin: -4px 44px 22px 0; }

/* ---------- Give panel ---------- */
.give-section { padding-block: var(--section); }
.section + .give-section, .visit + .give-section { padding-top: 0; }
.tint + .give-section { padding-top: var(--section); }
.give-panel {
    background: var(--noche); color: #fff; border-radius: var(--radius-panel);
    padding: clamp(36px, 6vw, 72px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 60px; align-items: end;
    position: relative; overflow: hidden;
}
.give-panel h2 { color: #fff; margin-bottom: 16px; font-size: clamp(2.2rem, 4.2vw, 3.5rem); }
.give-panel p { color: var(--on-dark); font-size: 1.15rem; }
.give-panel .btn { position: relative; }
/* A single ring that echoes the circular church emblem */
.give-panel::after {
    content: ''; position: absolute; right: -40px; top: -60px; width: 320px; height: 320px;
    border: 2px solid rgba(240, 136, 74, .35); border-radius: 50%;
    pointer-events: none;
}

/* ---------- Newsletter ---------- */
.newsletter {
    display: flex; justify-content: space-between; align-items: center; gap: 24px 48px;
    padding: 0 0 var(--section); flex-wrap: wrap;
}
.give-section:has(+ .wrap > .newsletter) { padding-bottom: 64px; }
.newsletter h2 { font-size: 1.75rem; margin-bottom: 6px; }
.newsletter p { margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--noche); color: var(--on-dark); padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .brand img { width: 220px; margin-bottom: 20px; }
.footer p { color: var(--on-dark); font-size: 1rem; }
.footer-heading { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 14px; letter-spacing: 0; }
.footer-grid a:not(.brand) {
    display: block; width: fit-content; margin-bottom: 10px;
    color: var(--on-dark); text-decoration: none; font-size: 1rem; line-height: 1.45;
}
.footer-grid a:not(.brand):hover { color: #fff; text-decoration: underline; text-decoration-color: var(--mandarina); text-underline-offset: 4px; }
.legal {
    display: flex; justify-content: space-between; gap: 12px 30px; flex-wrap: wrap;
    margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .9rem; color: #aab2d4;
}

/* ---------- Inner page hero ---------- */
.page-hero { background: var(--cielo); padding-block: clamp(52px, 7vw, 96px); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 88px); align-items: center; }
.page-hero.has-photo .page-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.page-hero h1 { font-size: clamp(2.9rem, 6vw, 5.2rem); margin-bottom: 24px; max-width: 20ch; }
.page-hero.has-photo h1 { max-width: 14ch; }
.page-hero .lead { margin: 0; }
.page-hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-photo); }
.crumb { display: inline-block; margin-bottom: 22px; font-weight: 700; font-size: 1rem; }

/* ---------- Two-column text ---------- */
.columns { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(40px, 7vw, 100px); }
.columns + .columns { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--linea); }
.columns .body p { font-size: 1.15rem; }
.columns .body .textlink, .columns .body .btn { margin-top: 10px; }

/* ---------- Timeline (About) ---------- */
.timeline { list-style: none; margin: clamp(36px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--linea); }
.timeline li { position: relative; padding-top: 44px; }
.timeline li::before {
    content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--papel); border: 3px solid var(--mandarina);
}
.timeline li:last-child::before { background: var(--mandarina); }
.timeline .year { display: block; font-family: var(--serif); font-weight: 800; font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.timeline p { font-size: 1.02rem; }

/* ---------- Ministry detail facts ---------- */
.facts { margin: 0; border-top: 3px solid var(--mandarina); }
.facts > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--linea); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--gris); }
.facts-title { margin-bottom: 18px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px clamp(48px, 7vw, 100px); align-items: start; }
.detail-grid .lead { max-width: 54ch; }
.facts-title { font-size: 1.6rem; }

.more-ministries { padding-top: 0; }
.more-ministries > .wrap { border-top: 1px solid var(--linea); padding-top: clamp(56px, 7vw, 96px); }
.more-ministries .ministry { border-top: 0; padding: 0; }
.more-ministries h2 { margin-bottom: clamp(28px, 3vw, 40px); font-size: clamp(2rem, 3.4vw, 2.75rem); }
.more-ministries .ministry-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.more-ministries .ministry { grid-template-columns: 1fr; gap: 18px; align-items: start; }

/* ---------- Leadership ---------- */
.leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 72px) clamp(32px, 5vw, 64px); }
.leader img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-photo); margin-bottom: 24px; }
.leader .role { font-weight: 700; color: var(--mandarina-ink); margin-bottom: 6px; font-size: 1rem; }
.leader h2 { font-size: clamp(1.8rem, 2.6vw, 2.25rem); margin-bottom: 12px; }

/* ---------- Gallery ---------- */
.gallery { columns: 3 300px; column-gap: 20px; }
.gallery-open {
    display: block; width: 100%; margin: 0 0 20px; padding: 0; border: 0; background: none;
    cursor: zoom-in; break-inside: avoid; border-radius: var(--radius-photo); overflow: hidden;
}
.gallery-open img { width: 100%; transition: opacity .2s ease; }
.gallery-open:hover img { opacity: .88; }
.gallery-note { margin-top: 18px; }

.lightbox {
    width: min(1000px, 94vw); max-width: none; max-height: 92vh; padding: 64px 24px 24px;
    background: var(--noche); color: #fff; border: 0; border-radius: var(--radius-panel);
}
.lightbox::backdrop { background: rgba(14, 18, 38, .82); }
.lightbox img { width: 100%; max-height: 76vh; object-fit: contain; }
.lightbox button {
    position: absolute; right: 18px; top: 14px; min-height: 40px; padding: 6px 18px;
    border: 2px solid rgba(255, 255, 255, .5); border-radius: 999px; background: transparent; color: #fff; cursor: pointer; font-weight: 700;
}
.lightbox button:hover { border-color: #fff; }

/* ---------- Contact ---------- */
.contact-lines { margin: 32px 0; display: grid; gap: 6px; }
.contact-lines a {
    font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25;
    color: var(--noche); text-decoration: none; overflow-wrap: anywhere; width: fit-content;
}
.contact-lines a:hover { text-decoration: underline; text-decoration-color: var(--mandarina); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.location-card { background: var(--noche); color: #fff; padding: clamp(32px, 4vw, 52px); border-radius: var(--radius-panel); }
.location-card h2 { color: #fff; font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: 20px; }
.location-card p { color: var(--on-dark); }
.location-card .time { display: block; font-family: var(--serif); font-weight: 800; font-size: 2.4rem; color: #fff; line-height: 1.1; }
.location-card .btn { margin-top: 12px; }

/* ---------- Callout / FAQ page ---------- */
.narrow { max-width: 820px; }
.callout { margin-top: 48px; padding: 32px 36px; background: var(--cielo); border-radius: var(--radius-panel); }
.callout h2 { font-size: 1.75rem; margin-bottom: 8px; }

.note { font-size: 1rem; margin-top: 26px; }
.stack > * + * { margin-top: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
    .brand img { width: 210px; }
    .navlinks a:not(.btn) { padding: 8px 9px; font-size: 1rem; }
    .navlinks .btn { margin-left: 6px; }
    .ministry-list { grid-template-columns: 1fr; }
    .ministry { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
    .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
    .footer-grid > div:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 28px; }
    .footer-grid > div:last-child .footer-heading { flex-basis: 100%; }
    .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
    .timeline::before { display: none; }
}

/* Collapsed navigation */
@media (max-width: 1040px) {
    .navrow { min-height: 72px; }
    .menu { display: inline-flex; align-items: center; }
    .navlinks {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 12px var(--gutter) 24px; background: var(--papel);
        border-bottom: 1px solid var(--linea); box-shadow: 0 20px 30px -20px rgba(30, 37, 71, .35);
    }
    .navlinks.open { display: flex; }
    .navlinks a:not(.btn) { padding: 14px 8px; font-size: 1.15rem; border-bottom: 1px solid var(--linea); border-radius: 0; }
    .navlinks .btn { margin: 14px 0 0; }

    /* Without JavaScript the menu button can't work, so show links inline */
    html:not(.js) .menu { display: none; }
    html:not(.js) .navrow { flex-wrap: wrap; padding-block: 12px; }
    html:not(.js) .navlinks { display: flex; position: static; flex-direction: row; flex-wrap: wrap; padding: 0; border: 0; box-shadow: none; }
    html:not(.js) .navlinks a:not(.btn) { border: 0; padding: 6px 8px; font-size: 1rem; }
}

@media (max-width: 900px) {
    .hero-sub { grid-template-columns: 1fr; }
    .sunday-strip { width: calc(100% - 32px); padding: 18px 4px; margin-top: -48px; }
    .sunday-strip > div { padding: 4px 16px; gap: 12px; }
    .sunday-strip svg { width: 26px; height: 26px; }
    .statement-grid, .sectionhead, .split, .visit-grid, .columns, .detail-grid, .page-hero.has-photo .page-hero-grid { grid-template-columns: 1fr; }
    .split .split-media { order: -1; }
    .photo-tag { right: 16px; bottom: -24px; }
    .give-panel { grid-template-columns: 1fr; align-items: start; }
    .more-ministries .ministry-list { grid-template-columns: 1fr; }
    .more-ministries .ministry { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: center; }
    .page-hero-photo { max-width: 640px; }
}

@media (max-width: 640px) {
    body { font-size: 1.0625rem; }
    .sunday-strip { grid-template-columns: 1fr; padding: 10px 6px; }
    .sunday-strip > div { padding: 16px 20px; }
    .sunday-strip > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
    .topline-inner { flex-direction: column; justify-content: center; gap: 6px; padding-block: 10px; }
    .announcement { justify-content: center; text-align: center; font-size: .9rem; }
    .brand img { width: 184px; }
    .hero h1 { font-size: clamp(2.9rem, 13.5vw, 4rem); }
    .hero-translation { font-size: 1.35rem; gap: 12px; }
    .hero-translation::before { width: 28px; }
    .hero-sub .btn-row { flex-direction: column; align-items: stretch; }
    .hero-photo { height: 300px; object-position: 60% 60%; }
    .ministry, .more-ministries .ministry { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
    .ministry-list { gap: 12px; }
    .ministry img { aspect-ratio: 3 / 2; }
    .visit-facts { grid-template-columns: 1fr 1fr; gap: 16px; }
    .photo-tag { position: static; margin: -40px 16px 0 auto; max-width: 260px; position: relative; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
    .footer-grid > div:last-child { display: block; }
    .legal { flex-direction: column; }
    .timeline { grid-template-columns: 1fr; gap: 0; border-left: 2px solid var(--linea); margin-left: 9px; }
    .timeline li { padding: 0 0 30px 32px; }
    .timeline li:last-child { padding-bottom: 0; }
    .timeline li::before { left: -11px; top: 6px; }
    .timeline .year { font-size: 2rem; }
    .facts > div { grid-template-columns: 1fr; gap: 2px; }
    .leaders { grid-template-columns: 1fr; }
    .gallery { columns: 2 140px; column-gap: 12px; }
    .gallery-open { margin-bottom: 12px; }
    .btn-row .btn { flex: 1 1 auto; }
    .callout { padding: 26px 24px; }
    .faq details p { margin-right: 0; }
    h2 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
    .topline, .header, .give-section, .newsletter, .footer, .menu { display: none !important; }
    body { font-size: 12pt; }
}
