/* --- Global Styles & Variables --- */
:root {
    --primary-color: #242F38;
    --secondary-color: #3a4a58;
    --text-light: #f5f5f5;
    --text-dark: #333;
    --accent-color: #e0e0e0;
}

/* Universal Box Sizing for predictable layouts */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    margin: 0;
    background-color: #fff;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* General Page Content Wrapper */
.page-content {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* --- Header --- */
.site-header {
    background-color: #ffffff;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 40px;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
    margin-top: 60px;
    padding: 40px 20px;

    /* --- CORRECTED BACKGROUND PROPERTIES --- */
    /* This sets the default behavior for all hero sections */
    background-color: #222; /* A dark fallback color in case an image doesn't load */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    /* By NOT setting a background-image here, we allow each page to set its own. */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-intro {
    font-size: 1.2rem;
    margin: 0 0 10px;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
}

.bible-verse {
    font-size: 1.1rem;
    margin: 0 auto;
    font-style: italic;
    padding: 0;
}

.bible-verse cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: 400;
}

/* --- Homepage: Commitment Section --- */
.commitment-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
}

.commitment-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 15px;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.icon-blurbs {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.blurb {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 20px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 2rem;
}

.blurb h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- Homepage: Discipleship Section --- */
.discipleship-section {
    background-color: #f9fafb;
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.discipleship-text {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

/* --- Footer --- */
.site-footer {
    color: var(--text-light);
}

.footer-main {
    background-color: var(--primary-color);
    padding: 60px 20px;
}

.footer-inner {
    max-width: 60%;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.478);
    padding: 20px;
    text-align: center;
    border-radius: 0;
}

.footer-logo img {
    max-height: 50px;
    margin-bottom: 15px;
}

.footer-bottom {
    background-color: #1a1a1a;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
}

/* --- Inner Page Hero --- */
.hero-study {
    min-height: 40vh;
    height: auto;
}

.hero-study h1 {
    font-size: 3rem;
}

/* --- Bible Study Page --- */
.layout-container-flex {
    display: flex;
    gap: 40px;
}

.sidebar {
    flex: 0 0 280px;
}

.post-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.widget-title {
    background-color: #000;
    color: #fff;
    padding: 15px;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.category-list a:hover {
    background-color: #f5f5f5;
}

.category-list a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.post-count {
    background-color: #fff;
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.category-list a.active .post-count {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.post-item {
    border: 1px solid #e7e7e7;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.post-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
}

.post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.read-more-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: var(--secondary-color);
}

/* --- About Us Page --- */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.vision-card {
    background-color: #f9fafb;
    border: 1px solid #e7e7e7;
    padding: 40px 30px;
    text-align: center;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.vision-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.vision-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.vision-card p {
    font-size: 1rem;
    line-height: 1.7;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.intro-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- Contact Page --- */
.contact-layout {
    display: flex;
    gap: 50px;
    width: 100%;
}

.contact-form-container {
    flex: 2;
}

.contact-details-container {
    flex: 1;
    background-color: #f9fafb;
    padding: 30px;
    border-radius: 5px;
}

.contact-form-container h3,
.contact-details-container h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 25px;
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

/* --- Navigation & Responsive Styles --- */
/* Desktop Navigation */
.main-nav {
    display: flex;
    flex-direction: row;
    gap: 25px;
}
.main-nav a {
    padding: 5px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.hamburger-menu {
    display: none; /* Hidden on desktop */
}

/* Tablet & Mobile Styles */
@media (max-width: 992px) {
    /* Show Hamburger on mobile */
    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 1001;
        cursor: pointer;
    }
    .hamburger-menu .line {
        width: 28px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
    }
    .hamburger-menu.is-active .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.is-active .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.is-active .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    /* Add this new rule */
.hamburger-menu.is-active .line {
    background-color: var(--text-light); /* Changes the 'X' to be white */
}

    /* Full-screen mobile menu styles */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        
        opacity: 0;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
        z-index: 1000;
        pointer-events: none;
    }
    .main-nav.nav-active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    .main-nav a {
        color: var(--text-light);
        font-size: 1.5rem;
        font-weight: 700;
    }

    /* General layout stacking for tablet */
    .layout-container-flex, .contact-layout {
        flex-direction: column;
    }
    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content .hero-intro {
        font-size: 1rem;
    }
    .section-title, .intro-title {
        font-size: 2rem;
    }
    .icon-blurbs {
        flex-direction: column;
        align-items: center;
    }
    .footer-main {
        padding: 40px 20px;
    }
    .footer-inner {
        width: 100%;
        max-width: 100%;
    }
    .post-list {
        grid-template-columns: 1fr;
    }
}

/* --- Animation Styles --- */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-up {
    animation: slideUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 1s ease-out 0.2s forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 1s ease-out 0.2s forwards;
    opacity: 0;
}

/* --- Clickable Post Card Styles --- */

.post-item {
    position: relative; /* This is essential for the link stretching */
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

.post-title a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Make sure it's on top of other content */
}

/* --- Pagination Styles --- */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
/* --- Discipleship Form Responsive Fix --- */
@media (max-width: 768px) {
    .discipleship-form-page {
        padding: 0; /* Remove padding for a full-width feel on mobile */
    }
    .form-row {
        flex-direction: column; /* Stack fields like First/Last Name on mobile */
        gap: 0;
    }
}