/* GLOBAL RESET: Fixes width/padding math for the whole site */
*, *::before, *::after {
    box-sizing: border-box;
}
/* 1. Global Styles & Variables */
:root {
    /* --- LIGHT MODE (Day) --- */
    --primary-color: #5E35B1;
    
    /* CHANGED: Darker "Antique Gold" for white backgrounds (Readable) */
    --accent-color: #C59100; 
    
    --body-bg: #F5F5F5; 
    --section-bg: radial-gradient(circle at center, #ffffff 0%, #e0e0e0 100%);
    --text-color: #212121;
    --card-background: #FFFFFF;
    --header-background: rgba(255, 255, 255, 0.98);
    --footer-background: #E0E0E0;
    --button-text-color: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --bg-secondary: #eeeeee;
    --text-muted: #757575;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
    --container-width: 1100px;
    --container-padding: 20px;
    --border-radius: 8px;
}

/* --- DARK MODE (Night) --- */
/* --- DARK MODE OVERRIDE (Master Switch) --- */

/* 1. Apply if user specifically clicked "Night" */
body.dark-mode {
    --primary-color: #7E57C2;
    --accent-color: #FFEE58;
    --body-bg: #000000;
    --section-bg: radial-gradient(circle at center, #2a0a0a 0%, #000000 100%);
    --text-color: #E0E0E0;
    --card-background: #1E1E1E;
    --header-background: #1E1E1E;
    --footer-background: #1E1E1E;
    --button-text-color: #121212;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --border-color: #333333;
    --bg-secondary: #2c2c2c;
    --text-muted: #9e9e9e;
}

/* 2. Apply if phone is Dark Mode AND user didn't click "Day" */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        --primary-color: #7E57C2;
        --accent-color: #FFEE58;
        --body-bg: #000000;
        --section-bg: radial-gradient(circle at center, #2a0a0a 0%, #000000 100%);
        --text-color: #E0E0E0;
        --card-background: #1E1E1E;
        --header-background: #1E1E1E;
        --footer-background: #1E1E1E;
        --button-text-color: #121212;
        --shadow-color: rgba(0, 0, 0, 0.4);
        --border-color: #333333;
        --bg-secondary: #2c2c2c;
        --text-muted: #9e9e9e;
    }
}

/*
==================================================
FaithStream - Complete & Fixed Stylesheet
==================================================
*/

/* 1. Global Styles & Variables
-------------------------------------------------- */

body {
    font-family: var(--font-body);
    background: var(--body-bg); /* CHANGED */
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.3s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    box-sizing: border-box; /* ADDED: Ensures padding doesn't break width */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-top: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. Header & Navigation
-------------------------------------------------- */
.site-header {
    background-color: var(--header-background);
    box-shadow: 0 2px 4px var(--shadow-color);
    padding: 15px 20px; 
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); /* Golden Glow */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* 3. Hero Section (Homepage)
-------------------------------------------------- */
.hero {
    background: var(--section-bg);
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color); /* This makes it Dark in Day mode, White in Night mode */
}

.hero h1 {
   color: var(--accent-color); 
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    font-size: 3.5em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3em;
    max-width: 600px;
    margin: 0 20px;
}

.button, .filter-btn {
    display: inline-block;
    background-color: #D42426; 
    border: 2px solid #D42426;
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius); 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.button:hover, .filter-btn:hover {
    background-color: #FFD700; 
    border-color: #FFD700;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); 
}

/* 4. Devotionals Page
-------------------------------------------------- */
.devotionals-page {
    padding: 60px 0;
    background: var(--section-bg);
}

.devotionals-page h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 40px;
}

.category-filters {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-color);
    margin: 5px;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}

.devotionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.loading-message {
    text-align: center;
    grid-column: 1 / -1;
    font-size: 1.2em;
}

/* 8. Devotional Card (Original Version)
-------------------------------------------------- */
.devotional-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.devotional-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.devotional-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.devotional-card .img-placeholder {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
}

.devotional-card .card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.devotional-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.devotional-card .card-date {
    font-size: 0.9em;
    color: #757575;
    margin-bottom: 15px;
}

