:root {
    --primary-color: #2a3d45;
    --secondary-color: #e76f51;
    --accent-color: #f4a261;
    --text-light: #f8f9fa;
    --text-dark: #264653;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --nav-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #eee;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-script: 'Dancing Script', cursive;

    --transition: all 0.3s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #f4a261;
    /* Swap primary to accent for better visibility on dark */
    --secondary-color: #e76f51;
    --accent-color: #2a3d45;
    --text-light: #121212;
    --text-dark: #f8f9fa;
    --white: #1a1a1a;
    --bg-light: #121212;
    --nav-bg: #1a1a1a;
    --card-bg: #242424;
    --border-color: #333;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    hyphens: auto;
}

/* The hidden attribute must always win.
   The browser's own stylesheet says `[hidden] { display: none }`, but that is a
   USER-AGENT rule, so ANY author rule that sets display on the same element
   silently beats it — `.watch-live-badge { display: inline-flex }` left the red
   "WE ARE LIVE NOW" banner on screen permanently even though the script had set
   `hidden = true`. Nothing errors; the element simply refuses to disappear.
   One !important here immunises every current and future use of the attribute. */
[hidden] {
    display: none !important;
}

/* --- Prose: long-form admin-entered text (bios, event particulars, news
   bodies, sermon notes). Paired with js/rich-text.js, which emits real <p> and
   list elements instead of one crammed run of text.

   Paragraphs are separated by space, NOT by a first-line indent. Indent-and-
   space together is the classic typographic error — printed books indent
   because they have no space between paragraphs; screens use space. Body copy
   sits at 1.05rem/1.8, which is the range Medium, Substack and most news sites
   converged on for comfortable reading. --- */
.prose {
    line-height: 1.8;
    overflow-wrap: break-word;
}

.prose>p,
.prose>ul,
.prose>ol {
    margin: 0 0 1.15em;
}

.prose> :last-child {
    margin-bottom: 0;
}

.prose>ul,
.prose>ol {
    padding-left: 1.35em;
}

.prose li {
    margin-bottom: 0.45em;
}

.prose li:last-child {
    margin-bottom: 0;
}

/* Opt-in reading measure. ~68 characters per line is the readability sweet
   spot; only useful where the container is wider than that. */
.prose-measure {
    max-width: 68ch;
}

/* Slightly larger opening paragraph for full article bodies. */
.prose-lead>p:first-child {
    font-size: 1.06em;
    color: inherit;
}


h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- Countdown Bar --- */
.countdown-bar {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 0.5rem 5%;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1100;
}

.countdown-bar span {
    color: var(--accent-color);
    margin-left: 5px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* --- Header & Nav --- */
header {
    background-color: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 34px;
    /* Adjusted to sit below the countdown bar */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}


header.scrolled {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    /* Adds a nice frosted glass effect */
    padding: 0.7rem 5%;
    /* Subtle shrink effect too */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}


.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dark);
    letter-spacing: 0.8px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.cta-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    /* Slightly easier than perfect square */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- Accordion Styles --- */
.accordion {
    max-width: 800px;
    margin: 2rem auto;
}

.accordion-item {
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: rgba(42, 61, 69, 0.05);
}

.accordion-header i {
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
    color: var(--text-dark);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    /* Large enough for content */
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.quick-action-bar {
    z-index: 10;
    position: relative;
}



/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

.reveal-delay-3 {
    transition-delay: 0.6s;
}


/* --- Hero Section --- */

.hero {
    position: relative;
    background-color: var(--primary-color);
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
    color: var(--white);
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(42, 61, 69, 0.8) 0%, rgba(42, 61, 69, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    max-width: 600px;
    z-index: 3;
    position: relative;
}

.hero-mission {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    /* Reduced by ~3px (from 1.1rem/17.6px to 0.95rem/15px) */
    max-width: 450px;
    margin-left: -5px;
    /* Shifting slightly to the left */
    line-height: 1.5;
    opacity: 0.9;
}


/* --- Inner Page Hero --- */
.inner-hero {
    background-size: cover;
    background-position: center;
    padding: 6rem 5%;
    text-align: center;
    color: var(--white);
    position: relative;
}

.inner-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(42, 61, 69, 0.7), rgba(42, 61, 69, 0.6));
    z-index: 1;
}

.inner-hero>* {
    position: relative;
    z-index: 2;
}


.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-script {
    font-family: var(--font-script);
    color: var(--accent-color);
    font-weight: 400;
}

