:root {
    --color-primary: #1e40af;
    --color-primary-rgb: 30 64 175;
    --color-secondary: #f59e0b;
    --color-secondary-rgb: 245 158 11;
    --color-nav-bg: #ffffff;
    --color-text: #1f2937;
    --color-bg: #f8fafc;
}

/* Page loader */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-nav-bg, #ffffff);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-loader.hidden-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-primary, #1e40af);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast colors */
#site-toast[data-type="success"] { background: #16a34a; }
#site-toast[data-type="error"] { background: #dc2626; }
#site-toast[data-type="info"] { background: #2563eb; }
#site-toast[data-type="warning"] { background: #d97706; }

#site-toast.show-toast {
    transform: translateY(0);
    opacity: 1;
}

/* Smooth scroll & selection */
html { scroll-behavior: smooth; }
::selection { background: var(--color-primary, #1e40af); color: #fff; }

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Image lazy load fade */
img[data-src],
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img.loaded,
.lazy-img.loaded { opacity: 1; }

/* Card hover lift */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.15);
}

/* Section divider shapes */
.section-wave {
    position: relative;
}
.section-wave::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,64L48,69.3C96,75,192,85,288,80C384,75,480,53,576,48C672,43,768,53,864,69.3C960,85,1056,107,1152,106.7C1248,107,1344,85,1392,74.7L1440,64L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") bottom/cover no-repeat;
}

/* Back to top */
#back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Hero overlay used by homepage banner */
.hero-overlay {
    background: rgba(15,23,42,0.80);
}

/* Nav underline animation */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-secondary, #f59e0b);
    transition: width 0.3s ease, left 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Focus visible for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--color-secondary, #f59e0b);
    outline-offset: 2px;
}

