/* ============================================================
   DESIGN TOKENS & CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    /* --- Brand Colors --- */
    --prussian-blue:        #0c2645;
    --primary-dark-blue:    #0c2645;   /* alias */
    --secondary-blue:       #1a4d7a;
    --accent-light-blue:    #16425b;
    --cool-horizon:         #77a7da;
    --cool-horizon-hover:   #295E97;
    --deep-navy:            #0a1929;
    --primary-dark:         #1a1a2e;

    /* --- Neutrals --- */
    --warm-cream:           #e9f0f4;
    --lavender:             #d2d9e9;
    --ghost-white:          #f7f6fb;
    --soft-white:           #fafafa;
    --white:                #ffffff;
    --background-color:     #fff;

    /* --- Text --- */
    --text-color:           #505050;
    --text-muted:           #666;
    --text-white:           #fff;
    --soft-gray:            #8b8b8b;
    --hero-accent-text:     #7dd3fc;

    /* --- Transparent tints --- */
    --blue-tint-light:      rgba(12, 38, 69, 0.10);
    --blue-tint-medium:     rgba(12, 38, 69, 0.15);

    /* --- Typography --- */
    --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial,
                    "Noto Sans", "Liberation Sans", sans-serif,
                    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-heading: "Playfair Display", serif;
}


/* ============================================================
   BASE / RESET
   ============================================================ */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family:              var(--font-body);
    font-size:                clamp(1rem, 0.8835rem + 0.2524vw, 1.375rem);
    color:                    var(--text-color);
    background-color:         var(--background-color);
    line-height:              1.6;
    overflow-x:               hidden;
    position:                 relative;
    width:                    100%;
    -webkit-font-smoothing:   antialiased;
    -moz-osx-font-smoothing:  grayscale;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
    font-family:   var(--font-heading);
    color:         var(--primary-dark);
    margin-bottom: 0.6em;
}