/* The "Brush Stroke" Divider Effect */
.brush-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.brush-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.brush-path {
    fill: #ffffff;
}

/* --- Content Sections --- */
.section {
    padding: 5rem 5%;
}

/* .container was used on nearly every page but never actually defined, so it
   carried no styles at all. That went unnoticed while containers ran full width
   — .section's symmetric 5% padding does the framing — but any page that added
   an inline `max-width` got a narrowed block pinned to the LEFT edge instead of
   a centred column (sermons, watch, roster and the prayer wall all did).

   Auto side margins are the whole fix, and deliberately nothing else: no width
   and no max-width here, so a full-width container computes these to 0 and is
   completely unaffected — including the right-aligned flex one on the roster.
   Longhand rather than margin-inline, for older Android browsers. */
.container {
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 3rem 5%;
    text-align: center;
}

.footer-content h4 {
    color: var(--accent-color);
}

/* --- Cards/Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}


.card {
    background: var(--white);
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1050;
    }

    .nav-links.active {
        right: 0;
    }

    .cta-buttons {
        display: none;
        /* Hide buttons on mobile header, can add inside menu if needed */
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    /* Hamburger Animation to X */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }

    /* Mobile toggles alignment */
    .toggles-item {
        margin: 2rem 0;
    }

    .toggles-container {
        gap: 8px;
    }
}


