:root {
    --bg: #f7f2ea;
    --surface: #ffffff;
    --ink: #1f2933;
    --muted: #627083;
    --brand: #973319;
    --brand-dark: #622111;
    --gold: #d9a441;
    --soft: #fff7e8;
    --shadow: 0 22px 60px rgba(31, 41, 51, .14);
    --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 20;
    background: #eee5df;
    box-shadow: 0 1px 0 rgba(31,41,51,.06);
}
.navbar {
    width: min(1620px, calc(100% - 96px));
    margin: 0 auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    color: #1f2933;
    min-width: auto;
}
.brand img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 50%;
    flex: 0 0 auto;
}
.brand span { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.brand-mark { width: 150px; height: 150px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: #fff7e8; font-size: .72rem; letter-spacing: .06em; box-shadow: 0 8px 22px rgba(151,51,25,.22); }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.nav-links a { opacity: .84; transition: .2s ease; }
.nav-links a:hover { color: var(--brand); opacity: 1; }
.nav-cta { padding: 10px 20px; border: 1px solid rgba(151,51,25,.28); border-radius: 999px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 28px; height: 3px; margin: 5px 0; background: var(--ink); border-radius: 3px; }

.hero {
    min-height: 100vh;
    padding: 120px 24px 90px;
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(217,164,65,.28), transparent 34%),
        linear-gradient(135deg, rgba(98,33,17,.94), rgba(151,51,25,.78));
}
.hero::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(217,164,65,.22);
    filter: blur(30px);
    bottom: -280px;
    right: -160px;
}
.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    width: min(1200px, 100%);
    margin: 0 auto;
    text-align: center;
}
 .eyebrow, .section-kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-weight: 800; font-size: .78rem; }
.hero .eyebrow {
    display: block;
    width: 100%;
    margin: 0 auto 22px;
    text-align: center;
    font-size: clamp(1.15rem, 3vw, 2rem);
    line-height: .9;
    letter-spacing: .08em;
    font-weight: 950;
    color: var(--gold);
    text-shadow: 0 8px 26px rgba(0,0,0,.18);
}
.home-hero .eyebrow {
    font-size: clamp(2rem, 5vw, 5rem);
}
.hero h1 { margin: 16px 0; font-size: clamp(2.7rem, 8vw, 6.9rem); line-height: .95; text-transform: uppercase; letter-spacing: .035em; text-align: center; }
.hero-subtitle { margin: 0 auto 28px; max-width: 720px; font-size: clamp(1rem, 2vw, 1.28rem); color: rgba(255,255,255,.9); }
.service-card {
    width: min(520px, 100%);
    margin: 0 auto 30px;
    padding: 20px 26px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 24px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.service-card strong { font-size: 1.7rem; color: #fff1c4; }
.hero-actions, .media-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 22px; border-radius: 999px; font-weight: 800; transition: .2s ease; }
.btn.primary { background: var(--gold); color: #2a1607; }
.btn.secondary { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.28); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.18); }