h1 { font-size: clamp(2.25rem, 1.455vw + 1.725rem, 3.5rem);  font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 1.273vw + 1.29rem, 2.625rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h3 { font-size: clamp(1.375rem, 0.909vw + 1.047rem, 2rem);   font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h4 { font-size: clamp(1.125rem, 0.727vw + 0.863rem, 1.625rem); font-weight: 700; line-height: 1.25; }
h5 { font-size: clamp(1rem, 0.545vw + 0.803rem, 1.375rem);   font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.3; }
h6 { font-size: 0.9375rem;                                    font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.4; }

/* --- Body text & scale --- */
p {
    font-size:     clamp(1rem, 0.485vw + 0.825rem, 1.25rem);
    line-height:   clamp(1.5rem, 1.214vw + 1.063rem, 2.125rem);
    max-width:     75ch;
    margin-inline: auto;
    margin-bottom: 1.5rem;
    color:         var(--text-color);
    overflow-wrap: break-word;
}

/* Paragraphs inside hero / subpage-hero are left-aligned */
.hero-section p,
.subpage-hero p { margin-inline: 0; }

.lead {
    font-size:     clamp(1.25rem, 0.545vw + 1.053rem, 1.625rem);
    line-height:   1.5;
    font-weight:   400;
    color:         var(--text-muted, #555);
    margin-bottom: 2rem;
    max-width:     65ch;
}

.text-large { font-size: clamp(1.125rem, 0.364vw + 0.993rem, 1.375rem); line-height: 1.6; }
.text-small,
small       { font-size: clamp(0.875rem, 0.182vw + 0.809rem, 1rem); line-height: 1.5; }
.text-xs,
.caption    { font-size: 0.8125rem; line-height: 1.4; }

.overline {
    font-size:      0.75rem;
    font-weight:    600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height:    1.3;
    color:          var(--primary, #007acc);
}

/* --- Utility --- */
.hyphenate    { hyphens: auto; -webkit-hyphens: auto; }
.text-balance { text-wrap: balance; }
.no-margin    { margin-bottom: 0; }


/* ============================================================
   LINKS
   ============================================================ */

/* --- Base --- */
a {
    text-decoration: none;
    color:           var(--accent-light-blue);
    position:        relative;
    transition:      color 0.3s ease;
}
a:hover { text-decoration: none; color: var(--secondary-blue); }

/* Animated underline — excluded from buttons, nav, and special link types */
a:not(.btn):not([class*="btn-"]):not(.nav-link):not(.navbar-brand)
 :not(.offcanvas-link):not(.offcanvas-brand):not(.stretched-link)
 :not(.ministry-card-link):not(.back-to-top):not(.location-link)
 :not(.location-link-viadia)::after {
    content:    "";
    position:   absolute;
    bottom:     0;
    left:       0;
    width:      0;
    height:     2px;
    background: var(--accent-light-blue);
    transition: width 0.3s ease;
}
a:not(.btn):not([class*="btn-"]):not(.nav-link):not(.navbar-brand)
 :not(.offcanvas-link):not(.offcanvas-brand):not(.stretched-link)
 :not(.ministry-card-link):not(.back-to-top):not(.location-link)
 :not(.location-link-viadia):hover::after { width: 100%; }

/* Suppress animated underline on specific elements */
.team-card-contact a::after,
a.btn::after,
a[class*="btn-"]::after,
.offcanvas-link::after,
.offcanvas-brand::after,
.footer-social a::after,
.offcanvas-social a::after,
.ministry-card-link::after,
.back-to-top::after,
.contact-icon-box::after,
.location-link::after,
.location-link-viadia::after,
a:has(> img)::after { display: none !important; content: none !important; }

/* --- Context: dark-background sections (hero, cta, footer) --- */
.hero-section a:not(.btn):not([class*="btn-"]),
.cta-section a:not(.btn):not([class*="btn-"]),
.hero-service-info a:not(.btn):not([class*="btn-"]),
.footer a:not(.btn):not([class*="btn-"]):not(.footer-social a) {
    color: rgba(255, 255, 255, 0.8);
}
.hero-section a:not(.btn):not([class*="btn-"]):hover,
.cta-section a:not(.btn):not([class*="btn-"]):hover,
.hero-service-info a:not(.btn):not([class*="btn-"]):hover,
.footer a:not(.btn):not([class*="btn-"]):not(.footer-social a):hover {
    color: var(--accent-light-blue);
}
.hero-section a:not(.btn):not([class*="btn-"])::after,
.cta-section a:not(.btn):not([class*="btn-"])::after,
.hero-service-info a:not(.btn):not([class*="btn-"])::after,
.footer a:not(.btn):not([class*="btn-"]):not(.footer-social a)::after {
    background: var(--accent-light-blue);
}

/* --- Context: warm-cream background --- */
.bg-warm-cream a:not(.btn):not([class*="btn-"]) {
    color:           var(--cool-horizon-hover);
    position:        relative;
    text-decoration: none;
}
.bg-warm-cream a:not(.btn):not([class*="btn-"]):hover { color: var(--cool-horizon); }
.bg-warm-cream a:not(.btn):not([class*="btn-"])::after {
    content:          "";
    position:         absolute;
    width:            0;
    height:           2px;
    bottom:           -2px;
    left:             0;
    background-color: var(--cool-horizon);
    transition:       width 0.3s ease;
}
.bg-warm-cream a:not(.btn):not([class*="btn-"]):hover::after { width: 100%; }

/* --- Context: cards --- */
.event-card a:not(.btn):not([class*="btn-"]),
.ministry-card a:not(.btn):not([class*="btn-"]),
.testimonial-card a:not(.btn):not([class*="btn-"]) { color: var(--accent-light-blue); }
.event-card a:not(.btn):not([class*="btn-"]):hover,
.ministry-card a:not(.btn):not([class*="btn-"]):hover,
.testimonial-card a:not(.btn):not([class*="btn-"]):hover { color: var(--secondary-blue); }

/* --- Location links --- */
.location-link:hover        { color: var(--primary-dark-blue) !important; text-decoration: underline !important; }
.location-link-viadia:hover { color: #73911a !important;          text-decoration: underline !important; }
.location-link { font-size: 0.85rem; }

/* --- Footer links --- */
.footer-links a             { color: rgba(255, 255, 255, 0.6); display: inline-block; }
.footer-links a:hover       { color: var(--accent-light-blue); }
.footer-links a::after      { background: var(--accent-light-blue); }
.footer-bottom-links a      { color: rgba(255, 255, 255, 0.65); font-size: clamp(0.8rem, 0.75rem + 0.1vw, 0.9rem); transition: color 0.3s; }
.footer-bottom-links a:hover{ color: var(--accent-light-blue); }

/* Article / modal / misc inline links */
.article-section a                                               { color: var(--accent-light-blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-section a:hover                                         { color: var(--secondary-blue); text-decoration-thickness: 2px; }
.event-description a                                             { color: var(--accent-light-blue); text-decoration: underline; }
.event-description a:hover                                       { color: var(--secondary-blue); }
.hero-event-description a                                        { color: var(--accent-light-blue) !important; text-decoration: underline; transition: color 0.2s ease; }
.hero-event-description a:hover                                  { color: #5a9cc5 !important; text-decoration: underline; }
.terms-content a,
.terms-info-box a,
.terms-contact-item a,
.donation-note a,
p a:not(.btn):not([class*="btn-"]):not(.nav-link):not(.navbar-brand) { text-underline-offset: 2px; text-decoration-thickness: 1px; }
p a:not(.btn):not([class*="btn-"]):hover                         { text-decoration-thickness: 2px; }
.terms-contact-item a       { color: var(--accent-light-blue); text-decoration: none; }
.terms-contact-item a:hover { color: var(--secondary-blue); text-decoration: underline; }
.church-location a          { color: var(--accent-light-blue); text-decoration: none; transition: color 0.3s ease; }
.church-location a:hover    { color: var(--secondary-blue); text-decoration: underline; }
.ministry-link              { text-decoration: none; color: var(--accent-light-blue); font-weight: 600; font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); }
.ministry-link:hover        { color: var(--secondary-blue); }
.event-link                 { text-decoration: none; color: var(--accent-light-blue); font-weight: 600; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); }
.event-link:hover           { color: var(--secondary-blue); }


/* ============================================================
   BUTTONS
   ============================================================ */

/* --- Shared pill base --- */
.btn-light-blue,
.btn-outline-light-blue,
.btn-outline-hero,
.btn-outline-white,
.btn-cool-horizon,
.btn-cool-horizon-hero {
    border-radius:  50px;
    font-weight:    600;
    font-size:      clamp(0.9rem, 0.85rem + 0.15vw, 1rem);
    transition:     all 0.3s;
    letter-spacing: 0.5px;
    padding:        0.85rem 2.2rem;
}

/* --- Solid variants --- */
.btn-light-blue       { background: var(--accent-light-blue); color: white; border: none; }
.btn-light-blue:hover { background: var(--cool-horizon);      color: white; }

.btn-cool-horizon-hero       { background: var(--cool-horizon); color: var(--white); border: 2px solid var(--cool-horizon); }
.btn-cool-horizon-hero:hover { background: var(--white); color: var(--cool-horizon-hover); border-color: var(--white); }

.btn-cool-horizon       { background: var(--cool-horizon); color: var(--white); border: 2px solid var(--cool-horizon); }
.btn-cool-horizon:hover { background: var(--accent-light-blue); color: var(--white); border-color: var(--accent-light-blue); }

/* --- Outlined variants --- */
.btn-outline-light-blue       { background: transparent; border: 2px solid var(--accent-light-blue); color: var(--accent-light-blue); }
.btn-outline-light-blue:hover { background: var(--cool-horizon); border-color: var(--cool-horizon); color: white; }

.btn-outline-hero       { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: white; }
.btn-outline-hero:hover { border-color: var(--cool-horizon); color: var(--cool-horizon) !important; }

.btn-outline-white       { border: 2px solid rgba(255,255,255,0.3); color: white; }
.btn-outline-white:hover { border-color: var(--accent-light-blue); color: var(--accent-light-blue) !important; background: transparent; transform: translateY(-2px); }

/* Ensure colour props cascade correctly */
.btn-light-blue,
.btn-light-blue:hover             { color: white; }
.btn-outline-light-blue           { color: var(--accent-light-blue); }
.btn-outline-light-blue:hover     { color: white; }
.btn-outline-hero                 { color: #fff; }
.btn-outline-hero:hover           { color: var(--hero-accent-text); }
.btn-outline-white                { color: #fff; }
.btn-outline-white:hover          { color: var(--accent-light-blue); }

/* --- Text / link-style buttons --- */
.btn-link-light {
    background:      transparent;
    border:          none;
    color:           white;
    padding:         0.5rem 0;
    font-weight:     500;
    text-decoration: none;
    position:        relative;
    transition:      color 0.3s ease;
    display:         inline-block;
}
.btn-link-light::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: white; transition: width 0.3s ease; }
.btn-link-light:hover  { color: white; background: transparent; }
.btn-link-light:hover::after { width: 100%; }
.btn-link-light:focus,
.btn-link-light:focus-visible { box-shadow: none; outline: 2px solid white; outline-offset: 2px; }
.btn-link-light, .btn-link-light:hover { color: white; }

.link-white {
    display:         inline-block;
    color:           white;
    text-decoration: none;
    font-weight:     500;
    font-size:       clamp(0.9rem, 0.85rem + 0.15vw, 1rem);
    padding:         0.5rem 0;
    position:        relative;
    transition:      color 0.3s ease;
}
.link-white::after      { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: white !important; transition: width 0.3s ease; }
.link-white:hover       { color: white !important; }
.link-white:hover::after{ width: 100%; }
.link-white i           { position: relative; bottom: 1px; }

/* --- Size variants --- */
.btn-sm { padding: 0.4rem 1rem;  font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); border-radius: 50px; line-height: 1.5; }
.btn-lg { padding: 1rem 2.5rem;  font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem);    border-radius: 50px; line-height: 1.5; }

/* Border compensation for outlined + sized */
.btn-outline-light-blue.btn-sm,
.btn-outline-white.btn-sm { padding: 0.35rem 0.95rem; }
.btn-outline-light-blue.btn-lg,
.btn-outline-white.btn-lg { padding: 0.95rem 2.45rem; }

.btn-sm i     { font-size: 0.9rem; }
.btn-sm .ph,
.btn-sm .bi   { font-size: 1rem; vertical-align: -0.125em; }

/* --- Navbar button overrides --- */
.navbar .btn-sm              { padding: 0.35rem 1rem; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); }
.navbar .btn-outline-white.btn-sm { border-width: 1.5px; }

.navbar .btn-outline-light {
    border-color:  rgba(255,255,255,0.6);
    color:         white;
    border-radius: 50px;
    padding:       0.4rem 1.5rem;
    font-weight:   500;
    transition:    all 0.3s;
}
.navbar.scrolled .btn-outline-light       { border-color: var(--accent-light-blue); color: var(--accent-light-blue); }
.navbar.scrolled .btn-outline-light:hover { background: var(--accent-light-blue); color: white; }

.navbar .btn-kolehti {
    color:         #fff;
    border:        2px solid #fff;
    background:    transparent;
    padding:       0.35rem 1rem;
    border-radius: 50px;
    font-weight:   500;
    font-size:     clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem);
    transition:    all 0.3s ease;
}
.navbar .btn-kolehti:hover         { background: var(--cool-horizon); color: var(--white); border-color: var(--cool-horizon); transform: translateY(-1px); }
.navbar .btn-kolehti:focus-visible { outline: 2px solid var(--hero-accent-text); outline-offset: 2px; }
.navbar.scrolled .btn-kolehti      { color: var(--accent-light-blue); border-color: var(--accent-light-blue); background: transparent; }
.navbar.scrolled .btn-kolehti:hover{ background: var(--accent-light-blue); color: #fff; border-color: var(--accent-light-blue); }
.navbar.scrolled .btn-kolehti:focus-visible { outline-color: var(--accent-light-blue); }

.navbar.scrolled .navbar-nav .btn-outline-white.btn-sm,
.navbar.scrolled .btn-outline-white.btn-sm       { border-color: var(--accent-light-blue); color: var(--accent-light-blue) !important; }
.navbar.scrolled .navbar-nav .btn-outline-white.btn-sm:hover,
.navbar.scrolled .btn-outline-white.btn-sm:hover { background-color: var(--accent-light-blue); border-color: var(--accent-light-blue); color: #fff !important; }

/* --- Responsive button group (stacked on mobile) --- */
.btn-group-stack        { width: 100%; }
.btn-group-stack .btn   { flex: 1 1 auto; min-width: 200px; text-align: center; }

/* --- Donation-specific buttons --- */
.btn-give-active   { background: var(--accent-light-blue); color: white; }
.btn-amount-active { background: var(--accent-light-blue); color: white; }

.donation-quick-copy {
    padding:     0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size:   clamp(0.9rem, 0.85rem + 0.15vw, 1rem);
    box-shadow:  0 4px 15px rgba(22,66,91,0.2);
    transition:  all 0.3s ease;
}
.donation-quick-copy:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(22,66,91,0.3); }
.donation-quick-copy:active { transform: translateY(0); }

/* Copy icon button */
.btn-copy {
    background: var(--blue-tint-light);
    border:     none;
    width:      38px;
    height:     38px;
    border-radius: 8px;
    display:    flex;
    align-items:center;
    justify-content: center;
    color:      var(--accent-light-blue);
    cursor:     pointer;
    transition: all 0.3s ease;
    flex-shrink:0;
}
.btn-copy:hover  { background: var(--accent-light-blue); color: white; transform: translateY(-2px); }
.btn-copy:active { transform: translateY(0); }
.btn-copy.copied { background: #28a745; color: white; }
.btn-copy i      { font-size: 1rem; transition: transform 0.2s ease; }
.btn-copy:hover i{ transform: scale(1.1); }
.btn-copy.copied i { animation: copySuccess 0.3s ease; }


/* ============================================================
   FOCUS STYLES (Keyboard Accessibility)
   ============================================================ */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible { outline: 2px solid var(--accent-light-blue); outline-offset: 2px; }

/* White outlines on dark backgrounds */
.navbar .nav-link:focus-visible,
.btn-outline-white:focus-visible,
.offcanvas-close:focus-visible,
.back-to-top:focus-visible,
.sermon-play-btn:focus-visible,
.footer-social a:focus-visible,
.navbar-toggler:focus-visible,
.donation-quick-copy:focus-visible,
.donation-close-btn:focus-visible,
.terms-close-btn:focus-visible { outline: 2px solid white; outline-offset: 3px; }

/* Blue outlines on light backgrounds */
.navbar.scrolled .nav-link:focus-visible,
.navbar.scrolled .navbar-toggler:focus-visible,
.btn-light-blue:focus-visible,
.btn-outline-light-blue:focus-visible,
.offcanvas-link:focus-visible,
.sermon-list-item:focus-visible,
.footer a:focus-visible,
.btn-copy:focus-visible,
.terms-modal-footer .btn:focus-visible { outline: 2px solid var(--accent-light-blue); outline-offset: 2px; }

/* Kolehti button */
.navbar .btn-kolehti:focus-visible { outline: 2px solid var(--hero-accent-text); outline-offset: 2px; }


/* ============================================================
   SECTION LAYOUT & DECORATIVE UTILITIES
   ============================================================ */
.section-padding { padding: 6rem 0; }

.section-label {
    display:        inline-flex;
    align-items:    center;
    gap:            0.5rem;
    color:          var(--accent-light-blue);
    font-weight:    600;
    font-size:      clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom:  1rem;
}
.section-label::before,
.section-label::after { content: ""; width: 30px; height: 1px; background: var(--accent-light-blue); }
.section-label-light-blue { color: var(--accent-light-blue); }

.section-title {
    font-size:      clamp(2rem, 1.5rem + 1.5vw, 3rem);
    font-weight:    700;
    color:          var(--primary-dark);
    margin-bottom:  1rem;
    letter-spacing: -0.015em;
}
.section-subtitle {
    font-size:   clamp(1rem, 0.95rem + 0.15vw, 1.1rem);
    color:       #595959;
    max-width:   600px;
    margin:      0 auto;
    line-height: 1.8;
}

.featured-sermon-title {
    font-size:     clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem);
    font-weight:   700;
    color:         var(--primary-dark);
    margin-bottom: 1rem;
    line-height:   1.3;
}

/* Decorative elements */
.bg-warm-cream { background: var(--warm-cream); }

.light-blue-divider {
    width:         60px;
    height:        3px;
    background:    var(--accent-light-blue);
    border-radius: 2px;
}
.gradient-border { position: relative; }
.gradient-border::after {
    content:    "";
    position:   absolute;
    bottom:     0;
    left:       50%;
    transform:  translateX(-50%);
    width:      80px;
    height:     3px;
    background: linear-gradient(90deg, transparent, var(--accent-light-blue), transparent);
}
.text-light-blue { color: var(--accent-light-blue) !important; }
.spinner-border.text-light-blue { color: var(--accent-light-blue) !important; }

/* Scroll animation */
.animate-fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-fade-in.visible { opacity: 1; transform: translateY(0); }


/* ============================================================
   NAV ITEMS (breadcrumb / in-page nav lists)
   ============================================================ */
.nav-item { display: flex; align-items: center; }

.nav-item > .nav-link {
    color:      var(--accent-light-blue);
    position:   relative;
    padding:    0.5rem 1rem;
    transition: color 0.3s ease;
}
.nav-item > .nav-link::after {
    content:    "";
    position:   absolute;
    bottom:     0;
    left:       50%;
    transform:  translateX(-50%);
    width:      0;
    height:     2px;
    background: var(--accent-light-blue);
    transition: width 0.3s ease, background 0.3s ease;
}
.nav-item > .nav-link:hover       { color: var(--cool-horizon); }
.nav-item > .nav-link:hover::after{ width: 85%; background: var(--cool-horizon); }

/* Separator pipe between nav items */
.nav.justify-content-center .nav-item:not(:last-child)::after {
    content:        "|";
    color:          var(--accent-light-blue);
    opacity:        0.5;
    font-weight:    300;
    display:        inline-block;
    vertical-align: middle;
}

/* Subpage-hero overrides (white text on dark bg) */
.subpage-hero-content .nav.justify-content-center .nav-item:not(:last-child)::after,
.subpage-hero-content .nav-item:not(:last-child)::after { color: rgba(255,255,255,0.5); }
.subpage-hero-content .nav-link          { color: rgba(255,255,255,0.85); }
.subpage-hero-content .nav-link::after   { background: rgba(255,255,255,0.85); }
.subpage-hero-content .nav-link:hover    { color: var(--hero-accent-text); }
.subpage-hero-content .nav-link:hover::after { background: var(--hero-accent-text); }


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    padding-top:    calc(1rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 1rem;
    padding-left:   env(safe-area-inset-left, 0px);
    padding-right:  env(safe-area-inset-right, 0px);
    transition:     all 0.4s ease;
    background:     transparent !important;
}

/* iOS safe-area fill strip */
.navbar.fixed-top::before {
    content:    "";
    position:   absolute;
    top:        calc(-1 * env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    height:     env(safe-area-inset-top, 0px);
    background: transparent;
    transition: background 0.4s ease;
    z-index:    1;
}
.navbar.scrolled.fixed-top::before { background: rgba(255,255,255,0.97); }

.navbar.scrolled {
    background:     rgba(255,255,255,0.97) !important;
    box-shadow:     0 2px 30px rgba(0,0,0,0.08);
    padding-top:    calc(0.5rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.5rem;
}

/* Brand */
.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size:   clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem);
    color:       white !important;
    transition:  color 0.3s;
}
.navbar.scrolled .navbar-brand { color: var(--primary-dark) !important; }

/* Nav links */
.navbar .nav-link {
    color:          rgba(255,255,255,0.9) !important;
    font-weight:    500;
    font-size:      clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem);
    padding:        0.5rem 1.1rem !important;
    transition:     all 0.3s;
    letter-spacing: 0.3px;
    position:       relative;
}
.navbar.scrolled .nav-link       { color: #444 !important; }
.navbar .nav-link:hover          { color: var(--cool-horizon) !important; }
.navbar.scrolled .nav-link:hover { color: var(--accent-light-blue) !important; }

/* Nav link animated underline */
.navbar .nav-link::after {
    content:    "";
    position:   absolute;
    bottom:     0;
    left:       50%;
    transform:  translateX(-50%);
    width:      0;
    height:     2px;
    background: var(--cool-horizon);
    transition: width 0.3s ease, background 0.3s ease;
}
.navbar .nav-link:hover::after                         { width: 80%; }
.navbar .nav-link.active::after                        { width: 80%; background: white; }
.navbar.scrolled .nav-link.active::after               { background: var(--accent-light-blue); }
.navbar .nav-link.active:hover::after                  { background: var(--cool-horizon); }
.navbar.scrolled .nav-link.active:hover::after,
.navbar.scrolled .nav-link:hover::after                { background: var(--accent-light-blue) !important; }

/* Hamburger toggle */
.navbar-toggler {
    border:     none;
    background: transparent;
    padding:    0.5rem;
    cursor:     pointer;
    z-index:    1001;
    display:    none;
}
.toggler-icon {
    display:         flex;
    flex-direction:  column;
    justify-content: space-between;
    width:           28px;
    height:          20px;
    position:        relative;
}
.toggler-icon span {
    display:       block;
    width:         100%;
    height:        2px;
    background:    white;
    border-radius: 2px;
    transition:    all 0.3s ease;
}
.navbar.scrolled .toggler-icon span { background: var(--primary-dark); }

/* Toggler → X animation */
.navbar-toggler.active .toggler-icon span:nth-child(1) { transform: rotate(45deg)  translate(6px, 6px); }
.navbar-toggler.active .toggler-icon span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.navbar-toggler.active .toggler-icon span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }


/* ============================================================
   OFFCANVAS MOBILE MENU
   ============================================================ */
.offcanvas-overlay {
    position:        fixed;
    inset:           0;
    background:      rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity:         0;
    visibility:      hidden;
    transition:      all 0.3s ease;
    z-index:         1040;
}
.offcanvas-overlay.active { opacity: 1; visibility: visible; }

.offcanvas-menu {
    position:       fixed;
    top:            0;
    right:          -320px;
    width:          320px;
    max-width:      85vw;
    height:         100%;
    background:     white;
    box-shadow:     -10px 0 40px rgba(0,0,0,0.15);
    z-index:        1050;
    transition:     right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display:        flex;
    flex-direction: column;
    overflow:       hidden;
}
.offcanvas-menu.active { right: 0; }
body.menu-open { overflow: hidden; }

/* Header */
.offcanvas-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         1.25rem 1.5rem;
    background:      var(--primary-dark);
    border-bottom:   1px solid rgba(255,255,255,0.1);
}
.offcanvas-brand {
    font-family:     var(--font-heading);
    font-weight:     700;
    font-size:       clamp(1rem, 0.9rem + 0.3vw, 1.2rem);
    color:           white;
    text-decoration: none;
}
.offcanvas-brand i { color: var(--text-white); font-size: 1.3rem; }

.offcanvas-close {
    background:      rgba(255,255,255,0.1);
    border:          none;
    width:           40px;
    height:          40px;
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    color:           white;
    font-size:       1.2rem;
    cursor:          pointer;
    transition:      all 0.3s ease;
}
.offcanvas-close:hover { background: var(--accent-light-blue); transform: rotate(90deg); }

/* Body & Nav */
.offcanvas-body {
    flex:            1;
    overflow-y:      auto;
    padding:         1.5rem;
    display:         flex;
    flex-direction:  column;
}
.offcanvas-nav    { list-style: none; padding: 0; margin: 0; }
.offcanvas-nav li { margin-bottom: 0.5rem; }

.offcanvas-link {
    display:         flex;
    align-items:     center;
    gap:             1rem;
    padding:         1rem 1.25rem;
    color:           var(--primary-dark);
    text-decoration: none;
    font-weight:     500;
    font-size:       clamp(0.95rem, 0.9rem + 0.15vw, 1.05rem);
    border-radius:   12px;
    transition:      all 0.3s ease;
    overflow:        hidden;
}
.offcanvas-link i          { font-size: 1.2rem; color: var(--soft-gray); width: 24px; text-align: center; transition: color 0.3s ease; }
.offcanvas-link:hover      { background: var(--blue-tint-light); color: var(--accent-light-blue); transform: translateX(5px); }
.offcanvas-link:hover i    { color: var(--accent-light-blue); }
.offcanvas-link.active     { background: linear-gradient(135deg, var(--accent-light-blue), var(--secondary-blue)); color: white; }
.offcanvas-link.active i   { color: white; }

.offcanvas-divider {
    height:     1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin:     1rem 0;
}

/* Info block */
.offcanvas-info          { padding: 0.5rem 0; }
.offcanvas-info h6       { display: flex; align-items: center; gap: 0.5rem; color: var(--primary-dark); font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); }
.offcanvas-info h6 i     { color: var(--accent-light-blue); }
.offcanvas-info p        { color: #666; font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); margin: 0 0 0.3rem; padding-left: 1.5rem; }

/* Actions */
.offcanvas-actions              { margin-top: auto; padding-top: 1rem; }
.offcanvas-actions .live-badge  { display: inline-flex; margin-bottom: 1rem; }

/* Social icons (shared with footer) */
.footer-social,
.offcanvas-social {
    display:         flex;
    gap:             0.5rem;
    flex-wrap:       wrap;
}
.offcanvas-social { justify-content: center; padding: 1.5rem 0; margin-top: 1rem; border-top: 1px solid #f0f0f0; }
.footer-social a,
.offcanvas-social a {
    width:           42px;
    height:          42px;
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       1rem;
    text-decoration: none;
    transition:      all 0.3s;
}
.footer-social a   { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.offcanvas-social a{ background: var(--blue-tint-light); color: var(--accent-light-blue); }
.footer-social a:hover    { background: var(--accent-light-blue); color: white; transform: translateY(-3px); }
.offcanvas-social a:hover { background: var(--accent-light-blue); color: white; transform: translateY(-3px); }
.footer-social a i,
.offcanvas-social a i { position: static !important; bottom: auto !important; line-height: 1; }


/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position:            relative;
    min-height:          100vh;
    display:             flex;
    align-items:         center;
    background-color:    #0f1729;
    background-position: center;
    background-size:     cover;
    overflow:            hidden;
}
/* Dark overlay */
.hero-section::before {
    content:    "";
    position:   absolute;
    inset:      0;
    background: linear-gradient(to right, rgba(12,38,69,0.9), rgba(12,38,69,0.3));
    z-index:    1;
}
.hero-section > *        { position: relative; z-index: 2; }
.hero-section .section-label { color: var(--hero-accent-text); }

/* Responsive background images */
.hero-section { background-image: url("https://images.unsplash.com/photo-1592818868295-f527dbac420d?w=800&q=80&auto=format"); }
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) { .hero-section { background-image: url("https://images.unsplash.com/photo-1592818868295-f527dbac420d?w=1600&q=80&auto=format"); } }
@media (min-width: 992px)                                             { .hero-section { background-image: url("https://images.unsplash.com/photo-1592818868295-f527dbac420d?w=1920&q=85&auto=format"); } }
@media (min-width: 992px) and (-webkit-min-device-pixel-ratio: 2),
       (min-width: 992px) and (min-resolution: 2dppx)                { .hero-section { background-image: url("https://images.unsplash.com/photo-1592818868295-f527dbac420d?w=3840&q=85&auto=format"); } }

.hero-content { position: relative; z-index: 2; }

/* Badge */
.hero-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            0.5rem;
    background:     var(--cool-horizon);
    border:         1px solid rgba(58,124,165,0.4);
    color:          var(--white);
    padding:        0.5rem 1.2rem;
    border-radius:  50px;
    font-size:      clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem);
    font-weight:    500;
    margin-bottom:  1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Title & subtitle */
.hero-title {
    font-size:      clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem);
    font-weight:    700;
    color:          white;
    line-height:    1.1;
    margin-bottom:  1.5rem;
    letter-spacing: -0.02em;
}
.hero-title span  { color: var(--cool-horizon); display: block; }
.hero-subtitle {
    font-size:   clamp(1rem, 0.9rem + 0.3vw, 1.2rem);
    color:       rgba(255,255,255,0.75);
    max-width:   550px;
    line-height: 1.8;
    font-weight: 300;
}