/* --- Form Styles --- */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(231, 111, 81, 0.1);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(42, 61, 69, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* --- Floating Welcome Hub --- */
.welcome-hub {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.hub-button {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(231, 111, 81, 0.4);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hub-button:hover {
    transform: scale(1.1);
    background-color: var(--accent-color);
}

.hub-button i {
    transition: transform 0.3s ease;
}

.welcome-hub.active .hub-button {
    background-color: var(--primary-color);
}

.welcome-hub.active .hub-button i {
    transform: rotate(90deg);
}

.hub-card {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.welcome-hub.active .hub-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hub-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.hub-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.hub-item i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.hub-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.hub-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.hub-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

@media (max-width: 480px) {
    .hub-card {
        width: calc(100vw - 60px);
        right: 0;
    }
}

/* --- Theme Toggle --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 45px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--secondary-color);
}

input:checked+.slider:before {
    transform: translateX(21px);
}

.theme-icon {
    font-size: 0.9rem;
    margin: 0 5px;
    color: var(--text-dark);
}

/* --- Toggles Container (Theme + Language stacked) --- */
.toggles-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.lang-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 3px;
}

.lang-label {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 14px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Smaller language toggle switch */
.lang-switch-wrapper .theme-switch {
    height: 14px;
    width: 28px;
}

.lang-switch-wrapper .slider:before {
    height: 10px;
    width: 10px;
    bottom: 2px;
    left: 2px;
}

.lang-switch-wrapper input:checked+.slider:before {
    transform: translateX(14px);
}


/* --- Prayer Wall Styles --- */
.prayer-form-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.prayer-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.prayer-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.2s ease;
}

.prayer-card:hover {
    transform: translateX(5px);
}

.prayer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.prayer-author {
    font-weight: 700;
    color: var(--primary-color);
}

.prayer-time {
    color: #888;
}

.prayer-content {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.prayer-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.amen-btn {
    background: none;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.amen-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.amen-btn.active {
    background: var(--secondary-color);
    color: white;
}

.amen-count {
    font-size: 0.9rem;
    font-weight: 700;
}

/* --- Congregation Gallery --- */
.congregation-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 3rem;
    padding: 0 5%;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 250px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 100%;
    }
}

/* Update leadership section background for dark mode */
[data-theme="dark"] section[style*="background-color: #f9f9f9"] {
    background-color: #1a1a1a !important;
}

/* --- Global Affiliations --- */
.affiliations {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: center;
}

.affiliate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    opacity: 0.7;
    filter: grayscale(100%);
}

.affiliate-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    color: var(--accent-color);
}

.affiliate-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* --- Bilingual Branding & Subtitles --- */
.bilingual-tag {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

.heritage-badge {
    display: inline-block;
    background: var(--accent-color);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* --- General Fixes & Additions --- */
.text-justify {
    text-align: justify;
}

.section-subtitle {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.hero-badge-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    /* Prevent wrapping to keep them on the same line */
}

.hero-badge-container .heritage-badge {
    margin-bottom: 0;
}

.hero-lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    height: 24px;
    /* Fixed height for stability */
}

.hero-lang-switch .lang-label {
    color: #ffffff !important;
    font-size: 0.65rem;
    /* Slightly smaller text */
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    width: 18px;
    /* Fixed width to prevent jumping when labels change content (though here labels are static EN/FJ) */
    text-align: center;
}

.hero-lang-switch .theme-switch {
    height: 12px;
    /* Smaller switch */
    width: 24px;
}

.hero-lang-switch .slider:before {
    height: 8px;
    /* Smaller knob */
    width: 8px;
    bottom: 2px;
    left: 2px;
}

.hero-lang-switch input:checked+.slider:before {
    transform: translateX(12px);
    /* Adjusted for smaller width */
}

@media (max-width: 768px) {
    .hero-badge-container {
        justify-content: flex-start;
        gap: 10px;
    }
}


/* ==========================================================================
   Accessibility: skip-to-content
   Hidden until focused, then drops in over the countdown bar. Keyboard and
   screen-reader users get past 8 nav links in one keystroke.
   ========================================================================== */

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateY(-200%);
    z-index: 2000;
    background: var(--secondary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateX(-50%) translateY(0);
}

/* Give every interactive element a visible focus ring — the browser default
   was disappearing against both the dark navbar and the orange buttons. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* The main landmark is focusable so the skip link can move the caret there,
   but it must not draw a ring when it merely receives focus. */
main:focus {
    outline: none;
}


/* ==========================================================================
   Navbar: fitting 8 items
   Roster and Sermons pushed the desktop nav past a comfortable width, so the
   gap tightens progressively instead of wrapping. The 768px drawer is
   unchanged except that it scrolls now — 8 links plus the toggles overflowed
   a short phone screen.
   ========================================================================== */

.nav-links {
    gap: 1.25rem;
}

/* Two-word labels ("Prayer Wall") were wrapping onto a second line and making
   that one item taller than its neighbours. */
.nav-links a {
    white-space: nowrap;
}

@media (max-width: 1180px) and (min-width: 769px) {
    .nav-links {
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 0.7rem;
        letter-spacing: 0.4px;
    }

    .logo {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        justify-content: flex-start;
        padding-top: 5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* The drawer is height:100vh, so without border-box the padding above
           makes it 80px TALLER than the screen and the last item can never be
           scrolled into view on a short phone (tested at 375x667). */
        box-sizing: border-box;
    }

    .nav-links li {
        margin: 1.05rem 0;
        /* Never let a link shrink away when 9 rows compete for a short screen. */
        flex-shrink: 0;
    }
}


/* ==========================================================================
   Social icons (footer) + share buttons
   Both are injected by js/site-config.js, and only where a real URL exists.
   ========================================================================== */

.social-row-label {
    margin: 2rem 0 0.8rem;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.75;
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover,
.social-icon:focus-visible {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.share-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    opacity: 0.7;
    margin-right: 0.2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover,
.share-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-wa:hover {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.share-fb:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
}


/* ==========================================================================
   Giving: mobile wallets + printable QR
   ========================================================================== */

.give-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.8rem;
    margin: 1.5rem 0 0;
    text-align: center;
}

.give-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    color: var(--accent-color);
}

.give-card-sub {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 1.3rem;
}

.give-wallets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.give-wallet {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    min-width: 190px;
    text-align: left;
}

.give-wallet-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.give-wallet-name span {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.35rem;
}

.give-wallet-number {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.give-number {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.give-copy {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: inherit;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.give-copy:hover {
    background: var(--secondary-color);
}

.give-copy.copied {
    background: #1e8e5a;
}

.give-qr {
    margin-top: 1.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.give-qr img {
    width: 200px;
    max-width: 100%;
    height: auto;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
}

.give-qr p {
    font-size: 0.82rem;
    opacity: 0.85;
    margin: 0.8rem 0 1rem;
}

/* FJD figures under each progress bar. Written by the project_progress
   collection; the element stays empty (and hidden) until a real amount is
   entered in the dashboard, so we never display a made-up total. */
.progress-amount {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 0.45rem;
}

.progress-amount:empty {
    display: none;
}


/* ==========================================================================
   Contact: map + Your First Visit
   ========================================================================== */

.map-embed {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 600px) {
    .map-embed {
        height: 300px;
    }
}

.first-visit-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2.5rem;
}

@media (max-width: 900px) {
    .first-visit-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.first-visit-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.first-visit-photos img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.first-visit-photos img:first-child {
    grid-column: 1 / -1;
    min-height: 220px;
}

/* Minute-by-minute list — the point is to answer "what happens if I show up?"
   concretely enough that a stranger can picture it. */
.visit-timeline {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.visit-timeline li {
    position: relative;
    margin-left: 0.5rem;
    padding: 0 0 1.5rem 2.2rem;
    border-left: 2px solid var(--border-color);
}

.visit-timeline li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.visit-timeline li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.visit-timeline .t-time {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    margin-bottom: 0.2rem;
}

.welcome-banner {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.welcome-banner h3 {
    font-family: var(--font-script);
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}


/* ==========================================================================
   Roster (Vakarau ni Sigatabu)
   A table on desktop; on phones each row becomes its own labelled card, which
   is the only way a 6-column roster stays readable at 375px.
   ========================================================================== */

.roster-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

.roster-table th {
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.9rem 1rem;
    text-align: left;
}

.roster-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.92rem;
    vertical-align: top;
}

.roster-table tr.is-next {
    background: rgba(231, 111, 81, 0.08);
}

.roster-table tr.is-next td {
    border-top-color: var(--secondary-color);
}

.roster-date {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

.roster-next-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.35rem;
}

.roster-hymns {
    font-variant-numeric: tabular-nums;
}

.roster-group {
    display: inline-block;
    background: #e7f5ee;
    color: #1e8e5a;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
}

[data-theme="dark"] .roster-group {
    background: rgba(30, 142, 90, 0.22);
    color: #6ee7a8;
}

@media (max-width: 820px) {

    .roster-table thead {
        display: none;
    }

    .roster-table,
    .roster-table tbody,
    .roster-table tr,
    .roster-table td {
        display: block;
        width: 100%;
    }

    .roster-table {
        background: transparent;
        box-shadow: none;
    }

    .roster-table tr {
        background: var(--white);
        border-radius: 12px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
        margin-bottom: 1.2rem;
        padding: 0.4rem 0;
    }

    .roster-table td {
        border-top: none;
        padding: 0.45rem 1.1rem;
    }

    /* Each <th> label is repeated into data-label so a cell keeps its meaning
       once the header row is hidden. */
    .roster-table td::before {
        content: attr(data-label);
        display: block;
        font-family: var(--font-heading);
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        opacity: 0.6;
        margin-bottom: 0.15rem;
    }

    .roster-table td.roster-cell-date::before {
        content: none;
    }

    .roster-table td.roster-cell-date {
        background: var(--primary-color);
        border-radius: 10px 10px 0 0;
        margin: -0.4rem 0 0.5rem;
        padding: 0.9rem 1.1rem;
    }

    .roster-table td.roster-cell-date .roster-date {
        color: #fff;
        font-size: 1.05rem;
    }

    .roster-table tr.roster-notes-row {
        margin-top: -1.2rem;
        margin-bottom: 1.4rem;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .roster-table td.roster-notes-cell {
        padding: 0 !important;
    }

    .roster-table td.roster-notes-cell::before {
        display: none !important;
    }

    .roster-notes-card {
        padding: 1.1rem 1.2rem;
        border-radius: 0 0 12px 12px;
        border-top: none;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    }
}

/* Roster Notes (Blog-style formatted body) */
.roster-table tr.has-notes-row td {
    border-bottom: none;
}

.roster-table tr.roster-notes-row td {
    padding: 0 1rem 1.25rem 1rem;
    border-top: none;
}

.roster-notes-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--secondary-color, #e76f51);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-top: 0.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .roster-notes-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color, #e76f51);
}

.roster-notes-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--secondary-color, #e76f51);
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--border-color, #cbd5e1);
}

[data-theme="dark"] .roster-notes-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.roster-notes-header i {
    font-size: 1rem;
}

.roster-notes-body {
    font-family: var(--font-body, 'Open Sans', sans-serif);
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text-color, #2a3d45);
}

[data-theme="dark"] .roster-notes-body {
    color: #e2e8f0;
}

.roster-notes-body p {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.roster-notes-body p:last-child {
    margin-bottom: 0;
}

.roster-notes-body ul, 
.roster-notes-body ol {
    margin: 0.6rem 0 1rem 1.4rem;
    padding: 0;
}

.roster-notes-body li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}



/* ==========================================================================
   Watch Live
   ========================================================================== */

.watch-status {
    text-align: center;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 2.2rem 1.5rem;
    margin-bottom: 2.5rem;
    border-top: 5px solid var(--secondary-color);
}

.watch-status.is-live {
    border-top-color: #c0392b;
}

.watch-status-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
    margin-bottom: 0.4rem;
}

.watch-countdown {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .watch-countdown {
        font-size: 1.9rem;
    }
}

/* "We are live now" — the red dot pulses so the state reads at a glance. */
.watch-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: #c0392b;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
}

.live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.75);
    }
}

/* Respect a reduced-motion preference — a pulsing dot is exactly the kind of
   thing that triggers discomfort, and the badge still reads without it. */
@media (prefers-reduced-motion: reduce) {
    .live-dot {
        animation: none;
    }
}

.watch-times {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.6rem;
    margin-top: 1.4rem;
    font-size: 0.9rem;
}

.watch-times i {
    color: var(--secondary-color);
    margin-right: 0.4rem;
}

.watch-time-local {
    font-weight: 700;
    color: var(--secondary-color);
}

.watch-video {
    margin-bottom: 0;
}

/* Shown while no stream URL is configured — honest rather than a dead frame. */
.watch-placeholder {
    text-align: center;
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 3rem 1.8rem;
}

.watch-placeholder i {
    font-size: 2.6rem;
    color: var(--secondary-color);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.watch-placeholder h3 {
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

.watch-placeholder p {
    max-width: 480px;
    margin: 0 auto;
    font-size: 0.95rem;
}


/* ==========================================================================
   Prayer Wall — pinned prayer + moderation notice
   ========================================================================== */

/* The circuit minister's standing prayer. Marked apart from the moderated feed
   so it doesn't read as just another submission. */
.prayer-pinned {
    border-left: 5px solid var(--accent-color);
    background: linear-gradient(to right, rgba(244, 162, 97, 0.07), transparent);
}

.prayer-moderation-note {
    margin-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
    opacity: 0.75;
}

.amen-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

/* Pending-moderation counter on the dashboard tab. */
.tab-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 0.4rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: #c0392b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    vertical-align: text-top;
}

.tab-badge:empty {
    display: none;
}

/* A prayer awaiting approval, in the dashboard list. */
.pending-row {
    border-left: 4px solid #d9822b;
}

.prayer-admin-text {
    flex: 1;
    font-size: 0.93rem;
    line-height: 1.55;
}

.prayer-admin-meta {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #778;
}

.btn-approve {
    background: #e7f5ee;
    color: #1e8e5a;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 0.4rem;
}

.btn-approve:hover {
    background: #cdebdb;
}


/* ==========================================================================
   Sermons library
   ========================================================================== */

.sermon-list {
    display: grid;
    gap: 1.8rem;
    margin-top: 2.5rem;
}

.sermon-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 1.8rem;
    border-left: 5px solid var(--secondary-color);
}

.sermon-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
}