.section { padding: 96px 24px; }
.section-grid, .cards, .gallery-grid, .section-heading, .media-panel, .contact-card { width: min(1180px, 100%); margin: 0 auto; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 54px; }
.reverse { direction: rtl; }
.reverse > * { direction: ltr; }
.section-copy h2, .section-heading h2, .media-panel h2, .contact-card h2 { margin: 10px 0 16px; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.05; }
.section-copy p, .section-heading p, .media-panel p, .contact-card p { color: var(--muted); font-size: 1.08rem; }
.image-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.image-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.ministries { background: var(--surface); }
.section-heading { text-align: center; max-width: 760px; margin-bottom: 44px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ministry-card { display: block; background: var(--soft); border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px rgba(31,41,51,.08); color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.ministry-card:hover { transform: translateY(-6px); box-shadow: 0 24px 54px rgba(31,41,51,.14); }
.ministry-card img { width: 100%; aspect-ratio: 1.35 / 1; object-fit: cover; object-position: center; }
.ministry-card h3 { margin: 24px 24px 8px; font-size: 1.35rem; }
.ministry-card p { margin: 0 24px 16px; color: var(--muted); }
.card-link { display: inline-block; margin: 0 24px 26px; color: var(--brand); font-weight: 800; }
.department-list { width: min(960px, 100%); margin: 36px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.department-list a { padding: 10px 14px; border-radius: 999px; background: #f2e1ca; color: var(--brand-dark); font-weight: 700; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.department-list a:hover { background: #e4c391; transform: translateY(-2px); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-grid img { width: 100%; height: 270px; object-fit: cover; border-radius: 22px; box-shadow: 0 14px 34px rgba(31,41,51,.12); }
.gallery-grid img:first-child { grid-column: span 2; }

.media-section { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: white; }
.media-panel { text-align: center; max-width: 850px; }
.media-panel p { color: rgba(255,255,255,.86); }
.media-panel .btn.secondary { background: transparent; }

.stat-card { background: var(--brand); color: white; border-radius: var(--radius); padding: 58px; box-shadow: var(--shadow); text-align: center; }
.stat-card strong { display: block; font-size: clamp(4rem, 10vw, 7rem); line-height: 1; color: #ffe0a2; }
.stat-card span { font-size: 1.25rem; font-weight: 700; }
.pastor-section { background: var(--surface); text-align: center; }
.contact-card { background: white; border-radius: 34px; padding: clamp(28px, 5vw, 58px); box-shadow: var(--shadow); text-align: center; }
.contact-details { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-details div { background: var(--soft); border-radius: 20px; padding: 20px; }
.contact-details strong, .contact-details span { display: block; }
.contact-details span { color: var(--muted); }
.site-footer { padding: 34px 24px; background: #1d1714; color: rgba(255,255,255,.8); display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #ffd78a; font-weight: 700; }

.reveal { opacity: 1; transform: translateY(0); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
    .navbar { width: min(100% - 40px, 100%); min-height: 110px; }
    .brand { min-width: auto; gap: 18px; }
    .brand img, .brand-mark { width: 92px; height: 92px; }
    .nav-links { gap: 18px; font-size: .92rem; }
    .nav-cta { padding: 12px 18px; }
}

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute; top: 110px; left: 0; right: 0;
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        background: white; padding: 12px 24px 24px; box-shadow: 0 18px 40px rgba(31,41,51,.12);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 14px 0; }
    .two-column, .cards, .contact-details { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid img:first-child { grid-column: span 1; }
}

@media (max-width: 560px) {
    .navbar { min-height: 82px; width: min(100% - 28px, 100%); }
    .brand { gap: 12px; min-width: auto; }
    .brand img, .brand-mark { width: 64px; height: 64px; }
    .brand span { font-size: 1.35rem; }
    .hero { padding-top: 130px; }
    .home-hero .eyebrow { font-size: clamp(4.5rem, 20vw, 8rem); }
    .service-card { flex-direction: column; }
    .section { padding: 72px 18px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid img { height: 260px; }
}


/* Dedicated Decons page - matches Home theme */
.decons-home-hero {
    min-height: 72vh;
    padding: 120px 24px 90px;
}

.decons-section {
    background: var(--bg);
}

.decor-title {
    width: min(1180px, 100%);
    margin: 0 auto 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    text-align: center;
}

.decor-title span {
    width: 120px;
    height: 2px;
    background: var(--gold);
    display: inline-block;
}

.decor-title h2 {
    margin: 0;
    color: var(--brand-dark);
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 900;
    position: relative;
}

.decor-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--gold);
}

.decons-grid {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.leader-card {
    min-height: 390px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 24px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease;
}

.leader-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 28px 70px rgba(31, 41, 51, .18);
}

.leader-photo-wrap {
    width: min(260px, 88%);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 7px solid #fff;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(31, 41, 51, .18);
    background: var(--soft);
}

.leader-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-info { margin-top: 26px; }

.leader-info h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 1.28rem;
    font-weight: 850;
}

.leader-info p {
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

@media (max-width: 1180px) {
    .decons-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .decons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .decor-title { gap: 18px; }
    .decor-title span { width: 70px; }
}

@media (max-width: 560px) {
    .decons-home-hero { min-height: 62vh; padding-top: 125px; }
    .decons-grid { grid-template-columns: 1fr; }
    .leader-card { min-height: auto; }
    .decor-title span { width: 42px; }
}


/* Placeholder leader photo circles for department pages where individual photos will be added later */
.placeholder-photo {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 35% 28%, rgba(217,164,65,.32), transparent 34%),
        linear-gradient(135deg, #fff7e8, #f2e1ca);
}

.placeholder-photo span {
    color: var(--brand-dark);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .82rem;
    opacity: .7;
}

.placeholder-leaders-grid .leader-card {
    min-height: 360px;
}


/* Contact page */
.contact-page-section {
    min-height: calc(100vh - 116px);
    padding: 120px 24px 90px;
    background: var(--surface);
}
.contact-page-wrap {
    width: min(1120px, 100%);
    margin: 0 auto;
}
.contact-page-title {
    text-align: center;
    margin: 0 0 58px;
    font-size: clamp(3rem, 7vw, 5.2rem);
    line-height: 1;
    font-weight: 300;
    color: #333;
    letter-spacing: .04em;
}
.contact-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(36px, 8vw, 96px);
}
.contact-column h2 {
    margin: 0 0 24px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 300;
    letter-spacing: .03em;
    color: #565656;
}
.contact-column p, .hours-row {
    color: #4e5865;
    font-size: 1.08rem;
    margin: 0 0 14px;
}
.hours-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 24px;
}
.social-links {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}
.social-links a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: .86rem;
    font-weight: 800;
}
.contact-home-action { margin-top: 28px; }
.contact-details-full span { line-height: 1.9; }
@media (max-width: 820px) {
    .contact-columns { grid-template-columns: 1fr; gap: 34px; }
    .contact-page-section { padding-top: 125px; }
}


.gallery-hero { min-height: 62vh; background: linear-gradient(135deg, rgba(98,33,17,.94), rgba(151,51,25,.78)); }
.gallery-album-preview { grid-template-columns: repeat(3, 1fr); }

.gallery-album-preview .gallery-card { min-height: 300px; }
.gallery-album-preview .gallery-card img { height: 100%; }
@media (min-width: 1200px) { .album-viewer-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-card { position: relative; min-height: 330px; display: block; overflow: hidden; border-radius: 24px; color: white; text-decoration: none; box-shadow: 0 18px 42px rgba(31,41,51,.18); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; transition: transform .35s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card div { position: absolute; inset: auto 0 0 0; padding: 50px 24px 22px; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.gallery-card h3 { margin: 0 0 6px; font-size: 1.45rem; }
.gallery-card span { font-weight: 800; color: #ffd78a; }
.gallery-index-section { background: var(--surface); }
.gallery-album-links { width: min(980px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-album-links a { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: white; color: var(--brand-dark); text-decoration: none; font-size: 1.25rem; font-weight: 900; box-shadow: 0 14px 34px rgba(31,41,51,.08); transition: transform .2s ease, box-shadow .2s ease; }
.gallery-album-links a:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(31,41,51,.14); }
.gallery-album-links span { color: var(--muted); font-size: .95rem; font-weight: 700; }
.gallery-album { padding: 82px 24px; }
.gallery-album:nth-of-type(even) { background: var(--surface); }
.full-gallery-grid { width: min(1380px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-photo { display: block; height: 250px; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 28px rgba(31,41,51,.12); background: #eee; }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery-photo:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.86); }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1200px, 94vw); max-height: 88vh; object-fit: contain; border-radius: 18px; box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.lightbox-close { position: fixed; top: 18px; right: 24px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: white; color: #111; font-size: 34px; line-height: 1; cursor: pointer; }
@media (max-width: 900px) { .gallery-album-preview, .gallery-album-links, .full-gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .gallery-album-preview, .gallery-album-links, .full-gallery-grid { grid-template-columns: 1fr; } .gallery-card, .gallery-photo { height: 260px; } }


/* Merged album viewer gallery */
.album-viewer-grid { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.album-viewer-card { position: relative; min-height: 430px; border: 0; padding: 0; display: block; overflow: hidden; border-radius: 28px; background: #111; color: white; text-align: left; cursor: pointer; box-shadow: 0 22px 52px rgba(31,41,51,.18); }
.album-viewer-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.album-viewer-card:hover img { transform: scale(1.06); filter: brightness(.82); }
.album-viewer-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.82)); }
.album-card-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 28px; display: grid; gap: 9px; }
.album-card-content strong { font-size: 1.65rem; line-height: 1.1; }
.album-card-content small { color: rgba(255,255,255,.86); font-size: 1rem; line-height: 1.45; }
.album-card-content em { width: fit-content; margin-top: 8px; padding: 11px 16px; border-radius: 999px; background: var(--brand); color: white; font-style: normal; font-weight: 900; }
body.viewer-open { overflow: hidden; }
.gallery-viewer { align-items: center; justify-content: center; gap: 16px; padding: 18px; background: rgba(0,0,0,.92); }
.viewer-stage { width: min(1280px, 88vw); height: min(900px, 92vh); display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.viewer-topline { display: flex; justify-content: space-between; align-items: center; gap: 18px; color: white; font-size: 1.05rem; }
.viewer-topline strong { font-size: 1.25rem; }
.gallery-viewer img#viewerImage { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border-radius: 18px; background: rgba(255,255,255,.05); box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.viewer-nav { width: 56px; height: 56px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #111; font-size: 48px; line-height: 1; cursor: pointer; z-index: 1002; }
.viewer-nav:hover, .lightbox-close:hover { background: var(--brand); color: white; }
.viewer-thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: thin; }
.viewer-thumbs button { flex: 0 0 auto; width: 88px; height: 64px; border: 3px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.12); cursor: pointer; opacity: .65; }
.viewer-thumbs button.active { border-color: var(--brand); opacity: 1; }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .album-viewer-grid { grid-template-columns: 1fr; } .album-viewer-card { min-height: 340px; } .gallery-viewer { gap: 8px; } .viewer-stage { width: 100%; } .viewer-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 38px; } .viewer-prev { left: 10px; } .viewer-next { right: 10px; } .viewer-thumbs button { width: 72px; height: 52px; } }


/* Viewer image fit fix: show the full photo without cropping or over-zooming */
.gallery-viewer {
    padding: 18px 72px;
}
.viewer-stage {
    width: min(1400px, 94vw);
    height: min(920px, 92vh);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}
.gallery-viewer img#viewerImage {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center;
    display: block;
    background: rgba(255,255,255,.04);
}
.viewer-thumbs img {
    object-fit: contain;
    object-position: center center;
    background: rgba(0,0,0,.35);
}
@media (max-width: 900px) {
    .gallery-viewer { padding: 14px 54px; }
    .viewer-stage { width: 100%; height: 92vh; }
}
@media (max-width: 560px) {
    .gallery-viewer { padding: 12px 42px; }
    .viewer-stage { height: 90vh; gap: 10px; }
    .viewer-topline { font-size: .9rem; }
    .viewer-topline strong { font-size: 1rem; }
}


/* History page */
.history-hero {
    min-height: 62vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(217,164,65,.28), transparent 34%),
        linear-gradient(135deg, rgba(98,33,17,.96), rgba(151,51,25,.82));
}
.history-page-section {
    background: var(--surface);
}
.history-page-wrap {
    width: min(980px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 34px;
    padding: clamp(28px, 5vw, 64px);
    box-shadow: var(--shadow);
}
.history-page-wrap h2 {
    margin: 10px 0 28px;
    color: var(--brand-dark);
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
}
.history-text {
    display: grid;
    gap: 22px;
    color: var(--ink);
    font-size: clamp(1rem, 1.55vw, 1.18rem);
    line-height: 1.9;
}
.history-text p {
    margin: 0;
}
.history-actions {
    margin-top: 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.history-section .btn.primary {
    color: #2a1607;
}
@media (max-width: 620px) {
    .history-page-wrap { border-radius: 24px; }
    .history-text { line-height: 1.75; }
}


/* Pastor section with photo */
.pastor-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(217,164,65,.22), transparent 30%),
        radial-gradient(circle at 82% 72%, rgba(151,51,25,.12), transparent 34%),
        linear-gradient(180deg, #fffaf0 0%, #ffffff 58%, #fff7e8 100%);
    text-align: center;
}

.pastor-section::before {
    content: "";
    position: absolute;
    inset: 52px auto auto 50%;
    width: min(860px, 86vw);
    height: min(860px, 86vw);
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217,164,65,.16), transparent 64%);
    pointer-events: none;
}

.pastor-feature {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: clamp(30px, 5vw, 64px);
    align-items: center;
    text-align: left;
}

.pastor-photo-card {
    position: relative;
    width: clamp(280px, 34vw, 460px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: clamp(8px, 1.2vw, 12px);
    border-radius: 50%;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        conic-gradient(from 145deg, rgba(217,164,65,.95), rgba(151,51,25,.55), rgba(255,255,255,.92), rgba(217,164,65,.95)) border-box;
    border: 3px solid transparent;
    box-shadow:
        0 28px 70px rgba(31,41,51,.20),
        0 10px 24px rgba(98,33,17,.12),
        inset 0 0 0 1px rgba(255,255,255,.85);
    isolation: isolate;
    transition: transform .28s ease, box-shadow .28s ease;
}

.pastor-photo-card::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217,164,65,.24), transparent 68%);
    filter: blur(8px);
    z-index: -1;
}