/* Service info panel */
.hero-service-info {
    position:        relative;
    z-index:         2;
    background:      rgba(12,38,69,0.7);
    backdrop-filter: blur(10px);
    border:          1px solid rgba(255,255,255,0.1);
    border-radius:   10px;
    padding:         2rem;
}
.service-time-item      { text-align: center; padding: 1rem; }
.service-time-item i    { font-size: 1.5rem; color: var(--accent-light-blue); margin-bottom: 0.5rem; }
.service-time-item h6   { color: rgba(255,255,255,0.6); font-family: var(--font-body); font-size: clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 0.3rem; }
.service-time-item p    { color: white; font-weight: 600; margin: 0; font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1.05rem); }
.service-time-border    { border-left: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); }
.hero-divider           { border-color: rgba(255,255,255,0.1); }

/* Event date badge */
.hero-event-date-badge {
    background:      var(--accent-light-blue);
    color:           white;
    padding:         0.75rem 0.9rem;
    border-radius:   12px;
    text-align:      center;
    min-width:       62px;
    aspect-ratio:    1 / 1;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             2px;
}
.hero-event-date-badge .day,
.hero-event-date-badge .month { font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); font-weight: 700; line-height: 1.15; font-family: var(--font-heading); }
.hero-event-date-badge .month { opacity: 0.9; }

