/* /css/style.css */

/* --- Google Font & Root Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1a1a2e; /* Deep Space Blue */
    --secondary-color: #16213e; /* Darker Blue */
    --accent-color: #fca311;   /* Vibrant Gold/Orange */
    --text-color: #e5e5e5;     /* Light Gray/White */
    --bg-color: #0f0c29;       /* Deep Gradient Start */
    --header-bg: #1a1a2eef; /* Semi-transparent header */
    --card-bg: #16213ee0;   /* Semi-transparent card */
}

/* --- General & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-color), var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; color: var(--accent-color); }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    transition: transform 0.3s ease, background 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    background: #ffb742;
    color: var(--primary-color);
}

/* --- Header (Three Tiers) --- */
header {
    background: var(--header-bg);
    position: relative;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Top Tier */
.header-top {
    position: sticky;
    padding: 10px 0;
    font-size: 0.9rem;
    background: #111221; /* Slightly darker top bar */
}
.header-top .container { display: flex; justify-content: space-between; align-items: center; }
.header-top-left a { color: var(--text-muted); margin-right: 20px; }
.header-top-left a i { margin-right: 8px; color: var(--accent-color); }
.social-media a { color: var(--text-muted); margin-left: 18px; font-size: 1.1rem; }

/* Middle Tier */
.header-middle {
    padding: 20px 0;
    border-bottom: 1px solid #ffffff1a;
}
.header-middle .container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; }
.logo-area { 
    display: flex; 
    align-items: center; }
.logo-area img { 
    height: 50px; 
    margin-right: 15px; }
.site-name h1 { 
    font-size: 2rem; 
    margin: 0; 
    font-weight: 700; 
    color: #fff; }
.site-name p { 
    font-size: 1rem; 
    margin: 0; color: 
    var(--text-muted); 
    font-weight: 400; }

/* Bottom Tier - Main Navigation */
.main-nav {
    padding: 5px 0;
}
.main-nav ul { 
    list-style: none; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.main-nav ul li { 
    margin-right: 20px; 
    position: relative; }
.main-nav ul li a {
    display: block;
    padding: 15px 25px;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin: 0 5px;
}
.main-nav ul li a:hover, .main-nav ul li.active a {
    background: var(--accent-color);
    color: #111221;
}

/* .main-nav ul li a:hover, .main-nav ul li.active a {
    color: #fff;
    background: var(--accent-color);
} */

/* Dropdowns */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-color);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    padding: 10px 0;
    border-radius: 0 0 5px 5px;
    border-top: 3px solid var(--accent-color);
}

.has-dropdown:hover .dropdown {
    display: block;
}
.dropdown li { 
    width: 100%; 
    display: none;
}
.dropdown li a {
    display: none;
    padding: 12px 20px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-muted);
}
.dropdown li a:hover {
    color: var(--text-color);
    background: #ffffff1a;
}

/* Responsive Navigation */
.menu-toggle { display: none; cursor: pointer; font-size: 1.8rem; }
@media (max-width: 992px) {
    .main-nav ul { flex-direction: column; width: 100%; text-align: center; display: none; }
    .main-nav ul.active { display: flex; }
    .menu-toggle { display: block; }
    .dropdown { position: static; display: none; background: #00000033; box-shadow: none; border: none; padding: 0; }
    .has-dropdown:hover .dropdown { display: none; }
    .has-dropdown.open .dropdown { display: block; }
}
@media (max-width: 768px) {
    .header-top .container, .header-middle .container { flex-direction: column; gap: 15px; text-align: center; }
}

/* --- Hero Section (Home Page) --- */
.hero { height: 80vh; /* ... rest of hero styles are fine ... */ }
.hero::after { background: rgba(28, 30, 50, 0.7); /* Match new bg */ }
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: 4rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero p { font-size: 1.5rem; margin-bottom: 30px; color: var(--accent-color); font-weight: 600; }


/* --- Responsive Navigation --- */
.menu-toggle {
    display: none;
    display: hidden;
    cursor: pointer;
    font-size: 1.8rem;
}

@media (max-width: 992px) {
    .site-name h1 { font-size: 1.5rem; }
    .main-nav ul { flex-direction: column; width: 100%; text-align: center; display: none; }
    .main-nav ul.active { display: flex; }
    .main-nav ul li a { border-bottom: 1px solid #ffffff22; }
    .menu-toggle { display: block; }
    .dropdown { position: static; display: none; background: #00000033; box-shadow: none; }
    .has-dropdown:hover .dropdown { display: none; } /* Disable hover on mobile */
    .has-dropdown.open .dropdown { display: block; } /* Show on click */
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    .header-top .container { flex-direction: column; gap: 10px; }
    .header-middle .container { flex-direction: column; gap: 10px; text-align: center; }
}


/* --- Hero Section (Home Page) --- */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 12, 41, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--accent-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.2rem; }
}


/* --- Content Sections --- */
.content-section {
    padding: 80px 0;
}

.content-section.bg-dark {
    background: var(--secondary-color);
}

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

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- Leader Page Customizations --- */
.leader-card {
    display: flex;
    background: var(--header-bg); /* Use solid color for card */
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 40px;
    gap: 30px;
    align-items: flex-start; /* Align to top */
    padding: 30px;
    border: 1px solid #ffffff1a;
}
.leader-img-wrapper { /* New wrapper for zoom effect */
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden; /* Crucial for zoom effect */
    flex-shrink: 0;
    border: 5px solid var(--accent-color);
}
.leader-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease; /* Smooth transition for zoom */
}
.leader-img-wrapper:hover img {
    transform: scale(1.1); /* The zoom effect */
}
.leader-info h3 { color: var(--accent-color); }
.leader-info span { display: block; font-style: italic; margin-bottom: 15px; color: var(--text-muted); }

