:root {
    --theme-primary: #13416a;
    --theme-danger: #d9534f;
    --theme-dark-bg: #343a40;
    --theme-dark-text: #ccc;
    --theme-dark-heading: #ffffff;

    /* --- Light Mode (Default) --- */
    --color-background: #f8f9fa;
    --color-surface: #ffffff;
    --color-surface-light: #f8f9fa;
    --color-text: #333;
    --color-text-muted: #777;
    --color-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --accordion-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%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");
}

body.dark-mode {
    /* --- Dark Mode Overrides --- */
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-surface-light: #2a2a2a;
    --color-text: rgba(255, 255, 255, 0.87);
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 4px 12px rgba(0,0,0,0.2);
    --accordion-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgba(255,255,255,0.87)'%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");
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* --- 1. Announcement Banner --- */
.announcement-banner {
    background-color: var(--theme-danger);
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative; 
    z-index: 10; 
    box-shadow: 0 0 10px var(--theme-danger), 0 0 20px var(--theme-danger), 0 0 30px var(--theme-danger);
    animation: pulse-opacity 1s infinite alternate;
}

.announcement-banner a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

@keyframes pulse-opacity {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* --- 2. Navigation Bar --- */
/* Header is always dark, so no changes */
.navbar {
    background-color: var(--theme-primary);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff; 
}
.navbar-brand:hover {
    color: #eee;
}
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8); 
    display: flex; 
    align-items: center;
}
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff; 
}

/* Theme Toggle Button Styles */
.navbar-dark .navbar-nav .nav-link.btn-theme-toggle {
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: 0.375rem;
    line-height: 1;
}
.navbar-dark .navbar-nav .nav-link.btn-theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}
body.dark-mode #theme-toggle-btn .fa-moon {
    display: none;
}
body:not(.dark-mode) #theme-toggle-btn .fa-sun {
    display: none;
}


/* Dark mode dropdowns */
.dropdown-menu {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}
.dropdown-menu .dropdown-item {
    color: var(--color-text);
    display: flex; 
    align-items: center;
}
.dropdown-menu .dropdown-item:hover {
    color: var(--color-text);
    background-color: var(--color-background);
}

.dropdown-item .fa-fw {
    margin-right: 0.5rem;
    text-align: center;
}
.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- 3. Hero Section --- */
.hero-section {
    /* Set a tight height for the header area */
    height: 80vh; 
    /*min-height: 400px; 
    max-height: 550px; */

    position: relative;
    overflow: hidden; 
    text-align: center; 
    color: white; 
}

/* Background/Image Styling for Carousel */
.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.hero-slider-img {
    height: 100%; 
    object-fit: cover;
    object-position: center bottom;
}

/* Overlay Styling */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65); 
    z-index: 2;
}
.hero-content-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the content */
    z-index: 3; 
    width: 100%;
    padding: 2rem;
}


.hero-content-overlay h1 {
    font-size: 3.5rem;
    font-weight: 700;
    /* FIX: Reduce top margin for mobile vertical space */
    margin-top: 0.5rem; 
}
.hero-content-overlay p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}
/* Adjustments for mobile: smaller text and more compact layout */
@media (max-width: 768px) {
    .hero-section {
        height: 50vh !important; /* Slightly taller on mobile for better image visibility */
    }
    .hero-content-overlay {
        padding: 1rem; /* Less padding to maximize space */
		    top: 73% !important;
    }
    .hero-content-overlay h1 {
        font-size: 2rem; /* Smaller title */
        /* FIX: Adjust vertical position on smaller screens */
        margin-top: 0; 
        margin-bottom: 0.5rem; 
    }
    .hero-content-overlay p {
        font-size: 1rem; /* Smaller lead text */
        margin-bottom: 1.5rem;
    }
}


/* --- 4. Main Content Area --- */
.page-content {
    padding: 4rem 0;
}

/* Base card for light/dark surfaces */
.content-card {
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    background-color: var(--color-surface);
}
/* Ensure all card bodies use surface color */
.card-body,
.list-group-item,
.card-footer {
    background-color: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}
.text-muted {
    color: var(--color-text-muted) !important;
}

/* Service Times card headers */
.card-header.bg-primary {
    background-color: var(--theme-primary) !important;
}

/* Beliefs Accordion */
.accordion-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border) !important;
}
.accordion-button {
    background-color: var(--color-surface);
    color: var(--color-text);
}
.accordion-button:not(.collapsed) {
    background-color: var(--color-background);
    color: var(--theme-primary);
    box-shadow: inset 0 -1px 0 var(--color-border);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(19, 65, 106, 0.25);
}
.accordion-button::after {
    background-image: var(--accordion-icon);
}