.pastor-photo-card::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.55);
    box-shadow: inset 0 0 34px rgba(255,255,255,.28);
    pointer-events: none;
}

.pastor-photo-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow:
        0 34px 86px rgba(31,41,51,.24),
        0 14px 34px rgba(98,33,17,.16),
        inset 0 0 0 1px rgba(255,255,255,.9);
}

.pastor-photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 7px solid #ffffff;
    box-shadow: inset 0 0 0 1px rgba(98,33,17,.08);
}

.pastor-info-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,250,240,.92);
    border: 1px solid rgba(217,164,65,.28);
    border-radius: 32px;
    padding: clamp(28px, 4vw, 46px);
    box-shadow: 0 22px 58px rgba(31,41,51,.11);
    backdrop-filter: blur(10px);
}

.pastor-info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-dark), var(--gold), var(--brand));
}

.pastor-info-card h3 {
    margin: 10px 0 14px;
    color: var(--brand-dark);
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.pastor-info-card p {
    color: var(--muted);
    font-size: 1.08rem;
    margin: 0 0 24px;
}

.pastor-points {
    display: grid;
    gap: 14px;
}

.pastor-points div {
    padding: 15px 16px;
    border: 1px solid rgba(98,33,17,.10);
    border-radius: 18px;
    background: rgba(255,255,255,.62);
    box-shadow: 0 8px 24px rgba(31,41,51,.05);
}

.pastor-points div:last-child {
    padding-bottom: 15px;
}

.pastor-points strong,
.pastor-points span {
    display: block;
}

.pastor-points strong {
    color: var(--ink);
    font-size: 1.08rem;
    margin-bottom: 4px;
}

.pastor-points span {
    color: var(--muted);
}

.pastor-home-action {
    margin-top: 24px;
}

@media (max-width: 900px) {
    .pastor-feature {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pastor-info-card {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .pastor-photo-card {
        width: min(82vw, 330px);
        padding: 8px;
    }

    .pastor-photo-card img {
        border-width: 5px;
    }

    .pastor-info-card {
        border-radius: 24px;
    }
}

/* Google Photos album viewer */
.google-album-panel {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 14px;
}
.google-album-frame {
    width: 100%;
    min-height: 58vh;
    height: 100%;
    border: 0;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
}
.google-album-fallback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    color: white;
}
.google-album-fallback p { margin: 0; font-weight: 700; }
@media (max-width: 720px) {
    .google-album-fallback { flex-direction: column; align-items: stretch; text-align: center; }
    .google-album-frame { min-height: 62vh; }
}


.gallery-loading,
.gallery-empty {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 36px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}
.gallery-empty h3 { margin-top: 0; color: var(--brand); }


/* Dedicated Media page and Facebook feed */
.media-page-hero {
    min-height: 72vh;
    padding: 130px 24px 90px;
}

.facebook-btn {
    gap: 10px;
}

.btn-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: currentColor;
}

.facebook-feed-section {
    background: var(--bg);
}

.facebook-feed-card {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 34px);
    border-radius: 34px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.facebook-feed-card iframe {
    display: block;
    width: min(500px, 100%);
    max-width: 100%;
    margin: 0 auto;
    border-radius: 18px;
    background: #fff;
}

.facebook-feed-fallback {
    margin-top: 24px;
}

.facebook-feed-fallback p {
    margin: 0 0 14px;
    color: var(--muted);
}

@media (max-width: 560px) {
    .media-page-hero {
        min-height: 62vh;
        padding-top: 125px;
    }

    .facebook-feed-card iframe {
        height: 620px;
    }
}

/* =========================================================
   Fluid responsive layout polish - desktop, tablet, phone
   ========================================================= */
:root {
    --page-pad: clamp(16px, 4vw, 48px);
    --header-h: clamp(72px, 8vw, 88px);
}

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    overflow-x: hidden;
}