#heroEventContent h6        { font-family: var(--font-heading); font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem); }
.hero-event-description     { color: rgba(255,255,255,0.6); font-size: clamp(0.8rem, 0.75rem + 0.1vw, 0.85rem); line-height: 1.6; margin: 0; }


/* ============================================================
   SUBPAGE HERO
   ============================================================ */
.subpage-hero {
    position:        relative;
    min-height:      50vh;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         120px 0 80px;
    overflow:        hidden;
}
.subpage-hero .section-label { color: var(--hero-accent-text); }

/* Background image layer */
.subpage-hero-bg {
    position:            absolute;
    inset:               0;
    background-size:     cover;
    background-position: center;
    z-index:             0;
}
.subpage-hero-bg::before {
    content:    "";
    position:   absolute;
    inset:      0;
    background: linear-gradient(to right, rgba(12,38,69,0.9), rgba(12,38,69,0.3));
    z-index:    1;
}

/* Gradient overlay */
.subpage-hero-overlay {
    position:   absolute;
    inset:      0;
    background: linear-gradient(135deg, rgba(26,26,46,0.5) 0%, rgba(26,26,46,0.4) 50%, rgba(26,26,46,0.55) 100%);
    z-index:    1;
}

/* Decorative radial glows */
.subpage-hero::before {
    content: "";
    position: absolute;
    top: 20%; left: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(125,211,252,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}
.subpage-hero::after {
    content: "";
    position: absolute;
    bottom: 10%; right: -5%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(125,211,252,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

/* Content */
.subpage-hero-content   { position: relative; z-index: 2; text-align: center; }
.subpage-hero-title {
    font-family:   var(--font-heading);
    font-size:     clamp(2.5rem, 2rem + 4vw, 4rem);
    font-weight:   700;
    color:         #fff;
    margin-bottom: 1.5rem;
    line-height:   1.2;
}
.subpage-hero-subtitle {
    font-size:   clamp(1rem, 0.95rem + 0.2vw, 1.15rem);
    color:       rgba(255,255,255,0.8);
    max-width:   600px;
    margin:      2rem auto !important;
    line-height: 1.7;
}
.subpage-hero-line {
    width:         60px;
    height:        3px;
    background:    linear-gradient(90deg, var(--hero-accent-text), var(--secondary-blue));
    margin:        0 auto;
    border-radius: 2px;
}

/* Breadcrumb */
.subpage-hero-breadcrumb            { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.subpage-hero-breadcrumb a          { color: rgba(255,255,255,0.7); font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); transition: color 0.3s ease; }
.subpage-hero-breadcrumb a:hover    { color: var(--hero-accent-text); }
.subpage-hero-breadcrumb span       { color: rgba(255,255,255,0.5); }
.subpage-hero-breadcrumb .current   { color: var(--hero-accent-text); font-weight: 500; }

/* Scroll indicator */
.subpage-hero-scroll {
    position:  absolute;
    bottom:    30px;
    left:      50%;
    transform: translateX(-50%);
    z-index:   3;
    animation: bounceDown 2s infinite;
}
.subpage-hero-scroll i { color: var(--hero-accent-text); font-size: 1.5rem; opacity: 0.8; }

.subpage-hero-decor { pointer-events: none; }

/* Background images — per page */
.subpage-hero-bg.hero-about      { background-image: url("https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?w=800&q=80&auto=format");  background-position: bottom !important; }
.subpage-hero-bg.hero-contact    { background-image: url("https://images.unsplash.com/photo-1621558272312-0877bf5241d7?w=800&q=80&auto=format"); }
.subpage-hero-bg.hero-events     { background-image: url("https://images.unsplash.com/photo-1611988615248-5d4f0b9ac31e?w=800&q=80&auto=format"); }
.subpage-hero-bg.hero-ministries { background-image: url("https://images.unsplash.com/photo-1494138030114-a8cf519b022b?w=800&q=80&auto=format");  background-position: bottom !important; }
.subpage-hero-bg.hero-sermons    { background-image: url("https://images.unsplash.com/photo-1621822187174-dad36d692865?w=800&q=80&auto=format"); }
.subpage-hero-bg.hero-give       { background-image: url("https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?w=800&q=80&auto=format"); }

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .subpage-hero-bg.hero-about      { background-image: url("https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?w=1600&q=80&auto=format"); }
    .subpage-hero-bg.hero-contact    { background-image: url("https://images.unsplash.com/photo-1621558272312-0877bf5241d7?w=1600&q=80&auto=format"); }
    .subpage-hero-bg.hero-events     { background-image: url("https://images.unsplash.com/photo-1611988615248-5d4f0b9ac31e?w=1600&q=80&auto=format"); }
    .subpage-hero-bg.hero-ministries { background-image: url("https://images.unsplash.com/photo-1494138030114-a8cf519b022b?w=1600&q=80&auto=format"); }
    .subpage-hero-bg.hero-sermons    { background-image: url("https://images.unsplash.com/photo-1621822187174-dad36d692865?w=1600&q=80&auto=format"); }
    .subpage-hero-bg.hero-give       { background-image: url("https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?w=1600&q=80&auto=format"); }
}
@media (min-width: 992px) {
    .subpage-hero-bg.hero-about      { background-image: url("https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?w=1920&q=85&auto=format"); }
    .subpage-hero-bg.hero-contact    { background-image: url("https://images.unsplash.com/photo-1621558272312-0877bf5241d7?w=1920&q=85&auto=format"); }
    .subpage-hero-bg.hero-events     { background-image: url("https://images.unsplash.com/photo-1611988615248-5d4f0b9ac31e?w=1920&q=85&auto=format"); }
    .subpage-hero-bg.hero-ministries { background-image: url("https://images.unsplash.com/photo-1494138030114-a8cf519b022b?w=1920&q=85&auto=format"); }
    .subpage-hero-bg.hero-sermons    { background-image: url("https://images.unsplash.com/photo-1621822187174-dad36d692865?w=1920&q=85&auto=format"); }
    .subpage-hero-bg.hero-give       { background-image: url("https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?w=1920&q=85&auto=format"); }
}
@media (min-width: 992px) and (-webkit-min-device-pixel-ratio: 2),
       (min-width: 992px) and (min-resolution: 2dppx) {
    .subpage-hero-bg.hero-about      { background-image: url("https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?w=3840&q=85&auto=format"); }
    .subpage-hero-bg.hero-contact    { background-image: url("https://images.unsplash.com/photo-1621558272312-0877bf5241d7?w=3840&q=85&auto=format"); }
    .subpage-hero-bg.hero-events     { background-image: url("https://images.unsplash.com/photo-1611988615248-5d4f0b9ac31e?w=3840&q=85&auto=format"); }
    .subpage-hero-bg.hero-ministries { background-image: url("https://images.unsplash.com/photo-1494138030114-a8cf519b022b?w=3840&q=85&auto=format"); }
    .subpage-hero-bg.hero-sermons    { background-image: url("https://images.unsplash.com/photo-1621822187174-dad36d692865?w=3840&q=85&auto=format"); }
    .subpage-hero-bg.hero-give       { background-image: url("https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?w=3840&q=85&auto=format"); }
}


/* ============================================================
   BADGES & LABELS
   ============================================================ */

/* Live indicator */
.live-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            0.4rem;
    background:     #e74c3c;
    color:          white;
    padding:        0.3rem 0.8rem;
    border-radius:  50px;
    font-size:      clamp(0.6rem, 0.55rem + 0.15vw, 0.7rem);
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.live-badge::before { content: ""; width: 8px; height: 8px; background: white; border-radius: 50%; animation: pulse-live 1.5s infinite; }

/* Featured */
.featured-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            0.4rem;
    background:     var(--accent-light-blue);
    color:          white;
    padding:        0.4rem 1rem;
    border-radius:  50px;
    font-size:      clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem);
    font-weight:    600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow:     0 4px 15px rgba(58,124,165,0.4);
    transition:     all 0.3s ease;
}
.featured-badge:hover { background: var(--secondary-blue); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(58,124,165,0.5); }

