/* =================================================================
   IMPORTS & EXTERNAL STYLES
   ================================================================= */
/* Import external libraries like animate.css for animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* =================================================================
   ROOT VARIABLES (Theme Configuration)
   ================================================================= */

/* Global variables for Light Theme (Default) */
:root {
    /* Primary Colors */
    --primary-color: #2c5aa0; /* Main institutional color (e.g., links, buttons) */
    --secondary-color: #f8b500; /* Accent or highlight color (e.g., donation button) */
    --accent-color: #8b4513; /* Secondary accent color */

    /* Text Colors */
    --text-dark: #2d3748; /* Main body text color */
    --text-light: #718096; /* Secondary or muted text color */

    /* Background Colors */
    --bg-light: #f7fafc; /* Light background for sections/cards */
    --bg-white: #ffffff; /* White background for main elements */

    /* Layout Variables (Custom) */
    --nav-height: 80px; /* Standard navbar height for padding calculations */
}

/* Dark Theme Overrides - Applied when data-bs-theme="dark" attribute is present on the root element or body */
[data-bs-theme="dark"] {
    /* Primary Colors (Dark Mode Adjustments) */
    --primary-color: #4a90e2;
    --secondary-color: #ffd700;
    --accent-color: #cd853f;

    /* Text Colors (Dark Mode Adjustments) */
    --text-dark: #e2e8f0; /* Light text on dark background */
    --text-light: #a0aec0; /* Muted light text */

    /* Background Colors (Dark Mode Adjustments) */
    --bg-light: #1a202c; /* Dark background for sections/cards */
    --bg-white: #2d3748; /* Darker background for main elements (e.g., navbar, modals) */
}

/* =================================================================
   BASE & TYPOGRAPHY STYLES
   ================================================================= */

/* Global Reset: Set margin and padding to zero, and enable border-box model for all elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Body Styles */
body {
    /* Font setup */
    font-family: 'Inter', sans-serif;
    line-height: 1.6;

    /* Color scheme from variables */
    color: var(--text-dark);
    background-color: var(--bg-light); /* Using the light background for the body */

    /* Offset for fixed navbar */
    padding-top: var(--nav-height);
}

/* Display Font Class: for headings or special text */
.font-display {
    font-family: 'Playfair Display', serif;
}

/* =================================================================
   NAVBAR & HEADER STYLES
   ================================================================= */

/* Main Navbar Container */
.navbar {
    background-color: var(--bg-white) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease; /* Smooth transition for theme changes or sticky effects */
    padding: 1rem 0;
}

/* Navbar Brand (Logo/Title) */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

/* Navbar Brand Logo Image */
.navbar-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 0.5rem;
}

/* Navigation Links */
.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

/* Navigation Link Hover and Active States */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background-color: var(--bg-white);
    margin-top: 0.5rem;
}