.site-header {
    min-height: var(--header-h);
}

.navbar {
    width: min(1620px, calc(100% - (var(--page-pad) * 2)));
    min-height: var(--header-h);
    gap: clamp(12px, 2vw, 24px);
}

.brand {
    min-width: 0;
    gap: clamp(8px, 1.6vw, 14px);
}

.brand img,
.brand-mark {
    width: clamp(48px, 6vw, 64px);
    height: clamp(48px, 6vw, 64px);
}

.brand span {
    font-size: clamp(1.15rem, 2.5vw, 1.8rem);
    white-space: nowrap;
}

.nav-links {
    gap: clamp(10px, 1.6vw, 22px);
    font-size: clamp(.78rem, .9vw, .95rem);
}

.nav-links a,
.department-list a,
.gallery-album-links a,
.album-viewer-card,
.btn {
    -webkit-tap-highlight-color: transparent;
}

.btn,
.nav-cta,
.album-card-content em,
.history-actions .btn,
.media-actions .btn,
.hero-actions .btn {
    max-width: 100%;
    min-height: clamp(44px, 6vw, 52px);
    padding: clamp(11px, 2.4vw, 14px) clamp(16px, 4vw, 24px);
    font-size: clamp(.92rem, 2.4vw, 1rem);
    line-height: 1.15;
    text-align: center;
    white-space: normal;
}