/* Ministry tag */
.ministry-tag {
    display:        inline-block;
    align-self:     flex-start;
    background:     var(--cool-horizon);
    color:          var(--white);
    padding:        0.3rem 0.9rem;
    border-radius:  50px;
    font-size:      clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem);
    font-weight:    600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom:  1rem;
    width:          fit-content;
}

/* Date badges (event & hero-event — shared shape) */
.event-date-badge,
.hero-event-date-badge {
    border-radius:   14px;
    text-align:      center;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             2px;
}
.event-date-badge {
    background:  var(--cool-horizon);
    color:       white;
    padding:     0.9rem 1rem;
    min-width:   70px;
    aspect-ratio: 1 / 1;
}
.hero-event-date-badge {
    background:  var(--accent-light-blue);
    color:       white;
    padding:     0.75rem 0.9rem;
    min-width:   62px;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
}
.event-date-badge .day,
.event-date-badge .month,
.hero-event-date-badge .day,
.hero-event-date-badge .month { font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem); font-weight: 700; line-height: 1.15; font-family: var(--font-heading); }
.event-date-badge .month,
.hero-event-date-badge .month { opacity: 0.9; }
.event-date-badge-viadia       { background: #73911a !important; }


/* ============================================================
   CARD COMPONENTS
   ============================================================ */

/* --- Value cards --- */
.value-card {
    background:    white;
    border-radius: 16px;
    transition:    all 0.3s ease;
    border:        1px solid #f0f0f0;
    height:        100%;
}
.value-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); border-color: var(--accent-light-blue); }
.value-icon {
    width:           70px;
    height:          70px;
    background:      var(--blue-tint-light);
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    margin:          0 auto;
}
.value-icon i { font-size: 1.8rem; color: var(--accent-light-blue); }
.value-card h5 { color: var(--primary-dark); margin-top: 0.5rem; }

/* --- Ministry cards --- */
.ministry-card {
    background:      white;
    border-radius:   20px;
    overflow:        hidden;
    box-shadow:      0 5px 30px rgba(0,0,0,0.06);
    transition:      all 0.4s ease;
    border:          1px solid #f0f0f0;
    height:          100%;
    display:         flex;
    flex-direction:  column;
}
.ministry-card:hover           { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
.ministry-card-img             { height: 220px; overflow: hidden; flex-shrink: 0; }
.ministry-card-img img         { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.ministry-card-body            { padding: 1.8rem; flex: 1; display: flex; flex-direction: column; }
.ministry-card-body h5         { font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem); margin-bottom: 0.8rem; color: var(--primary-dark); }
.ministry-card-body p          { color: #595959; font-size: 0.85em; line-height: 1.7; }
.ministry-card-footer          { padding: 1.8rem; margin-top: auto; }
.ministry-details              { list-style: none; padding: 0; margin: 1rem 0; }
.ministry-details li           { display: flex; align-items: flex-start; gap: 0.2rem; padding: 0.4rem 0; font-size: 0.85em; color: #666; }
.ministry-details li i         { color: var(--accent-light-blue); font-size: 0.9rem; flex-shrink: 0; margin-top: 0.15rem; }

/* --- Event cards --- */
.event-card {
    background:    white;
    border-radius: 20px;
    overflow:      hidden;
    box-shadow:    0 5px 25px rgba(0,0,0,0.06);
    transition:    all 0.3s;
    border:        1px solid #f0f0f0;
    height:        100%;
    width:         100%;
}
/* Equal-height card rows */
#eventsContainer.row,
#viadiaEventsContainer.row { align-items: stretch; }
#eventsContainer > [class*="col-"],
#viadiaEventsContainer > [class*="col-"] { display: flex; }
.event-title { color: var(--primary-dark); }

.event-description ul,
.event-description ol       { margin-bottom: 0.5rem; padding-left: 1.5rem; }
.event-description p        { margin-bottom: 0.5rem; }
.event-description p:last-child { margin-bottom: 0; }
.event-description :is(h1,h2,h3,h4,h5,h6) { margin-top: 0.75rem; margin-bottom: 0.5rem; }
.event-description :is(h1,h2,h3,h4,h5,h6):first-child { margin-top: 0; }
.event-description li       { margin-bottom: 0.25rem; }
.event-description div + div{ margin-top: 0.5rem; }

/* --- Testimonial cards --- */
.testimonial-section { background: var(--warm-cream); }
.testimonial-card {
    background:    white;
    border-radius: 20px;
    padding:       2.5rem;
    box-shadow:    0 5px 25px rgba(0,0,0,0.05);
    position:      relative;
}
.testimonial-card .quote-icon     { font-size: 3rem; color: var(--accent-light-blue); opacity: 0.3; position: absolute; top: 1.5rem; right: 2rem; }
.testimonial-card p                { font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem); line-height: 1.8; color: #555; font-style: italic; }
.testimonial-author-img            { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.testimonial-author-name           { font-family: var(--font-body); }

/* --- Pastor / team cards --- */
.pastor-card     { text-align: center; padding: 2rem 1.5rem; }
.pastor-img      { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; border: 4px solid white; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: transform 0.3s; }
.pastor-card:hover .pastor-img { transform: scale(1.05); }
.pastor-card h5  { color: var(--primary-dark); margin-bottom: 0.3rem; }
.pastor-card .role { color: var(--accent-light-blue); font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); font-weight: 500; }


/* ============================================================
   ARTICLE / CONTENT LAYOUT
   ============================================================ */
.article-content {
    line-height:  1.9;
    color:        var(--text-color);
    max-width:    75ch;
    margin-left:  auto;
    margin-right: auto;
}
.article-header          { margin-bottom: 2.5rem; }
.article-header--centered{ text-align: center; }
.article-section         { margin-bottom: 2.5rem; }
.article-section:last-child { margin-bottom: 0; }

.article-section h3,
.article-section h4 {
    font-family:    var(--font-heading);
    font-weight:    600;
    text-transform: uppercase;
    color:          var(--primary-dark);
}
.article-section h3      { letter-spacing: 3px; margin-bottom: 1.25rem; }
.article-section h4      { letter-spacing: 2px; margin-bottom: 1rem; }
.article-section p       { margin-bottom: 1.25rem; color: var(--text-color); word-break: break-word; overflow-wrap: break-word; }
.article-section p:last-child { margin-bottom: 0; }
.article-section p strong{ color: var(--primary-dark); font-weight: 600; }

/* Drop cap on first paragraph of first section */
.article-section:first-of-type p:first-child::first-letter {
    font-size:    3.5rem;
    font-weight:  700;
    float:        left;
    line-height:  1;
    margin-right: 0.75rem;
    margin-top:   0.25rem;
    color:        var(--accent-light-blue);
    font-family:  var(--font-heading);
}

/* Divided variant */
.article-content--divided .article-section    { padding-bottom: 2.5rem; border-bottom: 1px solid rgba(12,38,69,0.08); }
.article-content--divided .article-section:last-child { padding-bottom: 0; border-bottom: none; }

/* No-dropcap variant */
.article-content--no-dropcap .article-section:first-of-type p:first-child::first-letter {
    font-size: inherit; font-weight: inherit; float: none; margin: 0; color: inherit;
}


/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section { background: white; overflow-x: hidden; }

.about-image-wrapper     { position: relative; padding-bottom: 50px; margin-bottom: 20px; }
.about-image-wrapper img { border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.about-main-image        { height: 500px; object-fit: cover; }

.about-image-accent {
    position:      absolute;
    top:           -20px;
    left:          0;
    width:         100px;
    height:        100px;
    border:        3px solid var(--accent-light-blue);
    border-radius: 20px;
    z-index:       -1;
}
.about-stats {
    position:      absolute;
    bottom:        -30px;
    right:         20px;
    background:    var(--accent-light-blue);
    color:         white;
    padding:       1.5rem 2rem;
    border-radius: 16px;
    text-align:    center;
    box-shadow:    0 15px 40px rgba(58,124,165,0.3);
    z-index:       10;
}
.about-stats h3 { font-size: clamp(2rem, 1.5rem + 1vw, 2.5rem); font-weight: 700; margin: 0; color: white !important; }
.about-stats p  { margin: 0; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); opacity: 0.9; color: white !important; }


/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--accent-light-blue), rgba(58,124,165,0.3)); border-radius: 3px; }

.timeline-item { position: relative; padding-bottom: 2.5rem; padding-left: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -36px; top: 5px; width: 15px; height: 15px; background: var(--accent-light-blue); border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 3px rgba(58,124,165,0.2); }

.timeline-date    { display: inline-block; background: var(--accent-light-blue); color: white; padding: 0.3rem 1rem; border-radius: 50px; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); font-weight: 600; margin-bottom: 0.8rem; }
.timeline-content h5 { color: var(--primary-dark); margin-bottom: 0.5rem; }


/* ============================================================
   SERMON SECTION
   ============================================================ */
.sermon-section         { position: relative; z-index: 5; }
.sermon-archive-section { background: var(--soft-white); position: relative; z-index: 5; }

/* Featured sermon */
.sermon-featured     { border-radius: 24px; overflow: hidden; position: relative; background: var(--primary-dark); }
.sermon-featured-img { width: 100%; height: auto; object-fit: cover; border-radius: 24px; }

/* Custom list resets inside sermon descriptions */
#featuredDescription ul,
.accordion-sermon-description ul { list-style: none !important; padding-left: 0 !important; margin-left: 0; }
#featuredDescription ul li,
.accordion-sermon-description ul li { display: flex; align-items: flex-start; margin-bottom: 0.5rem; }
#featuredDescription ul li i,
.accordion-sermon-description ul li i { flex-shrink: 0; width: 1.5rem; text-align: center; }
#featuredDescription ul li span,
.accordion-sermon-description ul li span { flex: 1; }