.dropdown-item {
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Donate button inside the Navbar */
.navbar .btn-primary {
    /* Overriding default .btn-primary to use secondary color for prominence */
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    /* Keeping the original hover effects */
}

.navbar .btn-primary:hover {
    background-color: #e6a200; /* Slightly darker secondary color */
    border-color: #e6a200;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(248, 181, 0, 0.4);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

/* =================================================================
   SEARCH FUNCTIONALITY STYLES
   ================================================================= */

/* Search Container for positioning */
.search-container {
    position: relative;
    max-width: 300px;
    transition: all 0.3s ease;
}

/* Toggle Button for Search */
.search-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.search-toggle:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* Search Input Dropdown/Flyout Container */
.search-input-container {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0; /* Initially hidden */
    overflow: hidden;
    transition: width 0.4s ease;
    background-color: var(--bg-white);
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* State when search is active/open */
.search-input-container.active {
    width: 250px; /* Final width when open */
    opacity: 1;
    transform: translateY(-50%);
}

/* Actual Search Input Field */
.search-input {
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    width: 100%;
    outline: none;
    background-color: transparent;
    color: var(--text-dark);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* Search close button for inside the input container */
.search-close {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-input-container.active .search-close {
    opacity: 1;
}

.search-close:hover {
    color: var(--primary-color);
}

/* Search highlight effect - applies to active input */
.search-highlight {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(44, 90, 160, 0.3) !important;
    border: 2px solid var(--primary-color) !important;
    transition: all 0.3s ease;
}

/* =================================================================
   HERO SECTION STYLES
   ================================================================= */

/* Hero Section (Primary landing area) - Consolidated to keep the more complex version */
.hero {
    min-height: 90vh; /* Keep the larger height from the latest version */
    display: flex;
    align-items: center;
    position: relative;
    color: white;
    text-align: center;
    overflow: hidden;

    /* Initial Background (Example, typically set in HTML or a background property) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 8rem 0 4rem; /* Fallback padding from initial version */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); /* Text shadow for better contrast */
}

/* Hero Overlay (Darkens background image and applies gradient shift animation) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Animated gradient overlay for visual effect */
    background: linear-gradient(45deg,
        rgba(44, 90, 160, 0.8) 0%,
        rgba(248, 181, 0, 0.3) 50%,
        rgba(44, 90, 160, 0.8) 100%);
    animation: gradientShift 8s ease-in-out infinite;
    z-index: 1;
}

/* Hero Particle Overlay (Floating particles animation) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Generates small radial gradients to look like floating particles */
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    z-index: 1;
}

/* Container inside hero (ensures content is above overlays) */
.hero .container {
    position: relative;
    z-index: 2;
}

/* Hero Headings and Lead Text */
.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Live Stream Indicator */
.live-indicator {
    background-color: rgba(220, 53, 69, 0.9); /* Use the first, more specific color */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px; /* Use the first, more rounded radius */
    font-size: 0.875rem;
    font-weight: 600;
    animation: pulse 2s infinite; /* Keep the pulse animation */
}

/* =================================================================
   SECTION & TITLE STYLES
   ================================================================= */

/* Standard section padding */
.section-padding {
    padding: 5rem 0; /* Keeping the slightly larger padding */
}

/* Main section title */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Secondary section subtitle/description */
.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 3rem; /* Keeping the slightly larger margin for separation */
}

/* =================================================================
   BUTTON STYLES
   ================================================================= */

/* Base Button Styling */
.btn {
    border-radius: 25px; /* Standard button radius */
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Primary Button (Often for main actions) - Keeping the color from the last appearance */
.btn-primary {
    background-color: var(--secondary-color); /* Overriding to secondary for prominence */
    border-color: var(--secondary-color);
    color: var(--text-dark); /* Dark text on secondary color background */
    border-radius: 50px; /* Keeping the more rounded radius from the last appearance */
}

.btn-primary:hover {
    background-color: #e6a200; /* Darker secondary color */
    border-color: #e6a200;
    transform: translateY(-2px);
}

/* Outline Primary Button */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px; /* Keeping the more rounded radius from the last appearance */
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Warning Button (from sponsor section) */
.btn-warning {
    background-color: #ff7f32; /* A custom orange color */
    border: none;
}

/* Blinking Donate Button */
.btn-blink {
    font-weight: bold;
    color: #fff;
    background-color: green;
    border: none;
    animation: blinkDonate 1.5s infinite alternate;
}

.btn-blink:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* =================================================================
   CARD & MINISTRIES STYLES
   ================================================================= */

/* Standard Card Style */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    background-color: var(--bg-white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Ministry Card Specific Styling */
.ministry-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

/* Ministry Card Icon */
.ministry-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

/* =================================================================
   PAGE HEADER (e.g., News/Blog Page)
   ================================================================= */

/* Page Header for secondary pages */
.page-header {
    position: relative;
    min-height: 350px; /* Keeping the larger min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
    /* Calculate top padding based on the global nav height variable */
    padding-top: calc(var(--nav-height) + 30px);
    padding-bottom: 4rem;
    margin-bottom: 2rem;
    color: #fff; /* Ensure text is white against the dark background */

    /* Default background, can be overridden by inline style for specific pages */
    background: linear-gradient(rgba(44, 90, 160, 0.8), rgba(44, 90, 160, 0.8)) center/cover no-repeat;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
}

.page-header .lead {
    font-size: 1.25rem;
}

#current-date-time {
    display: block;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* =================================================================
   BREADCRUMBS
   ================================================================= */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* =================================================================
   NEWS & BLOG STYLES
   ================================================================= */

/* Grid layout for news cards */
.news-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 2rem;
}

.news-card {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.news-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-body {
    padding: 1.5rem;
}

.news-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-category {
    background: var(--secondary-color);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
}

.news-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* =================================================================
   FILTER & VIEW TOGGLE BUTTONS
   ================================================================= */
.filter-buttons {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Common style for both filter buttons and view toggle buttons */
.filter-btn,
.view-toggle button {
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active,
.view-toggle button.active {
    background: var(--primary-color);
    color: #fff;
}

.view-toggle button {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem; /* Adjust padding for view toggle buttons */
    border-radius: 5px; /* Use a less rounded corner for view toggle */
}

/* Ensure event card is block when visible */
.event-card {
    display: block;
}

/* =================================================================
   SIDEBAR STYLES
   ================================================================= */
.sidebar {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Latest Posts */
.latest-post {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.latest-post:last-child {
    margin-bottom: 0;
}

.latest-post-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 1rem;
}

.latest-post-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.latest-post-content h6 a {
    color: var(--text-dark);
    text-decoration: none;
}

.latest-post-content h6 a:hover {
    color: var(--primary-color);
}

.latest-post-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.4rem 0.9rem;
    border-radius: 25px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-badge:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Related Topics / List Group Items */
.list-group-item {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.list-group-item:hover {
    color: var(--primary-color);
}

/* =================================================================
   PAGINATION STYLES
   ================================================================= */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.25rem; /* Reduced gap for a cleaner look */
}

.page-link {
    border-radius: 25px !important;
    margin: 0 0.25rem;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* =================================================================
   MISCELLANEOUS COMPONENTS
   ================================================================= */

/* Events Date Block */
.event-date {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
    margin-right: 1rem;
}

/* Testimonial Card */
.testimonial-card {
    background-color: var(--bg-light); /* Kept the style from the final testimonial block */
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
}

/* Contact Form Input */
.form-control {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Modals */
.modal-content {
    border-radius: 15px;
}

.modal-header {
    border-bottom: none;
}

.modal-body {
    padding: 1.5rem;
}

/* Quran Widget */
.quran-widget {
    border: 2px solid #198754;
    border-radius: 16px;
    transition: 0.3s;
}

.quran-widget:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Prayer Cards */
#prayer-times .p-2 {
    
    transition: transform 0.3s, box-shadow 0.3s;
}
#prayer-times .p-2:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Prayer Badge */
.prayer-badge {
    transition: background-color 0.3s;
}

/* Hadith Content */
#hadith-content p {
    font-size: 1rem;
    line-height: 1.4;
}

/* Sponsor Section */
.sponsor-card {
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #f8f9fa;
}
.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.sponsor-img-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
}
.sponsor-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.sponsor-label {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

/* =================================================================
   FOOTER STYLES
   ================================================================= */
.footer {
    background-color: #A5D6A7; /* A pleasant light green color */
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

/* Footer links */
.footer a {
    color: var(--text-dark); /* Use text-dark for links in the white footer */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

/* Dark theme specific footer links (kept as is for variety) */
[data-bs-theme="dark"] .footer {
    background-color: var(--text-dark);
    color: #A5D6A7;
}
[data-bs-theme="dark"] .footer a {
    color: #cbd5e0;
}
[data-bs-theme="dark"] .footer a:hover {
    color: var(--secondary-color);
}

/* Newsletter Form */
#newsletterForm input {
    border-radius: 25px;
    padding: 0.5rem 1rem;
}

#newsletterForm button {
    border-radius: 25px;
}
/* Custom Light Green for the main footer */
.footer-light {
    background-color: #A5D6A7; /* A pleasant light green color */
}

/* Custom Dark Green for the reserved part (copyright/bottom) */
.footer-reserved {
    background-color: #388E3C; /* A rich, dark green color */
}

/* Ensure text on the dark green section is white, as specified in the original code */
.footer-reserved p,
.footer-reserved a {
    color: white !important;
}

/* Adjustments for link color in the light green section for better contrast */
.footer-light a:not(.text-white) {
    /* You might want a slightly darker color here if the text-white class is removed */
    color: #1B5E20; /* Darker green link color for contrast on light background */
}
/* =================================================================
   UTILITY CLASSES
   ================================================================= */
.text-primary { color: var(--primary-color) !important; }
.bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: var(--bg-white) !important; }

/* Accessibility Helpers (Screen Reader Only) - Keeping the most complete version */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
    white-space: nowrap;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
}

/* General Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */

/* Global Fade-in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section Gradient Shift animation */
@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(45deg,
            rgba(44, 90, 160, 0.8) 0%,
            rgba(248, 181, 0, 0.3) 50%,
            rgba(44, 90, 160, 0.8) 100%);
    }
    50% {
        background: linear-gradient(45deg,
            rgba(248, 181, 0, 0.4) 0%,
            rgba(44, 90, 160, 0.6) 50%,
            rgba(248, 181, 0, 0.4) 100%);
    }
}

/* Hero Section Particle animation */
@keyframes sparkle {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

/* Live Indicator Pulse animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Blink animation for certain elements (e.g., prayer time, general blink class) */
.blink {
    animation: blink-animation 1s infinite alternate;
}
@keyframes blink-animation {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Donate Button Blinking animation */
@keyframes blinkDonate {
    0% { background-color: green; color: #fff; }
    50% { background-color: orange; color: #fff; }
    100% { background-color: green; color: #fff; }
}

/* Marquee/Moving Ads animation (Kept the second, more standard version) */
.moving-ads {
    font-size: 0.95rem;
}
.marquee {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* Start from right for a standard marquee effect */
    animation: marquee 30s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* =================================================================
   RESPONSIVE DESIGN (Media Queries)
   ================================================================= */

/* Tablet and Smaller Desktops (Max width 992px) */
@media (max-width: 992px) {
    /* News grid changes to a single column layout */
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Devices (Max width 768px) - Consolidated the most complete styles */
@media (max-width: 575px) {
    /* Hero Section Adjustments */
    .hero {
        min-height: 50vh;
        padding: 40px 15px;
    }
    .hero h1 {
        font-size: 2rem; /* Reduced size */
    }
    .hero .lead {
        font-size: 1rem; /* Reduced size */
    }

    /* Section Title Adjustments */
    .section-title {
        font-size: 2rem;
    }
    .section-padding {
        padding: 3rem 0;
    }

    /* Navbar/Search Adjustments */
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    .search-input-container.active {
        width: 200px;
    }
    .search-container {
        max-width: 200px;
    }

    /* News Page Adjustments */
    .page-title {
        font-size: 2rem;
    }
    .news-card-img {
        height: 180px;
    }

    /* Filter buttons become vertical */
    .filter-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Sponsor Image adjustments */
    .sponsor-img {
        height: 120px;
    }
}

.announcement-bar {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
}

.announcement-bar .announcement-label {
    white-space: nowrap;
    background: black;
    color: white;
    padding: 4px 10px;
}

.announcement-bar .marquee {
    display: inline-flex;
    padding-left: 100%;
    animation: marquee 40s linear infinite;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
}

.announcement-bar .announcement-item {
    color: white;
    background-color: green;
    padding: 4px 12px;
    margin-right: 20px;
    white-space: nowrap;
}

.announcement-bar:hover .marquee {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
<style>
  .gradient-card {
    background: linear-gradient(135deg, #ffffff, #f1f8f4);
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
  }

  .gradient-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  }

  .small-card {
    min-width: 90px; 
    flex: 1 1 100px;
    font-weight: 500;
  }

  @media (max-width: 576px) {
    #prayer-times .row.mb-3.align-items-center > .col-auto {
      text-align: center !important;
      margin-bottom: 0.5rem;
    }
  }