.hero,
.decons-home-hero,
.media-page-hero,
.gallery-hero,
.history-hero {
    min-height: clamp(560px, 78svh, 900px);
    padding: calc(var(--header-h) + clamp(34px, 7vw, 70px)) var(--page-pad) clamp(56px, 8vw, 96px);
}

.hero h1 {
    font-size: clamp(2.25rem, 10vw, 6.9rem);
    overflow-wrap: balance;
}

.home-hero .eyebrow {
    font-size: clamp(2rem, 8vw, 5rem);
}

.hero-subtitle,
.section-copy p,
.section-heading p,
.media-panel p,
.contact-card p,
.pastor-info-card p,
.contact-column p,
.hours-row {
    font-size: clamp(.98rem, 2.1vw, 1.12rem);
}

.service-card {
    width: min(520px, 100%);
    padding: clamp(16px, 4vw, 24px);
    flex-wrap: wrap;
}

.service-card strong {
    font-size: clamp(1.25rem, 5vw, 1.7rem);
}

.section,
.gallery-album,
.contact-page-section {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
}

.section-grid,
.cards,
.gallery-grid,
.section-heading,
.media-panel,
.contact-card,
.decons-grid,
.album-viewer-grid,
.gallery-album-links,
.full-gallery-grid,
.contact-page-wrap,
.pastor-feature,
.history-page-wrap {
    width: min(var(--content-max, 1180px), 100%);
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 5vw, 54px);
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(18px, 3vw, 26px);
}