.devotional-card .card-excerpt {
    font-size: 1em;
    flex-grow: 1;
    margin-bottom: 20px;
}

.devotional-card .card-link {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
    align-self: flex-start;
}

/* 5. Single Article Page
-------------------------------------------------- */
.article-container {
    width: 96%; 
    max-width: 900px; 
    margin: 20px auto; 
    background-color: var(--card-background);
    padding: 30px 25px; 
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--shadow-color); 
}

.article-container h1 {
    font-size: 2.6em; 
    font-weight: 800; 
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.article-date {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 25px;
    display: block;
}

.article-cover-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    object-fit: cover;
}

.article-body {
    font-size: 1.35em; 
    line-height: 1.8; 
    color: var(--text-color); 
    font-weight: 400;
}

.article-body p {
    margin-bottom: 1.5em;
    text-align: left;
}

.article-body h2, .article-body h3, .article-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
}

.article-body ul, .article-body ol {
    padding-left: 20px;
    margin-bottom: 1.5em;
}

.article-body blockquote {
    border-left: 6px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-size: 1.1em;
    font-weight: 500;
    font-style: italic;
    color: var(--text-color);
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 0 12px 12px 0;
}

/* 6. Footer
-------------------------------------------------- */
.site-footer-main {
    background-color: var(--footer-background);
    color: #757575;
    text-align: center;
    padding: 20px 20px; 
    box-sizing: border-box; 
    margin-top: 60px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

/* 7. Responsive Design
-------------------------------------------------- */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--header-background);
        box-shadow: -4px 0 10px var(--shadow-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        display: flex;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 20px 0;
        margin-left: 0;
    }

    .main-nav a {
        font-size: 1.5em;
    }

    .hamburger-menu {
        display: block;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero h1 {
        font-size: 2.5em;
        text-align: center; 
    }
    .article-container h1 {
        font-size: 2.2em;
    }
}

/* 8. Static Pages (About, Contact )
-------------------------------------------------- */
.static-page-container {
    max-width: 800px;
    margin: 40px auto;
    background-color: var(--card-background);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.static-page-container h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
}

.static-page-container p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.contact-email {
    font-weight: 500;
    font-size: 1.2em;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .static-page-container {
        padding: 25px;
    }
    .static-page-container h1 {
        font-size: 2.2em;
    }
}

/* 9. Share Button
-------------------------------------------------- */
.share-container {
    margin-bottom: 30px;
    text-align: left;
}

#share-button {
    padding: 10px 20px;
    font-size: 0.9em;
}

.copy-success {
    display: inline-block;
    margin-left: 15px;
    color: var(--primary-color);
    font-weight: 500;
    transition: opacity 0.3s;
}

/* 10. Today's Devotional Section
-------------------------------------------------- */
.today-devotional {
    margin-bottom: 40px;
    padding-bottom: 40px;
        background: var(--section-bg);
}

.today-devotional h2 {
    text-align: center;
    margin-bottom: 25px;
}

#today-devotional-card {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

#today-devotional-card .devotional-card {
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.25);
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 60px auto 0;
    width: 80%;
}

/* 11. Search Bar
-------------------------------------------------- */
.search-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

#search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-color);
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

/* 12. Contact Form
-------------------------------------------------- */
.contact-form {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.contact-form .button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* 13. Church Hub Page Styles
-------------------------------------------------- */
.page-header {
    text-align: center;
    margin: 40px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.church-title {
    font-size: 2.8em;
    font-weight: 700;
}

.content-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.8em;
    font-weight: 500;
    margin: 0;
}

.see-all-link {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.see-all-link:hover {
    color: var(--accent-color);
}

.content-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px; 
    padding: 10px 5px 20px 5px;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.content-carousel::-webkit-scrollbar {
    display: none; 
}

.carousel-card-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    flex: 0 0 160px; 
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.carousel-card-link:hover {
    transform: translateY(-5px);
}

.carousel-card-image-wrapper {
    display: block;
    position: relative; 
    width: 100%;
    aspect-ratio: 3 / 4; 
    background-color: var(--bg-secondary); 
    border-radius: var(--border-radius);
    overflow: hidden; 
    box-shadow: 0 4px 8px var(--shadow-color);
    margin-bottom: 15px;
}

.carousel-card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center; 
}

.carousel-card-info .card-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1em;
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-card-info .card-date {
    font-size: 0.85em;
    color: var(--text-muted);
    margin: 0;
}

@media (min-width: 769px) {
    .carousel-card-link {
        flex: 0 0 220px;
    }
}

/* 14. Hymn Card Styles (Hub Page)
-------------------------------------------------- */
.hymn-card-link {
    display: block;
    flex: 0 0 220px; 
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    height: 180px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hymn-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-color);
}

