:root {
    --bg: #faf8f5;
    --bg-alt: #f0ebe3;
    --fg: #0a1628;
    --fg-muted: #4a5568;
    --accent: #d4a853;
    --accent-hover: #e8c675;
    --navy: #0a1628;
    --navy-light: #152238;
    --card: #ffffff;
    --border: #e2ddd5;
    --shadow: rgba(10, 22, 40, 0.1);
}

[data-theme="dark"] {
    --bg: #0a1628;
    --bg-alt: #152238;
    --fg: #faf8f5;
    --fg-muted: #a0aec0;
    --card: #1a2942;
    --border: #2d3f5a;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ========================================
   LOGO SECTION (User Provided Code)
   ======================================== */

.logo-container{
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

/* LOGO */
.logo{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid gold;
    box-shadow: 0 0 10px rgba(255,215,0,0.8);
    animation: glow 2s infinite alternate;
}

.logo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TEXT */
.logo-text h1{
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(to right, #fff6b7, #ffd700, #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Cormorant Garamond', serif; /* Added for consistency */
}

.logo-text p{
    color: #d1d5db;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* GLOW ANIMATION */
@keyframes glow{
    from{ box-shadow: 0 0 1px rgba(255,215,0,0.5); }
    to{ box-shadow: 0 0 1px rgba(255,215,0,1); }
}

/* ========================================
   GENERAL STYLES
   ======================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* Typography */
.font-display { font-family: 'Cormorant Garamond', serif; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.animate-fade-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero Background */
.hero-bg {
    background: linear-gradient(135deg, #0a1628 0%, #152238 50%, #1a2942 100%);
    position: relative;
    overflow: hidden;
}
.hero-bg::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(212, 168, 83, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(212, 168, 83, 0.1) 0%, transparent 40%);
    pointer-events: none;
}
.hero-pattern {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a853' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px var(--shadow); }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #c49a47 100%);
    color: #0a1628;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212, 168, 83, 0.4); }

.btn-secondary {
    background: transparent;
    color: var(--fg);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid var(--accent);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-secondary:hover { background: var(--accent); color: #0a1628; }

/* Navigation */
.nav-link { position: relative; color: var(--fg); text-decoration: none; font-weight: 500; padding: 8px 16px; transition: color 0.3s ease; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--accent); transition: all 0.3s ease; transform: translateX(-50%); }
.nav-link:hover::after { width: 80%; }
.nav-link:hover { color: var(--accent); }

/* Section styling */
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; line-height: 1.2; }
.section-subtitle { font-size: 1.125rem; color: var(--fg-muted); max-width: 600px; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10, 22, 40, 0.8); backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--card); border-radius: 20px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; transform: scale(0.9); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: scale(1); }

/* Form inputs */
.form-input { width: 100%; padding: 14px 18px; border: 2px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); font-size: 1rem; transition: all 0.3s ease; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.1); }

/* Countdown */
.countdown-item { background: var(--card); border-radius: 12px; padding: 16px; text-align: center; min-width: 70px; border: 1px solid var(--border); flex: 1; }
.countdown-number { font-family: 'Cormorant Garamond', serif; font-size: 1.75rem; font-weight: 700; color: var(--accent); line-height: 1; }

/* Sermon player */
.sermon-player { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); border-radius: 16px; overflow: hidden; }
.progress-bar { height: 6px; background: rgba(255, 255, 255, 0.2); border-radius: 3px; cursor: pointer; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; }

/* Mobile menu */
.mobile-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--card); z-index: 200; transition: right 0.3s ease; box-shadow: -10px 0 40px var(--shadow); overflow-y: auto; }
.mobile-menu.active { right: 0; }
.mobile-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 150; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* Tabs */
.tab-btn { padding: 12px 16px; background: transparent; border: none; color: var(--fg-muted); font-weight: 500; cursor: pointer; position: relative; transition: all 0.3s ease; }
.tab-btn.active { color: var(--accent); }
.tab-btn::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.3s ease; }
.tab-btn.active::after { transform: scaleX(1); }

/* Testimonial slider */
.testimonial-slider { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-slide { min-width: 100%; padding: 0 20px; }

/* Gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media(min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media(min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-item { aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); }

/* Bible verse */
.verse-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); border-radius: 20px; position: relative; overflow: hidden; }
.verse-card::before { content: '"'; position: absolute; top: -20px; left: 20px; font-size: 150px; font-family: 'Cormorant Garamond', serif; color: rgba(212, 168, 83, 0.1); line-height: 1; }

/* Focus states */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Badge */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-gold { background: rgba(212, 168, 83, 0.15); color: var(--accent); }

/* Lightbox */
.lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.95); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; }
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 8px; }

/* ======================================== 
   RESPONSIVE FIXES
   ======================================== */

/* Force grids to 1 column on very small screens */
@media (max-width: 640px) {
    #sermonGrid, #eventsGrid, #booksGrid, #blogGrid {
        grid-template-columns: 1fr !important;
    }
    .section-title { font-size: 1.875rem; }
    .section-subtitle { font-size: 1rem; }

    /* Show logo text but scale it down to fit */
    .logo-text {
        display: block;
    }

    .logo-text h1 {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .logo-text p {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .logo {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .logo-container {
        gap: 8px;
        min-width: 0;
        flex-shrink: 1;
    }
}
/* Show Logo Text on Tablet and Desktop */
@media (min-width: 641px) {
    .logo-text {
        display: block;
    }
}