/* Church-inspired design utilities */
.font-playfair { font-family: 'Playfair Display', serif; }

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 18px;
    background: #f1f5f9;
    color: var(--color-secondary, #f59e0b);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.gold-text { color: var(--color-secondary, #f59e0b); font-weight: 700; }

.btn-gold {
    background: var(--color-secondary, #f59e0b);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.btn-gold:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.feature-card, .event-card, .testimony-card, .counter-card, .gallery-item {
    transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.feature-card:hover, .event-card:hover, .testimony-card:hover, .counter-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary, #1e40af);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 16px;
    transition: transform 0.3s;
}
.feature-card:hover .feature-icon { transform: rotate(6deg) scale(1.08); }

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(var(--color-primary-rgb, 30 64 175) / 0.2);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background: #fff;
    color: #1f2937;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input:focus {
    border-color: var(--color-primary, #1e40af);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb, 30 64 175) / 0.12);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Decorative floating shapes */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    pointer-events: none;
}

/* Top bar */
.top-bar a { transition: color 0.25s ease, transform 0.25s ease; }
.top-bar a:hover { transform: translateY(-1px); }

/* Marquee / updates ticker */
.updates-ticker { background: var(--color-secondary, #f59e0b); }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-content { display: flex; gap: 3rem; padding-right: 3rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes gradientShift { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }

/* Tech hero extras - subtle grid only */
.tech-grid {
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.35;
}
.hero-blob { display: none; }
@keyframes floatBlob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -30px); } }

/* Glow utilities - disabled for cleaner look */
.glow, .glow-secondary { box-shadow: none !important; }

/* Counter cards - dark, solid, modern */
.counter-card {
    background: #0f172a;
    color: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border-top: 4px solid var(--color-secondary, #f59e0b);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.counter-card .text-4xl { color: #fff; }
.counter-card .text-sm { color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.counter-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.14); }

/* Hover enhancements - subtle, no glow */
a { transition: color 0.25s ease, transform 0.25s ease; }
.btn-gold { transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.nav-link { transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease; }
.nav-link:hover { transform: translateY(-1px); }
.feature-card, .event-card, .testimony-card, .gallery-item, .card-lift { transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; }
.feature-card:hover, .event-card:hover, .testimony-card:hover, .card-lift:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .1); border-color: var(--color-primary, #1e40af); }
.feature-icon { transition: transform 0.35s ease, box-shadow 0.35s ease; }
.feature-card:hover .feature-icon { transform: rotate(6deg) scale(1.08); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.gallery-item img { transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover .gallery-overlay { opacity: 1; backdrop-filter: blur(2px); }
.social-icon { transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease; }
.social-icon:hover { transform: translateY(-3px); }

/* Testimonials */
.testimony-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; border-top: 4px solid var(--color-primary, #1e40af); padding: 28px; box-shadow: 0 4px 16px rgba(15, 23, 42, .05); transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; }
.testimony-card:hover { transform: translateY(-8px); box-shadow: 0 16px 36px rgba(15, 23, 42, .1); border-color: var(--color-primary, #1e40af); }
.testimony-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #e2e8f0; }

/* Newsletter */
.newsletter-input { width: 100%; padding: 14px 20px; border: 2px solid rgba(255,255,255,.25); border-radius: 9999px; background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(8px); outline: none; transition: border-color 0.3s, background 0.3s; }
.newsletter-input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-input:focus { border-color: var(--color-secondary, #f59e0b); background: rgba(255,255,255,.15); }

/* Page transition */
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.page-loaded main { animation: pageIn 0.7s cubic-bezier(.22,1,.36,1) forwards; }

/* Modern badge / tag */
.tech-badge { display: inline-flex; align-items: center; gap: .5rem; padding: 6px 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; }

/* Loader extras */
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.loading-text { font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-primary, #1e40af); font-size: 0.95rem; display: flex; align-items: center; gap: 0.25rem; }
.loading-dots { display: inline-flex; gap: 0.2rem; margin-left: 0.1rem; }
.loading-dots span { width: 6px; height: 6px; background: var(--color-secondary, #f59e0b); border-radius: 50%; animation: loadingDot 1.2s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadingDot { 0%, 80%, 100% { transform: scale(1); opacity: 0.4; } 40% { transform: scale(1.4); opacity: 1; } }
.loading-bar { width: 180px; height: 4px; background: rgba(var(--color-primary-rgb, 30 64 175) / 0.15); border-radius: 999px; overflow: hidden; }
.loading-progress { height: 100%; width: 0%; background: var(--color-primary, #1e40af); border-radius: 999px; animation: loadingProgress 1.8s ease-in-out infinite; }
@keyframes loadingProgress { 0% { width: 0%; margin-left: 0%; } 50% { width: 60%; margin-left: 0%; } 100% { width: 0%; margin-left: 100%; } }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* === MODERN FRONT-END REFINEMENTS === */

/* Hero section overlay for sub-pages (removed inline gradient) */
section.relative.py-28::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.80);
    z-index: 0;
}


/* Hero content glass card */
section.relative > .container > .relative.z-10 {
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
@media (min-width: 1024px) {
    section.relative > .container > .relative.z-10 {
        padding: 3.5rem;
    }
}

/* Hero floating badge accents */
.hero-accent {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Buttons */
.btn-primary { background: var(--color-primary); color: #fff; font-weight: 700; border-radius: 10px; padding: 14px 30px; transition: all .25s ease; display: inline-flex; align-items: center; gap: .5rem; }
.btn-primary:hover { background: #172c86; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,64,175,.25); }
.btn-outline { border: 2px solid #fff; color: #fff; font-weight: 700; border-radius: 10px; padding: 12px 28px; transition: all .25s ease; display: inline-flex; align-items: center; gap: .5rem; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--color-primary); }

/* Section headings */
h2.font-display { position: relative; display: inline-block; margin-bottom: 1rem; }
h2.font-display::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--color-secondary);
    border-radius: 999px;
}
.section-subtitle { color: #64748b; font-size: 1.05rem; max-width: 640px; margin: 0 auto 2.5rem; }

/* Counter cards with icon placeholder */
.counter-card { position: relative; overflow: hidden; }
.counter-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.counter-card .text-4xl { font-family: 'Inter', sans-serif; font-weight: 800; }

/* Department / feature cards */
.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(15,23,42,.05);
}
.feature-card:hover { border-color: var(--color-primary); }
.feature-icon {
    background: var(--color-primary, #1e40af);
    box-shadow: 0 8px 24px rgba(30,64,175,.25);
    border-radius: 16px;
}

/* Event cards */
.event-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15,23,42,.05);
}
.event-card img { transition: transform .6s ease; }
.event-card:hover img { transform: scale(1.08); }
.event-card .event-date {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--color-secondary);
    color: #fff;
    padding: .4rem .75rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: .75rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
.event-card .event-type {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--color-primary);
    color: #fff;
    padding: .25rem .6rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Testimonial cards */
.testimony-card {
    border-radius: 20px;
    padding: 2rem;
    position: relative;
}
.testimony-card::before {
    content: '"';
    position: absolute;
    top: 16px; left: 24px;
    font-size: 4rem;
    line-height: 1;
    color: rgba(30,64,175,.12);
    font-family: Georgia, serif;
}
.testimony-stars { color: var(--color-secondary); letter-spacing: .1em; }

/* Updates ticker */
.updates-ticker {
    background: var(--color-primary);
    color: #fff;
    padding: .85rem 0;
    font-size: .9rem;
    font-weight: 600;
}
.updates-ticker .marquee-track a { color: #fff; opacity: .95; }
.updates-ticker .marquee-track a:hover { opacity: 1; text-decoration: underline; }

/* Image radius */
img.rounded-2xl, .rounded-2xl img { border-radius: 18px; }

/* Newsletter section */
.newsletter-input:focus { box-shadow: 0 0 0 4px rgba(245,158,11,.25); }

/* Footer logo */
footer .w-12.h-12 { box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* Gallery */
.gallery-item { border-radius: 16px; overflow: hidden; }

/* Responsive section images */
.section-img {
    width: 100%;
    max-width: 560px;
    height: auto;
    max-height: clamp(260px, 45vw, 460px);
    object-fit: cover;
    border-radius: var(--border-radius, 16px);
    display: block;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 640px) {
    .section-img { max-height: 280px; }
}