.hymn-card-content .hymn-number {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.hymn-card-content .hymn-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1em;
    line-height: 1.4;
    margin: 0;
}

/* 15. Single Hymn Page Styles
-------------------------------------------------- */
.hymn-container {
    max-width: 800px;
    margin: 60px auto;
}

.hymn-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.hymn-detail-title {
    font-size: 2.8em;
    margin-bottom: 10px;
}

.hymn-detail-number {
    font-size: 1.2em;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.hymn-lyrics {
    font-family: 'Georgia', serif; 
    font-size: 1.2em;
    line-height: 2; 
    text-align: center;
    white-space: pre-wrap; 
}

/* 16. All Hymns Page
-------------------------------------------------- */
.hymns-page {
    padding: 60px 0;
}

.hymns-page h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 40px;
}

.hymns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.hymn-list-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px var(--shadow-color);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hymn-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* --- MINI VINYL NUMBER STYLE --- */
.hymn-list-number {
    /* 1. Make it a Circle (The Vinyl) */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0; /* Prevents it from getting squashed */
    
    /* 2. The Vinyl Background */
    background-color: #1a1a1a; /* Fallback dark color */
    background-image: url('/images/vinyl-bg.jpg');
    background-size: cover;
    background-position: center;
    border: 2px solid #333;
    
    /* 3. Center the Number */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    
    /* 4. Text Styling (Gold & Readable) */
    color: #FFD700;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px #000; /* Shadow ensures number is visible on the image */
    
    /* 5. A cool spinning effect on hover! */
    transition: transform 0.5s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Optional: Rotate the record when you hover over the card */
.hymn-list-card:hover .hymn-list-number {
    transform: rotate(360deg);
}

.hymn-list-title {
    font-size: 1.1em;
    font-weight: 500;
    margin: 0;
}

/* 14. Hymn Card Styles (Hub Page) - RECORD LABEL DESIGN
-------------------------------------------------- */
.hub-hymn-card {
    display: block;
    flex: 0 0 220px;
    scroll-snap-align: start;
    text-decoration: none;
    background-color: #1E1E1E; 
    background-image: url('/images/vinyl-bg.jpg');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0; 
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #FFFFFF; 
    position: relative; 
}

.hub-hymn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-color);
}

.hub-hymn-card .hymn-card-content {
    background-color: rgba(255, 255, 255, 0.85); 
    color: #121212; 
    border-radius: 50%; 
    width: 80%; 
    aspect-ratio: 1 / 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    transition: all 0.3s ease;
}

.hub-hymn-card:hover .hymn-card-content {
    background-color: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
}

.hub-hymn-card .hymn-number {
    font-size: 1.6em;
    font-weight: 700; 
    color: var(--primary-color);
    font-family: var(--font-heading);
    margin: 0;
}

.hub-hymn-card .hymn-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9em; 
    line-height: 1.3;
    margin: 5px 0 0 0;
}

/* 17. Sermons Page
-------------------------------------------------- */
.sermons-page {
    padding: 60px 0;
}

.sermons-page h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 40px;
}

.sermons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr ));
    gap: 30px;
}

.sermon-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-color);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sermon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.sermon-card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; 
    background-color: var(--bg-secondary);
    overflow: hidden;
    position: relative; 
}

.sermon-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sermon-card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background-color 0.3s;
}