.ministry-card,
.contact-card,
.history-page-wrap,
.pastor-info-card,
.facebook-feed-card,
.gallery-loading,
.gallery-empty {
    border-radius: clamp(20px, 4vw, 34px);
}

.gallery-grid,
.full-gallery-grid,
.gallery-album-preview {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.gallery-grid img,
.gallery-card,
.gallery-photo {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
}

.gallery-grid img:first-child {
    grid-column: auto;
}

.decons-grid {
    --content-max: 1500px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: clamp(18px, 3vw, 32px);
}

.leader-card {
    min-height: 0;
    padding: clamp(20px, 4vw, 30px) clamp(16px, 3vw, 24px);
}

.leader-photo-wrap {
    width: min(230px, 78vw, 88%);
    border-width: clamp(4px, 1.2vw, 7px);
}

.album-viewer-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.album-viewer-card {
    min-height: clamp(280px, 45vw, 430px);
    border-radius: clamp(20px, 4vw, 28px);
}

.album-card-content {
    padding: clamp(18px, 4vw, 28px);
}

.album-card-content strong {
    font-size: clamp(1.25rem, 4vw, 1.65rem);
}

.contact-columns,
.contact-details {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(22px, 5vw, 72px);
}

.hours-row {
    grid-template-columns: minmax(84px, 110px) 1fr;
    gap: clamp(12px, 3vw, 24px);
}

.pastor-feature {
    grid-template-columns: minmax(0, 1fr) minmax(min(100%, 320px), .95fr);
}

.pastor-photo-card {
    width: clamp(240px, 38vw, 460px);
}

.facebook-feed-card iframe {
    width: 100%;
    min-height: min(680px, 78vh);
}

.gallery-viewer {
    padding: max(10px, env(safe-area-inset-top)) max(44px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
}

.viewer-stage {
    width: min(1400px, 100%);
    height: min(920px, 94svh);
}

.viewer-topline {
    flex-wrap: wrap;
}

.lightbox-close,
.viewer-nav {
    touch-action: manipulation;
}

@media (max-width: 1024px) {
    .navbar {
        width: min(100% - 32px, 100%);
    }

    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        max-height: calc(100svh - var(--header-h));
        overflow-y: auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px var(--page-pad) 22px;
        background: rgba(255,255,255,.98);
        box-shadow: 0 18px 40px rgba(31,41,51,.12);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 15px 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(31,41,51,.08);
    }

    .nav-links a:last-child {
        border-bottom: 0;
    }

    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .two-column,
    .pastor-feature {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section-copy,
    .pastor-info-card {
        text-align: left;
    }

    .reverse {
        direction: ltr;
    }
}

@media (max-width: 640px) {
    :root {
        --page-pad: 16px;
        --header-h: 72px;
    }

    .navbar {
        width: calc(100% - 28px);
    }

    .brand span {
        font-size: clamp(1rem, 5vw, 1.28rem);
        max-width: calc(100vw - 120px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero,
    .decons-home-hero,
    .media-page-hero,
    .gallery-hero,
    .history-hero {
        min-height: auto;
        padding-top: calc(var(--header-h) + 42px);
        padding-bottom: 56px;
    }

    .hero-actions,
    .media-actions,
    .history-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn,
    .media-actions .btn,
    .history-actions .btn,
    .contact-home-action .btn {
        width: 100%;
    }

    .service-card {
        align-items: stretch;
        text-align: center;
    }

    .section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .section-copy h2,
    .section-heading h2,
    .media-panel h2,
    .contact-card h2,
    .history-page-wrap h2,
    .contact-page-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .decor-title {
        gap: 12px;
    }

    .decor-title span {
        width: clamp(24px, 12vw, 42px);
    }

    .gallery-viewer {
        padding-left: 42px;
        padding-right: 42px;
    }

    .viewer-stage {
        height: 92svh;
        gap: 10px;
    }

    .viewer-nav {
        width: 42px;
        height: 42px;
        font-size: 34px;
    }

    .viewer-prev { left: 4px; }
    .viewer-next { right: 4px; }

    .viewer-thumbs button {
        width: 64px;
        height: 48px;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }

    .hours-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@media (max-width: 380px) {
    .brand img,
    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand span {
        max-width: calc(100vw - 108px);
    }

    .album-viewer-card {
        min-height: 250px;
    }
}

@media (hover: none) {
    .btn:hover,
    .ministry-card:hover,
    .gallery-card:hover,
    .gallery-photo:hover img,
    .album-viewer-card:hover img,
    .leader-card:hover,
    .pastor-photo-card:hover {
        transform: none;
        box-shadow: inherit;
    }
}


.site-footer .back-to-top {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
}


/* Enhanced Facebook Media page */
.media-hub-section {
    background: linear-gradient(180deg, rgba(29, 78, 216, .07), rgba(255,255,255,0));
}

.media-quick-grid,
.facebook-feed-layout {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.media-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.media-quick-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    padding: clamp(22px, 4vw, 30px);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    color: inherit;
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.media-quick-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: 0 26px 60px rgba(15, 23, 42, .14);
}

.media-quick-card strong {
    font-size: 1.25rem;
    color: var(--brand-dark);
}

.media-quick-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.media-card-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1877f2, #0f4fb8);
    color: #fff;
    font-weight: 900;
    font-size: 1.35rem;
    box-shadow: 0 12px 26px rgba(24, 119, 242, .24);
}

.media-card-icon.large {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    font-size: 2rem;
}

.facebook-feed-layout {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(320px, 1fr);
    align-items: start;
    gap: clamp(20px, 4vw, 34px);
}

.facebook-feed-info {
    position: sticky;
    top: calc(var(--header-h, 88px) + 24px);
    padding: clamp(24px, 4vw, 34px);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(5, 43, 96, .96), rgba(24, 119, 242, .9));
    color: #fff;
    box-shadow: var(--shadow);
}

.facebook-feed-info h3 {
    margin: 18px 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.facebook-feed-info p {
    color: rgba(255,255,255,.86);
    line-height: 1.7;
    margin-bottom: 22px;
}

.facebook-feed-info .btn {
    width: 100%;
}

.facebook-frame-wrap {
    width: min(500px, 100%);
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.facebook-feed-card {
    width: 100%;
}

.facebook-feed-card iframe {
    width: 100%;
    min-height: min(760px, 82vh);
    border: 0;
}

@media (max-width: 900px) {
    .facebook-feed-layout {
        grid-template-columns: 1fr;
    }
    .facebook-feed-info {
        position: static;
    }
}

@media (max-width: 560px) {
    .media-quick-card {
        min-height: 0;
    }
    .facebook-feed-info .btn,
    .facebook-feed-fallback .btn {
        width: 100%;
    }
}


/* Facebook feed only Media page - large viewer */
.media-page-hero {
    min-height: clamp(460px, 58svh, 680px);
}

.facebook-feed-section {
    background: linear-gradient(180deg, var(--bg), rgba(24, 119, 242, .06));
}

.facebook-feed-card-large {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(14px, 3vw, 30px);
    border-radius: clamp(22px, 4vw, 38px);
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .14);
    text-align: center;
}

.facebook-frame-wrap-large {
    width: min(500px, 100%);
    margin: 0 auto;
    border-radius: clamp(16px, 3vw, 26px);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 18px 55px rgba(15, 23, 42, .12);
}

.facebook-frame-wrap-large iframe {
    display: block;
    width: 100%;
    min-height: 900px;
    border: 0;
    background: #fff;
}

.facebook-feed-fallback {
    margin-top: 22px;
}

.facebook-feed-fallback p {
    margin: 0 0 14px;
    color: var(--muted);
}

@media (max-width: 700px) {
    .facebook-feed-card-large {
        width: min(100%, calc(100% - 20px));
        padding: 10px;
        border-radius: 22px;
    }

    .facebook-frame-wrap-large iframe {
        min-height: 760px;
    }
}


/* KCBC Video Library */
.video-library-hero {
    background: linear-gradient(135deg, rgba(98,33,17,.95), rgba(151,51,25,.74));
}
.video-viewer .video-stage {
    width: min(1120px, 96vw);
    height: auto;
    max-height: 92vh;
}
.video-stage video {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    border: 0;
    border-radius: 18px;
    background: #111;
    box-shadow: 0 22px 60px rgba(0,0,0,.5);
}
@media (max-width: 640px) {
    .video-stage video { min-height: 220px; }
}