/* Play button */
.sermon-play-btn {
    width:           80px;
    height:          80px;
    background:      var(--accent-light-blue);
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    color:           white;
    font-size:       1.8rem;
    cursor:          pointer;
    transition:      all 0.3s;
    border:          none;
    box-shadow:      0 10px 30px rgba(58,124,165,0.4);
}
.sermon-play-btn:hover { transform: scale(1.1); background: var(--secondary-blue); }

/* Sermon list */
.sermon-list-title { color: var(--primary-dark); }
.sermon-list-item  {
    background:    white;
    border-radius: 16px;
    padding:       1.3rem 1.5rem;
    margin-bottom: 0.8rem;
    display:       flex;
    align-items:   center;
    gap:           1rem;
    cursor:        pointer;
    transition:    all 0.3s;
    border:        1px solid transparent;
}
.sermon-list-item:hover                  { border-color: var(--accent-light-blue); box-shadow: 0 5px 20px rgba(58,124,165,0.1); }
.sermon-list-play                        { width: 45px; height: 45px; background: var(--blue-tint-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent-light-blue); flex-shrink: 0; transition: all 0.3s; }
.sermon-list-item:hover .sermon-list-play{ background: var(--accent-light-blue); color: white; }
.sermon-list-info h6                     { font-family: var(--font-body); font-weight: 600; margin-bottom: 0.2rem; color: var(--primary-dark); font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }
.sermon-list-info small                  { color: #636363; font-size: clamp(0.75rem, 0.7rem + 0.1vw, 0.85rem); }
.sermon-list-duration                    { color: #636363; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); font-weight: 500; }

/* Archive accordion */
.sermon-accordion-wrapper { max-width: 900px; margin: 0 auto; }
.sermon-accordion         { border: none; background: transparent; }

.sermon-accordion .accordion-item        { background: white; border: 1px solid var(--blue-tint-medium); border-radius: 16px !important; margin-bottom: 1rem; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 2px 15px rgba(0,0,0,0.03); }
.sermon-accordion .accordion-item:hover  { border-color: rgba(12,38,69,0.4); box-shadow: 0 5px 25px rgba(0,0,0,0.06); }
.sermon-accordion .accordion-header      { margin: 0; }
.sermon-accordion .accordion-button      { background: white; border: none; padding: 1.25rem 1.5rem; font-family: var(--font-heading); font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem); font-weight: 600; color: var(--primary-dark); box-shadow: none !important; display: flex; align-items: center; gap: 1rem; transition: all 0.3s ease; }
.sermon-accordion .accordion-button:not(.collapsed) { background: linear-gradient(135deg, rgba(12,38,69,0.08), rgba(12,38,69,0.03)); color: var(--primary-dark); }
.sermon-accordion .accordion-button::after           { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233a7ca5'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); width: 1.25rem; height: 1.25rem; transition: transform 0.3s ease; }
.sermon-accordion .accordion-button:not(.collapsed)::after { transform: rotate(-180deg); }
.sermon-accordion .accordion-button:focus{ box-shadow: none; border-color: transparent; }
.sermon-accordion .accordion-body        { padding: 0 1.5rem 1.5rem; background: white; position: relative; z-index: 1; }
.sermon-accordion .accordion-collapse    { border-top: 1px solid var(--blue-tint-light); }

.accordion-month-icon    { width: 50px; height: 50px; background: linear-gradient(135deg, var(--accent-light-blue), var(--secondary-blue)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem; flex-shrink: 0; }
.accordion-month-info    { flex: 1; }
.accordion-month-name    { margin: 0; font-family: var(--font-heading); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.2rem); font-weight: 600; color: var(--primary-dark); }
.accordion-episode-count { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; font-family: var(--font-body); font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); font-weight: 500; color: #636363; }
.accordion-episode-count i { color: var(--accent-light-blue); font-size: 0.9rem; }

/* Accordion sermon items */
.accordion-sermon-list          { list-style: none; padding: 0; margin: 0; }
.accordion-sermon-item          { cursor: default !important; padding: 1rem 0; position: relative; z-index: 1; }
.accordion-sermon-item:hover    { background: transparent !important; }
.accordion-sermon-item:first-child { margin-top: 1rem; }
.accordion-sermon-play          { display: none !important; }
.accordion-sermon-image         { display: none !important; }
.accordion-sermon-item .btn-listen { display: none; }
.accordion-sermon-info          { flex: 1; min-width: 0; }
.accordion-sermon-title         { font-family: var(--font-body); font-weight: 600; font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); color: var(--primary-dark); margin: 0 0 0.5rem; }
.accordion-sermon-meta          { display: flex; align-items: center; gap: 1rem; font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem); color: #636363; margin-bottom: 0.75rem; }
.accordion-sermon-meta span     { display: flex; align-items: center; gap: 0.3rem; }
.accordion-sermon-meta i        { color: var(--accent-light-blue); font-size: 0.85rem; }
.accordion-sermon-description   { font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); color: var(--text-muted); line-height: 1.6; margin-top: 0.75rem; margin-bottom: 1rem; padding-left: 0; }

/* Audio player */
.accordion-audio-player        { position: relative; z-index: 10; margin-top: 1rem; }
.accordion-audio-player audio   { pointer-events: auto !important; position: relative; z-index: 10; width: 100%; height: 40px; border-radius: 8px; outline: none; }
#featuredPlayerContainer        { position: relative; z-index: 10; }
#featuredAudioPlayer            { pointer-events: auto !important; }

.custom-audio-player { background: linear-gradient(135deg, #1a1a1a, #2d2d2d); border-radius: 12px; padding: 1.5rem; margin-top: 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.custom-audio-player audio { width: 100%; height: 54px; border-radius: 8px; outline: none; }
.custom-audio-player audio::-webkit-media-controls-panel { background: linear-gradient(to bottom, #3a3a3a, #2a2a2a); }
.custom-audio-player audio::-webkit-media-controls-current-time-display,
.custom-audio-player audio::-webkit-media-controls-time-remaining-display { color: var(--accent-light-blue); }

/* Loading / empty states */
.player-loading          { text-align: center; padding: 1rem; color: var(--accent-light-blue); font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); }
.player-loading i        { margin-right: 0.5rem; }
.no-sermons-message      { text-align: center; padding: 3rem 2rem; color: #636363; }
.no-sermons-message i    { font-size: 3rem; color: rgba(58,124,165,0.3); margin-bottom: 1rem; display: block; }
.sermon-empty-state      { text-align: center; padding: 4rem 2rem; background: white; border-radius: 20px; border: 2px dashed rgba(58,124,165,0.3); }
.sermon-empty-state i    { font-size: 4rem; color: rgba(58,124,165,0.4); margin-bottom: 1.5rem; }
.sermon-empty-state h4   { color: var(--primary-dark); margin-bottom: 0.5rem; }
.sermon-empty-state p    { color: #636363; max-width: 400px; margin: 0 auto; }


/* ============================================================
   SCRIPTURE BANNER
   ============================================================ */
.scripture-banner { background: var(--primary-dark-blue); }
.scripture-text   { font-family: var(--font-heading); font-size: clamp(1.3rem, 1rem + 0.8vw, 1.8rem); }


/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(180deg, var(--primary-dark), var(--deep-navy));
    position:   relative;
    overflow:   hidden;
}
.cta-section::before { content: ""; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(58,124,165,0.08), transparent 70%); border-radius: 50%; }
.cta-section::after  { content: ""; position: absolute; bottom: -50%; left: -20%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(58,124,165,0.05), transparent 70%); border-radius: 50%; }
.cta-title            { font-size: clamp(2rem, 1.5rem + 1.3vw, 2.8rem); letter-spacing: -0.015em; }
.cta-description      { font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem); line-height: 1.8; }
.cta-icon-box         { width: 45px; height: 45px; background: rgba(58,124,165,0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent-light-blue); }
.cta-feature-text     { font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); }


/* ============================================================
   GIVE / DONATION FORM
   ============================================================ */
.give-title    { color: var(--primary-dark); }
.give-select   { padding: 0.7rem 1.2rem; }


/* ============================================================
   COUNTER / STATS
   ============================================================ */
.counter-box    { text-align: center; padding: 2rem; }
.counter-box h2 { font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem); color: var(--accent-light-blue); font-weight: 700; }
.counter-box p  { color: rgba(255,255,255,0.7); text-transform: uppercase; font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem); letter-spacing: 2px; font-weight: 500; }


/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section { background: white; }
.newsletter-title   { color: var(--primary-dark); }
.newsletter-form .form-control        { border-radius: 50px; padding: 0.9rem 1.5rem; border: 2px solid #e8e8e8; font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }
.newsletter-form .form-control:focus  { border-color: var(--accent-light-blue); box-shadow: 0 0 0 3px rgba(58,124,165,0.1); }


/* ============================================================
   LOCATION / CONTACT
   ============================================================ */
.location-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
.location-map  { border-radius: 20px 20px 0 0; }

.contact-icon-box { width: 42px; height: 42px; background: var(--blue-tint-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent-light-blue); font-size: 1rem; }
.contact-label    { font-family: var(--font-body); font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); }

.church-location          { text-align: center; padding: 2rem; }
.church-location h4       { margin-bottom: 1rem; color: var(--primary-dark); }
.church-location ul       { list-style: none; padding: 0; margin: 0; display: inline-block; text-align: left; }
.church-location li       { display: flex; align-items: center; margin: 0.75rem 0; }
.church-location i        { margin-right: 0.75rem; width: 20px; color: var(--accent-light-blue); flex-shrink: 0; font-size: 1.1rem; }
.church-location span     { color: var(--text-color); font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }


/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--deep-navy); color: rgba(255,255,255,0.7); padding: 5rem 0 2rem; }
.footer h4 { color: white; font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem);    font-weight: 600; margin-bottom: 1.5rem; }
.footer h5 { color: white; font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem);  font-weight: 600; margin-bottom: 1.5rem; }
.footer a  { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.3s; font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); }
.footer a:hover { color: var(--accent-light-blue); }
.footer a::after { display: none !important; content: none !important; }

.footer-brand-icon  { color: white; font-size: 1.75rem; }
.footer-description { line-height: 1.8; color: rgba(255,255,255,0.7); font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); }

.footer-links    { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.7rem; }