.sermon-card:hover .sermon-card-play-icon {
    background-color: rgba(94, 53, 177, 0.8); 
}

.sermon-card-play-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.sermon-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sermon-card-title {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.sermon-card-meta {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.sermon-card-summary {
    font-size: 1em;
    flex-grow: 1; 
}

/* 18. Single Sermon Page
-------------------------------------------------- */
.sermon-container {
    max-width: 900px; 
    margin: 60px auto;
}

.sermon-header {
    text-align: center;
    margin-bottom: 40px;
}

.sermon-title {
    font-size: 2.8em;
    margin-bottom: 10px;
}

.sermon-meta {
    font-size: 1.1em;
    color: var(--text-muted );
    font-family: var(--font-body);
}

.sermon-media-player {
    margin-bottom: 40px;
    background-color: #000; 
}

.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%; 
    position: relative;
    height: 0;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

.sermon-audio-player {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.sermon-audio-player audio {
    width: 100%; 
}

.sermon-body {
    font-size: 1.1em;
    line-height: 1.8;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.music-player-section {
    background: var(--section-bg);
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color);
}
/* --- New Master Player Styles --- */
.spotify-master-container {
    width: 100%;             /* Ensure it takes full width of the container */
    max-width: 600px;        /* Limits width so it doesn't look stretched on PC */
    margin: 0 auto;          /* Centers it perfectly */
    background: #1a1a1a;     /* Slightly lighter than black background */
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Nice shadow depth */
}

.playlist-controls {
    margin-top: 20px;
    text-align: center;
}

.playlist-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.playlist-btn {
    background: transparent;
    color: #ccc;
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.playlist-btn:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
}

.playlist-btn.active {
    background: #1DB954; /* Spotify Green */
    color: #000;         /* Black text for contrast */
    font-weight: bold;
    border-color: #1DB954;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.4); /* Green glow */
}
/* 19. Pagination
-------------------------------------------------- */
.pagination-container {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.nav-link {
    text-decoration: none;
    color: var(--button-text-color);      
    background-color: var(--primary-color); 
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
    display: inline-block; 
}

.nav-link:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);           
}

.nav-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);       
    margin-bottom: 2px;
}

.nav-link:hover .nav-label {
    color: #444; 
}

/* 20. Live Banner Styles
-------------------------------------------------- */
.live-banner-container {
    background-color: #ff0000; 
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: sans-serif;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.live-banner-container:hover {
    background-color: #cc0000; 
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
}

@media (max-width: 600px) {
    .live-banner-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* 21. PWA Toast Container
-------------------------------------------------- */
.pwa-toast {
    position: fixed;
    bottom: -100px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #1a1a1a; 
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    visibility: hidden; 
    opacity: 0;
}

.pwa-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 20px; 
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.pwa-icon img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #000;
}

.pwa-text h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #fff;
    font-family: 'Playfair Display', serif;
}

.pwa-text p {
    margin: 0;
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

.pwa-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad); 
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.pwa-close {
    position: absolute;
    top: -10px;
    right: -5px;
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
}

/* 22. Festive Banner
-------------------------------------------------- */
/* --- BASE STYLE (Layout Only) --- */
/* 22. Festive Banner
-------------------------------------------------- */

/* --- BASE STYLE (Hidden by default) --- */
.festive-banner {
    text-align: center;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    
    display: none; /* KEY CHANGE: Hides banner if no theme is active */
}