/* Leader Socials and Read More */
.leader-socials {
    margin-bottom: 20px;
}
.leader-socials a {
    color: var(--text-muted);
    margin-right: 15px;
    font-size: 1.3rem;
}
.more-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}
.more-details.show {
    max-height: 1000px; /* Large enough to show all content */
}
.read-more-btn {
    background: none;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
}
.read-more-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}
@media (max-width: 768px) {
    .leader-card { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; }
    .leader-img-wrapper { 
        width: 150px; 
        height: 150px; }
    .leader-info { 
        text-align: center; }
    .leader-socials { 
        text-align: center; 
        margin-bottom: 10px; }
    .read-more-btn { 
        display: block; 
        margin-top: 10px; }
}

/* --- Gallery Page --- */
.gallery-event {
    margin-bottom: 60px;
}
.gallery-event h2 {
    text-align: center;
    margin-bottom: 30px;
}
.carousel-container {
    position: relative;
    width: 90%;
    height: 50rem;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.carousel-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    /* min-height: 100%; */
    flex-shrink: 0;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff55;
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }


/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.contact-info-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-right: 20px;
    width: 40px;
}

.contact-form .form-group {
    position: relative;
    margin-bottom: 30px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 2px solid #ffffff55;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-form label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #ffffff88;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--primary-color);
    padding: 0 5px;
    color: var(--accent-color);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* --- Events Page --- */
.event-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}
.event-date {
    background: var(--accent-color);
    color: var(--primary-color);
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    min-width: 100px;
}
.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}
.event-date .day {
    font-size: 2.5rem;
    font-weight: 700;
}
.event-info h3 {
    margin-bottom: 5px;
    color: #fff;
}
.event-info p { margin-bottom: 15px; }

@media (max-width: 768px) {
    .event-card { flex-direction: column; text-align: center; }
}

/* =============================================== */
/* --- Sermon/Blog Page Styles --- */
/* =============================================== */

/* Hero Section for Sermons Page */
.hero-sermons {
    text-align: center;
    padding: 60px 0;
    background: var(--secondary-color);
}
.hero-sermons h1 {
    font-size: 3.5rem;
}
.hero-sermons p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Filter and Search Controls */
.filter-section {
    padding: 30px 0;
    background: var(--primary-color);
    border-bottom: 1px solid #ffffff1a;
    position: sticky;
    top: 170px; /* Adjust this based on your header height */
    z-index: 900;
}
.filter-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.search-wrapper, .category-wrapper {
    position: relative;
    flex-grow: 1;
}
.search-wrapper i, .category-wrapper i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: var(--text-muted);
}
#sermon-search, #category-filter {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--secondary-color);
    border: 1px solid #ffffff33;
    color: var(--text-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}
#sermon-search:focus, #category-filter:focus {
    outline: none;
    border-color: var(--accent-color);
}
/* =============================================== */
/* --- Sermon Page MODIFICATIONS --- */
/* =============================================== */

/* NEW: Scrollable container for the sermon grid */
.sermon-grid-container {
    max-height: 150vh; /* Sets a maximum height for the grid area */
    overflow-y: auto; /* Adds a vertical scrollbar when content exceeds the height */
    padding: 15px; /* Adds some space for the scrollbar */
}

/* NEW: Modern, minimalist scrollbar styling */
.sermon-grid-container::-webkit-scrollbar {
  width: 8px;
}
.sermon-grid-container::-webkit-scrollbar-track {
  background: #ffffff1a;
  border-radius: 10px;
}
.sermon-grid-container::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
}
.sermon-grid-container::-webkit-scrollbar-thumb:hover {
  background: #ffb742;
}


/* MODIFIED: Sermon Grid Layout for more items */
.sermon-grid {
    display: grid;
    /* Allows for more columns on wider screens */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* For very large screens, force 4 columns */
@media (min-width: 1600px) {
    .sermon-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* NEW: Styles for the video preview */
.sermon-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video covers the area without distortion */
}

/* NEW: Volume icon for hover state */
.volume-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sermon-card:hover .volume-icon {
    opacity: 1; /* Show volume icon on hover */
}
/* Sermon Grid Layout
.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
} */

/* Futuristic Sermon Card Styling */
.sermon-card {
    background: rgba(28, 30, 50, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid #ffffff1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.sermon-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.sermon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}
.sermon-card.hide {
    display: none;
}

/* Card Preview Area */
.sermon-preview {
    position: relative;
    height: 200px;
}
.sermon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.play-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sermon-card:hover .play-overlay {
    opacity: 1;
}
.sermon-format-icon {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--accent-color);
    color: var(--primary-color);
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Card Content Area */
.sermon-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.sermon-category {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 15px;
}
.sermon-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}
.sermon-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.sermon-excerpt {
    flex-grow: 1;
    margin-bottom: 20px;
}
.btn-sermon {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: #ffffff1a;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    font-weight: 600;
}
.btn-sermon:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}
.btn-sermon i {
    margin-left: 8px;
}


/* "Back to Top" Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    transform: scale(1.1);
}
/* --- Footer --- */
footer {
    background: var(--bg-color);
    padding-top: 60px;
    border-top: 5px solid var(--accent-color);
}
.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 50px;
    height: 2px;
    background: var(--accent-color);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-color); }
.footer-col .social-media a { margin: 0 10px 0 0; }

.footer-bottom {
    border-top: 1px solid #ffffff22;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}