/* ================================================================
   KEMC ENGLISH MINISTRY — Shared Stylesheet
   Palette: Light & Airy · Sage Green accent · Cormorant + DM Sans
================================================================ */

:root {
    --navy:        #1e2d5a;
    --navy-deep:   #152244;
    --navy-mid:    #2a3d78;
    --cream:       #f8f5f0;
    --cream-dark:  #e8e0d5;
    --sage:        #4a7c6f;
    --sage-light:  #5e9488;
    --text:        #1e2d5a;
    --muted:       #6e6a65;
    --white:       #ffffff;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Announcement Banner ─────────────────────────────────── */
.announcement-bar {
    position: relative;
    z-index: 1100;
    background: var(--sage);
    color: white;
    text-align: center;
    padding: 0.65rem 3rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.5;
}
.announcement-bar a { color: white; font-weight: 700; text-decoration: underline; }
.announcement-bar a:hover { opacity: 0.85; }

/* ── Navigation ──────────────────────────────────────────── */
nav {
    position: sticky;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 64px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 2px 16px rgba(0,0,0,0.06);
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.nav-logo-img {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-logo .name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--navy);
}
.nav-logo .sub {
    font-size: 0.56rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage);
    font-weight: 400;
}
.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}
.nav-links a {
    color: rgba(30,45,90,0.6);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--sage); }
.nav-back {
    font-size: 0.73rem;
    color: rgba(30,45,90,0.38);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}
.nav-back:hover { color: var(--sage); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    z-index: 998;
    flex-direction: column;
    padding: 1.25rem 2rem 1.75rem;
    border-top: 1px solid var(--cream-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: rgba(30,45,90,0.75);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cream-dark);
    transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--sage); }
.mobile-nav a:last-child { border-bottom: none; color: var(--sage); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.9rem;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.25s;
}
.btn-sage {
    background: var(--sage);
    color: var(--white);
}
.btn-sage:hover {
    background: var(--sage-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74,124,111,0.32);
}
.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid rgba(30,45,90,0.3);
}
.btn-ghost:hover {
    border-color: var(--navy);
    background: rgba(30,45,90,0.05);
}
.btn-navy {
    background: var(--navy);
    color: var(--white);
}
.btn-navy:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27,44,94,0.22);
}
.btn-outline-sage {
    background: transparent;
    color: var(--sage);
    border: 1.5px solid var(--sage);
}
.btn-outline-sage:hover {
    background: var(--sage);
    color: white;
}

/* ── Section base ────────────────────────────────────────── */
section { padding: 2.5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

.s-eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sage);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.s-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.65rem, 3.5vw, 2.3rem);
    font-weight: 400;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 0.65rem;
}
.s-title span { color: var(--sage); }
.s-lead {
    font-size: 0.93rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 640px;
}
.dark .s-eyebrow { color: var(--sage-light); }
.dark .s-title   { color: var(--white); }
.dark .s-title span { color: var(--sage-light); }
.dark .s-lead    { color: rgba(255,255,255,0.6); }

/* ── Interior page header ────────────────────────────────── */
.page-header {
    background: var(--navy);
    padding: 1.5rem 2rem 1.6rem;
    text-align: center;
}
.page-header .breadcrumb {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sage-light);
    margin-bottom: 0.4rem;
}
.page-header .breadcrumb a { color: var(--sage-light); text-decoration: none; }
.page-header .breadcrumb a:hover { text-decoration: underline; }
.page-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 0.4rem;
}
.page-header p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.62);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.5);
    padding: 2.5rem 2rem 2rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand .name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.15rem;
}
.footer-brand .tagline {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sage-light);
}
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.2s;
}
.footer-nav a:hover { color: var(--sage-light); }
.footer-bottom {
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.footer-bottom a {
    color: var(--sage-light);
    text-decoration: none;
    font-weight: 500;
}
.footer-bottom a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    nav { padding: 0 1.5rem; }
    .nav-links, .nav-back { display: none; }
    .hamburger { display: flex; }
}
@media (max-width: 600px) {
    section { padding: 2rem 1.25rem; }
    .page-header { padding: 1.25rem 1.25rem 1.35rem; }
}

/* ── Photo Gallery ───────────────────────────────────────── */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.gallery-thumb {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    cursor: pointer;
    padding: 0;
    background: var(--cream-dark);
    display: block;
    width: 100%;
}
.gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(21,34,68,0.78));
    color: white;
    font-size: 0.72rem;
    padding: 1.5rem 0.75rem 0.5rem;
    text-align: left;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.gallery-thumb:hover .gallery-caption { opacity: 1; }
.gallery-placeholder {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    background: var(--cream-dark);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}
.gallery-footer {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.gallery-album-link {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage);
    text-decoration: none;
    font-weight: 600;
}
.gallery-album-link:hover { text-decoration: underline; }

/* ── Lightbox ────────────────────────────────────────────── */
#kemc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#kemc-lightbox.open { display: flex; }
.lb-backdrop {
    position: absolute; inset: 0;
    background: rgba(21,34,68,0.92);
    backdrop-filter: blur(6px);
}
.lb-panel {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 860px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.lb-img {
    max-width: 100%;
    max-height: 76vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55);
    display: block;
}
.lb-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.84rem;
    text-align: center;
    min-height: 1.2em;
}
.lb-close {
    position: fixed;
    top: 1.25rem; right: 1.5rem;
    background: none; border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
}
.lb-close:hover { color: white; }
.lb-prev, .lb-next {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white; font-size: 2rem;
    cursor: pointer; padding: 0.5rem 0.9rem;
    border-radius: 6px;
    transition: background 0.2s;
    z-index: 2;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 600px) {
    .photo-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .lb-prev { left: 0.35rem; }
    .lb-next { right: 0.35rem; }
}