.footer-service-times          { list-style: none; padding: 0; margin: 0; }
.footer-service-times li       { margin-bottom: 1rem; }
.footer-service-label          { color: rgba(255,255,255,0.6); font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); display: block; margin-bottom: 0.25rem; }
.footer-service-times .text-white { color: white !important; font-weight: 600; font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1.05rem); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 2rem; margin-top: 3rem; }
.footer-bottom p { font-size: clamp(0.8rem, 0.75rem + 0.1vw, 0.9rem); color: rgba(255,255,255,0.65); }
.footer-bottom-links { display: flex; gap: 1.5rem; }

.footer-location          { padding: 1rem 0; }
.footer-location h4       { margin-bottom: 1rem; color: #fff; }
.footer-location ul       { list-style: none; padding: 0; margin: 0; }
.footer-location li       { display: flex; align-items: center; margin: 0.5rem 0; }
.footer-location i        { margin-right: 0.5rem; width: 20px; color: #fff; flex-shrink: 0; }
.footer-location a        { color: #ccc; text-decoration: none; transition: color 0.3s ease; }
.footer-location a:hover  { color: #fff !important; }


/* ============================================================
   BACK-TO-TOP
   ============================================================ */
.back-to-top {
    position:      fixed;
    bottom:        30px;
    right:         30px;
    width:         50px;
    height:        50px;
    background:    var(--accent-light-blue);
    color:         white;
    border:        none;
    border-radius: 50%;
    display:       flex;
    align-items:   center;
    justify-content: center;
    font-size:     1.2rem;
    cursor:        pointer;
    opacity:       0;
    visibility:    hidden;
    transition:    all 0.3s;
    z-index:       999;
    box-shadow:    0 5px 20px rgba(58,124,165,0.3);
}
.back-to-top.show  { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--secondary-blue); transform: translateY(-3px); }


/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop.show { opacity: 0.6; }

/* Dialog widths */
.modal-dialog              { max-width: 500px; }
#termsModal .modal-dialog,
#accessibilityModal .modal-dialog { max-width: 700px; }

/* Content wrapper */
.modal-content,
.donation-modal-content,
.terms-modal-content { border-radius: 24px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.modal-content:focus,
.donation-modal-content:focus { outline: none; }

/* Headers */
.modal-header,
.donation-modal-header,
.terms-modal-header {
    background: linear-gradient(135deg, var(--accent-light-blue), var(--secondary-blue));
    color:      white;
    border:     none;
    position:   relative;
}
.donation-modal-header { padding: 2.5rem 2rem 2rem; }
.terms-modal-header    { padding: 2rem 2rem 1.5rem; }

/* Icon circles */
.donation-icon-circle,
.terms-icon-circle {
    background:          rgba(255,255,255,0.2);
    border-radius:       50%;
    display:             flex;
    align-items:         center;
    justify-content:     center;
    backdrop-filter:     blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.donation-icon-circle { width: 70px; height: 70px; animation: donationPulse 2s ease-in-out infinite; }
.terms-icon-circle    { width: 60px; height: 60px; }
.donation-icon-circle i { font-size: 2rem;    color: white; }
.terms-icon-circle i    { font-size: 1.75rem; color: white; }

/* Titles */
.modal-title,
.donation-modal-title,
.terms-modal-title { font-family: var(--font-heading); font-weight: 700; color: white; margin: 0; }
.donation-modal-title { font-size: clamp(1.5rem, 1.3rem + 0.5vw, 1.8rem); }
.terms-modal-title    { font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem); }

.modal-subtitle,
.donation-modal-subtitle,
.terms-modal-subtitle { color: rgba(255,255,255,0.85); font-weight: 400; }
.donation-modal-subtitle { font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); color: rgba(255,255,255,0.9); }
.terms-modal-subtitle    { font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); }

/* Close buttons */
.modal-close-btn,
.donation-close-btn,
.terms-close-btn {
    position:        absolute;
    right:           1rem;
    width:           36px;
    height:          36px;
    background:      rgba(255,255,255,0.2);
    border-radius:   50%;
    opacity:         1;
    backdrop-filter: blur(10px);
    transition:      all 0.3s ease;
    display:         flex;
    align-items:     center;
    justify-content: center;
    border:          none;
    padding:         0;
    cursor:          pointer;
}
.donation-close-btn { top: 1.25rem; right: 1.25rem; }
.terms-close-btn    { top: 1rem; }
.modal-close-btn i,
.donation-close-btn i,
.terms-close-btn i { font-size: 1rem; color: white; line-height: 1; }
.modal-close-btn:hover,
.donation-close-btn:hover,
.terms-close-btn:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

/* Bodies */
.modal-body,
.donation-modal-body,
.terms-modal-body { background: white; }
.donation-modal-body { padding: 2rem; }
.terms-modal-body    { padding: 1.5rem 2rem 2rem; max-height: 60vh; overflow-y: auto; }

/* Scrollbar in terms body */
.terms-modal-body::-webkit-scrollbar       { width: 8px; }
.terms-modal-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.terms-modal-body::-webkit-scrollbar-thumb { background: var(--accent-light-blue); border-radius: 4px; }
.terms-modal-body::-webkit-scrollbar-thumb:hover { background: var(--secondary-blue); }

/* Terms footer */
.terms-modal-footer { background: var(--warm-cream); border-top: 1px solid rgba(22,66,91,0.1); padding: 1.25rem 2rem; display: flex; justify-content: center; }
.terms-modal-footer .btn { min-width: 200px; }

/* Donation info card */
.donation-info-card    { background: var(--warm-cream); border-radius: 16px; padding: 1.5rem; border: 2px solid rgba(22,66,91,0.1); }
.donation-info-row     { display: flex; flex-direction: column; gap: 0.75rem; }
.donation-label        { display: flex; align-items: center; gap: 0.5rem; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.85rem); font-weight: 600; color: var(--soft-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.donation-label i      { color: var(--accent-light-blue); font-size: 1rem; }
.donation-value-wrapper{ display: flex; align-items: center; justify-content: space-between; background: white; border-radius: 12px; padding: 1rem 1.25rem; border: 2px solid rgba(22,66,91,0.15); transition: all 0.3s ease; }
.donation-value-wrapper:hover { border-color: var(--accent-light-blue); box-shadow: 0 4px 15px rgba(22,66,91,0.1); }
.donation-value        { font-family: "Courier New", Courier, monospace; font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem); font-weight: 700; color: var(--primary-dark); letter-spacing: 0.5px; user-select: all; -webkit-user-select: all; }
.donation-divider      { height: 1px; background: linear-gradient(90deg, transparent, rgba(22,66,91,0.2), transparent); margin: 1.25rem 0; }
.donation-note         { background: rgba(22,66,91,0.05); border-left: 4px solid var(--accent-light-blue); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin-top: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.donation-note p       { font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); color: var(--text-muted); line-height: 1.6; margin: 0; }
.donation-note i       { color: var(--accent-light-blue); font-size: 1.2rem; flex-shrink: 0; }

/* Copy tooltip */
.copy-tooltip { position: absolute; background: #28a745; color: white; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; white-space: nowrap; z-index: 1000; }
.copy-tooltip.show { opacity: 1; transform: translateY(0); }
.copy-tooltip::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); border-width: 0 6px 6px 6px; border-style: solid; border-color: transparent transparent #28a745 transparent; }

/* Terms content */
.terms-updated-badge  { display: inline-flex; align-items: center; background: var(--blue-tint-light); color: var(--accent-light-blue); padding: 0.5rem 1rem; border-radius: 50px; font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem); font-weight: 600; margin-bottom: 1.5rem; }
.terms-content        { color: var(--text-color); }
.terms-section        { margin-bottom: 1.75rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(22,66,91,0.1); }
.terms-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.terms-section-title  { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-heading); font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem); font-weight: 700; color: var(--primary-dark); margin-bottom: 1rem; }
.terms-section-number { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent-light-blue), var(--secondary-blue)); color: white; border-radius: 50%; font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.terms-content p      { font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); line-height: 1.7; color: var(--text-muted); margin-bottom: 0.75rem; }
.terms-content p:last-child { margin-bottom: 0; }

.terms-list           { list-style: none; padding: 0; margin: 1rem 0; }
.terms-list li        { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); color: var(--text-muted); }
.terms-list li i      { color: var(--accent-light-blue); font-size: 1rem; flex-shrink: 0; margin-top: 0.15rem; }

.terms-info-box       { display: flex; gap: 1rem; background: var(--warm-cream); border-left: 4px solid var(--accent-light-blue); border-radius: 0 12px 12px 0; padding: 1.25rem; margin: 1rem 0; }
.terms-info-box > i   { font-size: 1.5rem; color: var(--accent-light-blue); flex-shrink: 0; }
.terms-info-box strong{ color: var(--primary-dark); font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); }
.terms-info-box ul    { padding-left: 1.25rem; margin: 0; }
.terms-info-box ul li { font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); color: var(--text-muted); padding: 0.25rem 0; }

.terms-contact-card   { background: var(--warm-cream); border-radius: 12px; padding: 1.25rem; margin-top: 1rem; }
.terms-contact-item   { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; }
.terms-contact-item:first-child { padding-top: 0; }
.terms-contact-item:last-child  { padding-bottom: 0; }
.terms-contact-item i { color: var(--accent-light-blue); font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.terms-contact-item span { font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); color: var(--text-muted); line-height: 1.5; }

/* Modal open animation */
.modal.fade .modal-dialog,
#termsModal.modal.fade .modal-dialog,
#accessibilityModal.modal.fade .modal-dialog { transform: scale(0.9) translateY(-20px); opacity: 0; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal.show .modal-dialog,
#termsModal.modal.show .modal-dialog,
#accessibilityModal.modal.show .modal-dialog { transform: scale(1) translateY(0); opacity: 1; }


/* ============================================================
   ACCESSIBILITY — SKIP LINK
   ============================================================ */
.skip-to-content {
    position:      absolute;
    top:           -100px;
    left:          50%;
    transform:     translateX(-50%);
    background:    var(--accent-light-blue);
    color:         white;
    padding:       0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight:   600;
    z-index:       9999;
    transition:    top 0.2s ease;
}
.skip-to-content:focus { top: 0; color: white; outline: 2px solid white; outline-offset: 2px; }


/* ============================================================
   ANIMATIONS (keyframes)
   ============================================================ */