/* --- 5. Footer --- */
/* Footer is always dark, no changes */
.footer {
    background-color: var(--theme-dark-bg);
    color: var(--theme-dark-text);
    padding: 3rem 1.5rem;
}
.footer h5 {
    color: var(--theme-dark-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer p {
    font-size: 0.9rem;
}
.footer .social-links a {
    color: var(--theme-dark-text);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.2s;
}
.footer .social-links a:hover {
    color: var(--theme-dark-heading);
}
.footer .footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

/* --- 6. Page Header (for sub-pages) --- */
.page-header {
    background-color: var(--theme-dark-bg);
    color: var(--theme-dark-heading);
    border-bottom: 5px solid var(--theme-primary);
}
.page-header h1 {
    font-weight: 700;
}

/* --- 7. Content Page Styles --- */
.page-content p,
.page-content li {
    font-size: 1.05rem;
    line-height: 1.7;
}
.bible-verse {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    border-left: 5px solid var(--theme-primary);
}
.bible-verse .blockquote-footer {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}
/* Call to action box on Eternal Life page */
.bg-light {
    background-color: var(--color-surface-light) !important;
}
/* Ensure dark mode CTA button is dark */
body.dark-mode .btn-dark {
    background-color: #343a40;
    border-color: #343a40;
    color: #fff;
}
body.dark-mode .btn-dark:hover {
    background-color: #495057;
    border-color: #495057;
}

/* --- Online Giving Page --- */
.option-bank, .option-card {
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: .375rem;
    padding: 1.5rem;
}
body.dark-mode .option-bank,
body.dark-mode .option-card {
    background-color: #121212; /* Darker surface for card */
}

.bank-details .list-group-item {
    padding-left: 0;
    padding-right: 0;
    background: none;
    color: var(--color-text);
    border-color: var(--color-border);
}

.stripe-form-container { 
    margin-top: 20px; 
    padding: 1.5rem; 
    background: var(--color-background); 
    border-radius: .375rem; 
    border: 1px solid var(--color-border);
}
.stripe-security-blurb p {
    margin-bottom: 0;
}

/* Form inputs in dark mode */
body.dark-mode .stripe-amount,
body.dark-mode .stripe-email,
body.dark-mode .missionary-allocation,
body.dark-mode .special-needs-allocation {
    background-color: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.amount-buttons .amount-button {
    flex-grow: 1;
}

.stripe-payment-message { 
    font-size: 0.9rem; 
    margin-top: 15px; 
}
.stripe-payment-message:not(:empty) {
    padding: 10px;
    border-radius: 5px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}
.stripe-payment-message.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.stripe-payment-message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
body.dark-mode .stripe-payment-message.error {
    background: #721c24; color: #f8d7da;
}
body.dark-mode .stripe-payment-message.success {
    background: #155724; color: #d4edda;
}
.stripe-submit-btn:disabled {
    cursor: wait;
}

/* Modal for copy-to-clipboard */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.6); 
    display: none; align-items: center; justify-content: center; 
    z-index: 1060; opacity: 0; transition: opacity 0.3s ease-in-out; 
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content { 
    background-color: var(--color-surface);
    color: var(--color-text);
    padding: 25px 35px; border-radius: 8px; 
    text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    font-size: 1.1rem; font-weight: 500;
}

/* --- TTS Loader Style --- */
.tts-loading-indicator {
    display: none; /* Hidden by default, shown by JS */
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    color: var(--theme-primary);
}

/* --- Calendar Styles --- */
.celebration-calendar {
    table-layout: fixed;
}
.celebration-calendar th {
    background-color: #f8f9fa;
    color: #495057;
    padding: 10px;
}
.celebration-calendar td {
    height: 120px;
    vertical-align: top;
    padding: 8px;
    position: relative;
}
.celebration-calendar .day-number {
    font-weight: bold;
    color: #aaa;
    margin-bottom: 5px;
    text-align: right;
}
.celebration-calendar td.today {
    background-color: #e8f4fd; /* Light blue highlight */
}
.celebration-calendar .calendar-event {
    font-size: 0.85rem;
    background-color: var(--theme-primary); /* Theme Primary */
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

/* --- Utility Classes --- */
.text-primary {
     color: var(--theme-primary) !important;
}
.btn-primary {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}
.btn-primary:hover {
    background-color: #0f3659;
    border-color: #0f3659;
}
.btn-outline-primary {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}
.btn-outline-primary:hover {
    background-color: var(--theme-primary);
    color: #fff;
}