.sermon-card h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.sermon-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sermon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 0.7rem 0 1rem;
    font-size: 0.85rem;
    color: #667;
}

[data-theme="dark"] .sermon-meta {
    color: #aab;
}

.sermon-meta i {
    color: var(--secondary-color);
    margin-right: 0.35rem;
}

.sermon-scripture {
    font-style: italic;
}

.sermon-card audio {
    width: 100%;
    margin: 0.5rem 0 1rem;
}

/* 16:9 wrapper so a YouTube/Facebook iframe scales on a phone instead of
   overflowing the card. */
.sermon-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin: 0.5rem 0 1rem;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.sermon-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sermon-notes {
    font-size: 0.93rem;
    line-height: 1.7;
    white-space: pre-line;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: #778;
    font-style: italic;
}

[data-theme="dark"] .empty-state {
    color: #99a;
}

.empty-state i {
    display: block;
    font-size: 2.4rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    font-style: normal;
}


/* ==========================================================================
   Print — a giving poster for the noticeboard, and readable roster handouts.
   Everything navigational is dropped so one clean page can be pinned up.
   ========================================================================== */

@media print {

    .countdown-bar,
    header,
    .hamburger,
    .quick-action-bar,
    .welcome-hub,
    .share-row,
    .social-row,
    .social-row-label,
    .give-print,
    footer .affiliations,
    .brush-divider,
    .video-background,
    .hero-overlay {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .give-card,
    .donation-box {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #000;
        page-break-inside: avoid;
    }

    .give-wallet {
        background: #fff !important;
        border: 1px solid #666;
    }

    .give-qr img {
        border: 1px solid #000;
    }

    .roster-table tr,
    .sermon-card {
        page-break-inside: avoid;
    }
}