@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40%                      { transform: translateX(-50%) translateY(10px); }
    60%                      { transform: translateX(-50%) translateY(5px); }
}
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
@keyframes donationPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}
@keyframes copySuccess {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}


/* ============================================================
   HIGH-CONTRAST MODE
   ============================================================ */
@media (prefers-contrast: high) {
    .donation-info-card     { border: 2px solid var(--primary-dark); }
    .donation-value-wrapper { border: 2px solid var(--primary-dark); }
    .btn-copy               { border: 1px solid var(--accent-light-blue); }
    .donation-close-btn,
    .terms-close-btn        { border: 1px solid white; }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:        0.01ms !important;
        animation-iteration-count: 1     !important;
        transition-duration:       0.01ms !important;
        scroll-behavior:           auto  !important;
    }

    /* Suppress hover transforms */
    .ministry-card:hover,
    .event-card:hover,
    .value-card:hover,
    .btn-light-blue:hover,
    .btn-outline-light-blue:hover,
    .btn-outline-white:hover,
    .back-to-top:hover,
    .footer-social a:hover,
    .offcanvas-social a:hover,
    .offcanvas-link:hover,
    .sermon-play-btn:hover,
    .featured-badge:hover,
    .pastor-card:hover .pastor-img { transform: none; }

    .animate-fade-in { opacity: 1; transform: none; }

    .navbar,
    .offcanvas-menu,
    .offcanvas-overlay { transition: none; }

    .modal.fade .modal-dialog,
    #termsModal.modal.fade .modal-dialog,
    #accessibilityModal.modal.fade .modal-dialog { transition: opacity 0.15s linear; transform: none; }

    .donation-icon-circle { animation: none; }

    .btn-copy, .donation-quick-copy,
    .donation-value-wrapper,
    .donation-close-btn, .terms-close-btn { transition: none; }

    .btn-copy.copied i { animation: none; }

    .navbar .btn-kolehti,
    .navbar .btn-kolehti:hover { transition: none; transform: none; }
}


/* ============================================================
   RESPONSIVE — TABLET  (≤ 991px)
   ============================================================ */
@media (max-width: 991.98px) {
    .hero-title    { font-size: clamp(2.2rem, 1.5rem + 3vw, 3rem); }
    .section-title { font-size: clamp(1.8rem, 1.4rem + 1vw, 2.2rem); }

    .navbar-toggler  { display: flex; }
    .navbar-collapse { display: none !important; }

    .about-image-accent  { display: none !important; }
    .about-image-wrapper { padding-bottom: 0; margin-bottom: 0; }
    .about-stats         { position: relative; bottom: 0; right: 0; margin-top: 1rem; display: inline-block; }
    .about-main-image    { height: 350px; }
}


/* ============================================================
   RESPONSIVE — MOBILE  (≤ 767px)
   ============================================================ */
@media (max-width: 767.98px) {
    /* Typography */
    .hero-title    { font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.4rem); }
    .section-title { font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem); }
    .cta-title     { font-size: clamp(1.6rem, 1.3rem + 0.8vw, 2rem); }
    .counter-box h2{ font-size: clamp(1.6rem, 1.3rem + 0.8vw, 2rem); }
    p              { hyphens: none; -webkit-hyphens: none; }

    /* Layout */
    .section-padding  { padding: 4rem 0; }
    .row              { margin-left: 0 !important; margin-right: 0 !important; }
    .container,
    .container-fluid  { max-width: 100%; padding-left: 5px; padding-right: 5px; }

    .cta-section::before,
    .cta-section::after { display: none; }

    .btn-group-stack .btn { width: 100%; flex: 1 1 100%; }

    /* Subpage hero */
    .subpage-hero          { min-height: 45vh; padding: 100px 0 60px; }
    .subpage-hero-subtitle { font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); padding: 0 1rem; }
    .subpage-hero-scroll   { display: none; }
    .subpage-hero-breadcrumb { flex-wrap: wrap; gap: 0.5rem; }

    /* Accordion */
    .sermon-accordion .accordion-button { padding: 1rem; font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }
    .accordion-month-icon               { width: 42px; height: 42px; font-size: 1.1rem; }
    .accordion-sermon-item              { flex-wrap: wrap; padding: 0.875rem; }
    .accordion-sermon-info              { flex: 1 1 calc(100% - 60px); }
    .accordion-sermon-title             { white-space: normal; font-size: clamp(0.8rem, 0.75rem + 0.15vw, 0.9rem); }
    .accordion-sermon-meta              { flex-wrap: wrap; gap: 0.5rem; }

    /* Article */
    .article-content { line-height: 1.8; }
    .article-header  { margin-bottom: 2rem; }
    .article-section { margin-bottom: 2rem; }
    .article-section h3 { letter-spacing: 2px; }
    .article-section:first-of-type p:first-child::first-letter { font-size: 2.75rem; }
    .article-content--divided .article-section { padding-bottom: 2rem; }

    /* Suppress hyphens in rich-text blocks */
    p, .ministry-card-body p, .testimonial-card p,
    .footer-description, .event-description p,
    .accordion-sermon-description { hyphens: none; -webkit-hyphens: none; }

    /* Footer */
    .footer { padding: 4rem 0 2rem; }
    .footer-bottom-links { flex-direction: column; gap: 0.75rem; align-items: center; }

    /* Church location */
    .church-location    { padding: 1.5rem; }
    .church-location ul { text-align: center; }
    .church-location li { justify-content: center; }

    /* About */
    .about-stats      { position: relative; bottom: 0; right: 0; margin-top: 1rem; display: inline-block; }
    .about-main-image { height: 350px; }

    /* Modals */
    #termsModal .modal-dialog,
    #accessibilityModal .modal-dialog { margin: 0.5rem; }
    .terms-modal-header   { padding: 1.5rem 1.5rem 1.25rem; }
    .terms-modal-body     { padding: 1.25rem 1.5rem 1.5rem; max-height: 55vh; }
    .terms-modal-footer   { padding: 1rem 1.5rem; }
    .terms-icon-circle    { width: 50px; height: 50px; }
    .terms-icon-circle i  { font-size: 1.5rem; }
    .terms-section-number { width: 24px; height: 24px; font-size: 0.75rem; }
    .terms-info-box       { flex-direction: column; gap: 0.75rem; }
    .terms-contact-card   { padding: 1rem; }
}


/* ============================================================
   RESPONSIVE — SMALL MOBILE  (≤ 575px)
   ============================================================ */
@media (max-width: 575.98px) {
    .hero-title          { font-size: clamp(1.6rem, 1.2rem + 2vw, 2rem); }
    .hero-badge          { font-size: clamp(0.6rem, 0.55rem + 0.15vw, 0.7rem); padding: 0.4rem 1rem; }
    .section-title       { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.8rem); }
    .sermon-featured-img { height: 280px; }
    .pastor-img          { width: 120px; height: 120px; }

    .offcanvas-menu   { width: 100%; max-width: 100%; right: -100%; }
    .offcanvas-link   { padding: 0.9rem 1rem; font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }
    .offcanvas-header { padding: 1rem 1.25rem; }

    .subpage-hero          { min-height: 40vh; padding: 90px 0 50px; }
    .subpage-hero-title    { font-size: clamp(1.8rem, 1.5rem + 1vw, 2rem); }
    .subpage-hero-subtitle { font-size: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem); }
    .subpage-hero::before,
    .subpage-hero::after   { display: none; }

    .accordion-month-info    { flex: 1; }
    .accordion-month-name    { font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); }
    .accordion-episode-count { font-size: clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem); }

    /* Modals */
    .modal-dialog,
    #donationModal .modal-dialog { margin: 1rem; }
    .donation-modal-header  { padding: 2rem 1.5rem 1.5rem; }
    .donation-modal-body    { padding: 1.5rem; }
    .donation-info-card     { padding: 1.25rem; }
    .donation-value         { font-size: clamp(0.9rem, 0.85rem + 0.15vw, 1rem); word-break: break-all; }
    .donation-value-wrapper { padding: 0.875rem 1rem; }
    .donation-icon-circle   { width: 60px; height: 60px; }
    .donation-icon-circle i { font-size: 1.75rem; }
    .donation-quick-copy    { width: 100%; padding: 0.75rem 1.5rem; }
    .btn-copy               { width: 34px; height: 34px; }
    .donation-close-btn     { width: 32px; height: 32px; top: 1rem; right: 1rem; }
    .donation-close-btn i   { font-size: 0.9rem; }
    .terms-modal-body       { max-height: 50vh; }
    .terms-close-btn        { width: 32px; height: 32px; }
    .terms-close-btn i      { font-size: 0.9rem; }
    .terms-modal-footer .btn{ width: 100%; min-width: unset; }
}


/* ============================================================
   RESPONSIVE — TINY  (≤ 375px)
   ============================================================ */
@media (max-width: 375px) {
    body { font-size: 1rem; }
    .article-content { line-height: 1.75; }
    .ministry-card-body p,
    .event-description p,
    .accordion-sermon-description { font-size: 0.9rem; }
    .donation-value { font-size: 0.85rem; }
    .donation-label { font-size: 0.7rem; }
}


/* ============================================================
   RESPONSIVE — LANDSCAPE KEYBOARD  (≤ 500px height)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .offcanvas-body   { padding: 1rem; }
    .offcanvas-nav li { margin-bottom: 0.25rem; }
    .offcanvas-link   { padding: 0.7rem 1rem; }
    .offcanvas-divider{ margin: 0.75rem 0; }
    .offcanvas-info   { display: none; }
}


/* ============================================================
   RESPONSIVE — WIDE DESKTOP  (≥ 1200px)
   ============================================================ */
@media (min-width: 1200px) {
    .article-content { max-width: 70ch; }

    p,
    .article-content p,
    .testimonial-card p { hyphens: auto; -webkit-hyphens: auto; }
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
    body { font-size: 12pt; line-height: 1.5; color: #000; }

    h1, h2, h3, h4, h5, h6,
    .hero-title, .section-title, .cta-title { color: #000; page-break-after: avoid; }

    p { orphans: 3; widows: 3; }

    .article-section,
    .ministry-card,
    .event-card,
    .testimonial-card { page-break-inside: avoid; }

    .navbar, .footer, .back-to-top,
    .offcanvas-menu, .offcanvas-overlay { display: none !important; }
}