/* ============================================================
   BASE
   ============================================================ */
:root {
    --primary:   #1B2D5B;
    --primary-dark: #152b47;
    --secondary: #C9A84C;
    --accent:    #8B2635;
    --light:     #FAF8F5;
    --dark:      #1a1a2e;
    --gray-100:  #F3F1EE;
    --gray-200:  #E5E2DD;
    --gray-600:  #6B7280;
    --brand-primary:   var(--primary);
    --brand-secondary: var(--secondary);
    --brand-accent:    var(--accent);
}

*,*::before,*::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #FAF8F5;
    color: #1f2937;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scrollProgressBar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--secondary);
    z-index: 99999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.font-serif-display,
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: var(--primary);
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}

.hero-image {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(27,45,91,0.72);
    z-index: 1;
}

.hero-section:has(.hero-video) .hero-overlay,
.hero-section:has(.hero-image) .hero-overlay {
    background: rgba(27,45,91,0.58);
}

.hero-section .container { position: relative; z-index: 10; }

/* Hero Carousel */
.hero-carousel {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0;
    overflow: hidden;
}
.hero-carousel .hero-video,
.hero-carousel .hero-image {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.hero-carousel .hero-video.active,
.hero-carousel .hero-image.active {
    opacity: 1;
    pointer-events: auto;
}

/* Hero mute button */
.hero-mute-btn {
    position: absolute;
    bottom: 28px; right: 28px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.hero-mute-btn:hover { background: rgba(0,0,0,0.75); }

/* Scroll indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 24px; left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.scroll-down-indicator:hover { color: #fff; }
.scroll-mouse {
    width: 22px; height: 34px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 11px;
    position: relative;
}
.scroll-wheel {
    width: 3px; height: 6px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 5px; left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel-anim 1.7s ease infinite;
}
@keyframes scroll-wheel-anim {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.modern-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modern-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .modern-section-title { font-size: 2.75rem; }
}
@media (max-width: 639px) {
    .modern-section-title { font-size: 1.8rem !important; }
}

.title-accent-bar {
    width: 48px;
    height: 3px;
    background: var(--secondary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================================
   BADGE PILLS
   ============================================================ */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.badge-blue    { background: #EEF1F8; color: var(--primary); border: 1px solid #C8D0E3; }
.badge-gold    { background: #F9F4E8; color: #7a5e1a;        border: 1px solid #DECA8A; }
.badge-crimson { background: #F5EAEC; color: var(--accent);  border: 1px solid #D9A5AD; }
.badge-purple  { background: #F1EEF8; color: #5b3f8a;        border: 1px solid #C8B8E6; }

/* ============================================================
   CARDS
   ============================================================ */
.glow-card {
    border: 1px solid #E5E2DD;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.glow-card:hover {
    box-shadow: 0 8px 24px rgba(27,45,91,0.1);
    transform: translateY(-3px);
}

.hover-lift {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.hover-lift:hover {
    box-shadow: 0 8px 24px rgba(27,45,91,0.1);
    transform: translateY(-3px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

/* ============================================================
   MINISTRY / SERMON / EVENT / GALLERY CARDS
   ============================================================ */
.ministry-card {
    transition: box-shadow 0.25s ease;
    border-top: 3px solid transparent;
}
.ministry-card:hover {
    border-top-color: var(--secondary);
    box-shadow: 0 6px 20px rgba(27,45,91,0.08);
}

.sermon-card { transition: box-shadow 0.25s ease; }
.sermon-card:hover { box-shadow: 0 6px 20px rgba(27,45,91,0.1); }

.event-card { transition: box-shadow 0.25s ease; }

.gallery-item { position: relative; overflow: hidden; border-radius: 6px; }
.gallery-item img { transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); }

/* ============================================================
   STATS COUNTER
   ============================================================ */
.stats-counter {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    font-family: 'Playfair Display', Georgia, serif;
}
@media (max-width: 768px) { .stats-counter { font-size: 2.5rem; } }

/* ============================================================
   EVENT COUNTDOWN
   ============================================================ */
.event-urgent {
    border: 2px solid #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.event-today {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}
@keyframes badge-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}
.countdown-badge { animation: badge-bounce 1.8s ease-in-out infinite; display: inline-block; }
.today-badge {
    font-weight: 900;
    font-size: 1.05em;
    color: #b45309;
}
.days-left-bar {
    height: 3px;
    border-radius: 2px;
    background: #ef4444;
    transition: width 0.4s ease;
}

/* Play button pulse */
@keyframes play-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(220,38,38,0.6); }
    70%  { box-shadow: 0 0 0 14px rgba(220,38,38,0); }
    100% { box-shadow: 0 0 0 0   rgba(220,38,38,0); }
}
.play-btn-pulse { animation: play-pulse 2s infinite; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top-wrap {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 60;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.back-to-top-wrap.visible {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}
.back-to-top-circle-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(27,45,91,0.3);
    transition: background 0.2s, transform 0.2s;
    position: relative;
}
.back-to-top-circle-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.06);
}
.scroll-progress-svg {
    position: absolute;
    top: -4px; left: -4px;
    width: 56px; height: 56px;
    transform: rotate(-90deg);
    pointer-events: none;
}
.scroll-progress-circle {
    stroke: var(--secondary);
    stroke-width: 3;
    stroke-linecap: round;
    fill: transparent;
    stroke-dasharray: 175.9;
    stroke-dashoffset: 175.9;
    transition: stroke-dashoffset 0.1s linear;
}

/* ============================================================
   GLASS CARD (hero only — kept minimal)
   ============================================================ */
.glass-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: #FAF8F5; }
::-webkit-scrollbar-thumb { background: #C8D0E3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   ANIMATIONS (AOS supplement — keep only fade/slide, no floats)
   ============================================================ */
@keyframes fadeInUp   { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-24px);} to { opacity:1; transform:translateY(0); } }

.animate-fade-in-up   { animation: fadeInUp   0.7s ease forwards; }
.animate-fade-in-down { animation: fadeInDown 0.7s ease forwards; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #E5E2DD;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
html, body { max-width: 100%; overflow-x: hidden; }

@media (max-width: 639px) {
    .container { padding-left: 1rem !important; padding-right: 1rem !important; }
    h1 { word-break: break-word; }
    .hero-section { padding-top: 5rem; padding-bottom: 3.5rem; }
    .stats-counter { font-size: 2rem !important; }
    .back-to-top-wrap  { bottom: 1rem; right: 1rem; }
    .back-to-top-circle-btn { width: 42px; height: 42px; }
    .scroll-progress-svg { width: 50px; height: 50px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .container { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    .hero-section { padding-top: 7rem; padding-bottom: 5rem; }
}
@media (min-width: 1024px) {
    .container { padding-left: 2rem !important; padding-right: 2rem !important; }
}