/* --- THEME 1: Christmas/New Year --- */
.festive-banner.christmas {
    display: block; /* Shows banner */
    background: linear-gradient(to right, #D42426, #146B3A);
}

/* --- THEME 2: Easter --- */
.festive-banner.easter {
    display: block; /* Shows banner */
    background: linear-gradient(to right, #662D8C, #ED1E79);
}

/* --- THEME 3: Happy New Month --- */
.festive-banner.new-month {
    display: block; /* Shows banner */
    background: linear-gradient(to right, #0052D4, #4364F7);
}
/* =======================================================
   FINAL MASTER FIXES (Consolidated & Optimized)
   ======================================================= */

/* 1. FORCE GOLD TITLE ("MUSIC PLAYER") */
.music-player-section h2, 
.music-player-section .section-title,
.music-player-title { 
    color: var(--accent-color) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    text-align: center; 
}

/* 2. FORCE SILVER SUBTEXT */
.music-player-section p, 
.music-player-section h3,
.music-player-section h4,
.music-player-section h5,
.music-player-section span,
.music-player-section div,
.music-player-section a {  
     color: var(--text-muted) !important;
    font-weight: 400;
    text-decoration: none; 
}

/* 3. Gold Hover Effect for the Link */
.music-player-section a:hover {
    color: #FFD700 !important;
    text-decoration: underline;
}

/* Footer Contrast Fix - Uses variable so it changes color automatically */
footer p, .site-footer-main p {
    color: var(--text-muted) !important; 
}

/* 5. Article Cover Image Fix */
.article-cover-image {
    width: 100%;             
    max-height: 400px;       
    object-fit: contain;     
    display: block;
    margin: 0 auto 20px auto; 
    background-color: #1a1a1a; 
    border-radius: 8px;      
}

/* 6. MOBILE SPECIFIC TWEAKS (Consolidated) */
@media (max-width: 768px) {
    .container, 
    .hymn-container, 
    .article-body,
    .music-player-section,
    .static-page-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    h1, .hymn-detail-title {
        font-size: 28px !important;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    h2 { font-size: 24px !important; }
    h3 { font-size: 20px !important; }
    
    p, .article-body p, .hymn-lyrics {
        font-size: 16px !important;
        line-height: 1.6 !important;
        text-align: left;
    }

    .logo {
        font-size: 20px !important; 
    }

    .music-player-title, h2.section-title {
        font-size: 22px !important;
    }
}
/* =======================================================
   GLOBAL FESTIVE THEME OVERRIDE (The "Magic Switch")
   This turns ALL remaining Purple items to Red/Gold
   ======================================================= */

/* Specific Fix for Links inside Articles (Make them Gold for readability) */
.article-body a {
    color: #FFD700 !important; /* Gold links look better on black than Red */
    text-decoration: underline;
}

/* Specific Fix for that "Previous/Next" Box */
.nav-link {
    background-color: #D42426 !important; /* Forces the box to be Red */
    border-color: #D42426 !important;
    color: #ffffff !important;
}

/* Hover effect for the box */
.nav-link:hover {
    background-color: #FFD700 !important; /* Turns Gold when you touch it */
    color: #000000 !important;
}
.support-btn {
    display: inline-block;
    background-color: #D42426; /* Red */
    color: whitesmoke; /* Black text */
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); /* Gold Glow */
    transition: transform 0.2s ease;
}

.support-btn:hover {
    transform: scale(1.05); /* Grows slightly when touched */
    background-color: #FFC700; /* Gold on hover */
    color: #000;
}

.support-section p {
    color: var(--accent-color);
    font-size: 1.1em; 
    margin-bottom: 10px
}

.support-section {
    background: var(--section-bg);
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: white;
}

/* Add this to the very bottom of style.css */
@media (max-width: 600px) {
    .spotify-master-container {
        padding: 8px; /* Reduced from 20px to 8px */
    }
    
    .spotify-master-container iframe {
        width: 100% !important; /* Forces the player to fill the space */
    }
}
/* --- Dynamic Spotify Messages --- */

/* 1. By default (Browser Mode), hide the PWA message */
.pwa-only {
    display: none;
}

/* 2. When installed as an App (Standalone Mode) */
@media all and (display-mode: standalone) {
    /* Hide the Browser message because they can't switch modes */
    .browser-only {
        display: none;
    }
    
    /* Show the PWA message */
    .pwa-only {
        display: block;
    }
}
/* =========================================
   SETTINGS & FONTS (Copy all of this)
   ========================================= */

/* --- FONT LIBRARIES --- */
body.font-modern {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.font-classic {
    font-family: "Merriweather", "Georgia", "Times New Roman", serif;
}

/* --- SETTINGS MODAL STYLES --- */
.settings-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000 !important;
    align-items: flex-end; /* Slides up from bottom */
    justify-content: center;
    backdrop-filter: blur(4px);
}

.settings-content {
    background: #1e1e1e;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    border-top: 1px solid #333;
    animation: slideUp 0.3s ease-out;
    color: white;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.settings-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; border-bottom: 1px solid #333; padding-bottom: 15px;
}
.settings-header h3 { margin: 0; color: #fff; }
.close-btn { background: none; border: none; color: #888; font-size: 28px; cursor: pointer; }

.setting-group { margin-bottom: 25px; }
.setting-group label { display: block; margin-bottom: 10px; font-weight: bold; color: #ffd700; }
.setting-hint { font-size: 12px; color: #888; margin-top: 5px; }

/* Buttons */
.toggle-group { display: flex; gap: 10px; }
.toggle-btn {
    flex: 1; padding: 12px; background: #2a2a2a; color: #aaa;
    border: 1px solid #444; border-radius: 10px; cursor: pointer;
}
.toggle-btn.active {
    background: #ffd700; color: #000; font-weight: bold; border-color: #ffd700;
}

/* Font Cards */
.font-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.font-card {
    background: #2a2a2a; padding: 10px; border-radius: 8px; text-align: center;
    cursor: pointer; border: 1px solid #444;
}
.font-card:hover { border-color: #ffd700; }
.font-preview { display: block; font-size: 24px; margin-bottom: 5px; }
.font-preview.modern { font-family: sans-serif; }
.font-preview.classic { font-family: serif; }

.save-settings-btn {
    width: 100%; padding: 15px; background: #ffd700; border: none;
    border-radius: 12px; font-weight: bold; margin-top: 10px; color: black; cursor: pointer;
}
/* --- FONT LIBRARIES --- */
body.font-modern {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.font-classic {
    font-family: "Merriweather", "Georgia", "Times New Roman", serif;
}

/* NEW FONTS ADDED HERE */
body.font-soft {
    font-family: "Nunito", "Segoe UI", sans-serif; /* Rounded & Friendly */
}
body.font-journal {
    font-family: "Dancing Script", cursive; /* Handwritten Style */
    font-size: 1.1em; /* Make it slightly larger so it's readable */
}
/* --- UPDATE POPUP STYLES --- */
.update-popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 20000; /* Higher than settings modal */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.update-content {
    background: var(--card-background);
    color: var(--text-color);
    width: 90%;
    max-width: 450px;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid var(--accent-color);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.update-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px;
}

.update-body ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.update-body li { margin-bottom: 8px; }

.update-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    font-weight: bold;
}
/* --- FIX: MAKE WHOLE CARD CLICKABLE --- */

/* 1. Make the card the "anchor" for the link overlay */
.devotional-card {
    position: relative; /* This keeps the link inside the card boundaries */
    cursor: pointer;    /* This changes the mouse arrow to a hand pointer */
}

/* 2. Stretch the 'Read More' link to cover the entire card */
.devotional-card .card-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Ensures the click layer is on top */
}
/* --- QUICK LINKS GRID (Themed for Day & Night) --- */

.grid-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.menu-card {
    /* 1. Use YOUR Global Variables so it changes automatically */
    background-color: var(--card-background); 
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow-color);
    
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    /* Adds a subtle purple glow on hover */
    box-shadow: 0 8px 25px rgba(94, 53, 177, 0.25); 
}

.menu-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

/* COMPACT Mobile Quick Links (Pyramid Layout) */
@media (max-width: 768px) {
    .grid-menu {
        display: flex;              /* Switch to Flexbox */
        flex-wrap: wrap;            /* Allow buttons to wrap to next line */
        justify-content: center;    /* This CENTERS the 3rd button! */
        gap: 10px;                  /* Spacing between buttons */
        margin-top: 15px;
        padding: 0 10px;
    }

    .menu-card {
        /* Math: 50% width minus half the gap ensures 2 fit on top row */
        width: calc(50% - 5px);     
        
        padding: 10px;
        min-height: auto; 
        height: auto;       /* Safe height that fits content */
        
        display: flex;
        flex-direction: row; /* Icon next to text */
        align-items: center;
        justify-content: center;
        gap: 8px; 
    }

    .menu-card .icon {
        font-size: 1.2rem; 
        margin-bottom: 0;
    }

    .menu-card h3 {
        font-size: 0.85rem;
        margin: 0;
        line-height: 1;
    }
}
/* --- FEATURED DEVOTIONAL SECTION --- */
.featured-section {
    padding: 40px 0 20px;
    background: transparent;
}

.featured-card {
    display: flex;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
    text-decoration: none; /* Removes underline from link */
    color: inherit;
}

.featured-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.featured-image {
    width: 40%;
    min-height: 250px;
    object-fit: cover;
}

.featured-content {
    padding: 30px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* <--- ADD THIS LINE (Standard Property) */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Layout for Featured Devotional */
@media (max-width: 768px) {
    .featured-section {
        padding-top: 20px; /* Less empty space at the top */
        padding-bottom: 10px;
    }

    .featured-card {
        flex-direction: column; /* Stack: Image Top, Text Bottom */
        margin: 0 10px;         /* Add side margins so it doesn't touch screen edges */
        width: auto;            /* Let margins control the width */
    }

    .featured-image {
        width: 100%;
        height: 200px;      /* Fixed height for consistency */
        min-height: auto;   /* Remove desktop constraint */
    }

    .featured-content {
        width: 100%;
        padding: 20px;
        
        /* FIX: This keeps padding INSIDE the 100% width */
        box-sizing: border-box; 
    }

    .featured-title {
        font-size: 1.5rem;  /* Slightly smaller than desktop, but still big */
        margin-bottom: 10px;
    }

   .featured-excerpt {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        line-clamp: 3; /* <--- ADD THIS LINE */
        margin-bottom: 15px;
    }
    
    /* Optional: Make the 'Read Now' button stretch full width on mobile */
    .featured-content .button {
        width: 100%;
        text-align: center;
        display: block;
    }
}
/* FIX: Force Hero Text to Center on Mobile */
@media (max-width: 768px) {
    .hero p {
        text-align: center !important; /* Overrides the global 'left' rule */
        margin-left: auto;   /* Ensures it sits in the middle */
        margin-right: auto;
        width: 90%;          /* Prevents it from touching the edges */
    }
}
/* =========================================
   THEMED CARDS (Global Styles for Homepage & Hub)
   ========================================= */

/* 1. The Overlay Logic (Makes text readable on images) */
.menu-card.themed-card, 
.hub-card.themed-card {
    position: relative;
    overflow: hidden;
    border: 2px solid #333; /* Dark border to match theme */
    background-size: cover;
    background-position: center;
}

/* Dark Overlay */
.menu-card.themed-card::before, 
.hub-card.themed-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65); /* 65% Dark layer */
    z-index: 1;
    transition: background 0.3s ease;
}

/* Hover Effect: Brighten slightly */
.menu-card.themed-card:hover::before,
.hub-card.themed-card:hover::before {
    background: rgba(0, 0, 0, 0.5); 
}

/* 2. Force Content Colors (White & Gold) */
.menu-card.themed-card > *,
.hub-card.themed-card > * {
    position: relative;
    z-index: 2;
    color: #fff !important; /* All text becomes white */
}

.menu-card.themed-card h3,
.hub-card.themed-card .hub-title {
    color: #FFD700 !important; /* Gold Titles */
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.menu-card.themed-card .icon {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 3. The Specific Themes (Background Images) */

/* Hymns = Vinyl */
.vinyl-style {
    background-image: url('/images/vinyl-bg.jpg');
}

/* Sermons = Preacher/Mic */
.sermon-style {
    background-image: url('/images/sermon-bg.jpg');
}

/* Prayer/Devotional = Open Heavens or Praying Hands */
.devotional-style, .prayer-style {
    background-image: url('/images/open-heavens-bg.jpg'); /* Or use 'prayer-bg.jpg' if you have one */
}