/* --- CSS Variables for Easy Theming --- */
:root {
    --bg-color: #1a1a24;
    --card-color: #22222e;
    --primary-accent: #8a44ff;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --border-color: #33333f;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --header-height: 80px;
    --font-family: 'Poppins', sans-serif;
}

/* --- General Styles & Resets --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        text-decoration: underline;
    }

/* --- Header & Footer --- */
header {
    background-color: var(--card-color);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 55px;
    vertical-align: middle;
}

nav ul {
    list-style: none;
}

nav li {
    display: inline-block;
    margin: 0 15px;
}

nav a {
    color: var(--text-primary);
    font-weight: 400;
}

    nav a:hover {
        color: var(--primary-accent);
        text-decoration: none;
    }

.header-contact {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 0.9em;
}

    .header-contact a {
        color: var(--text-secondary);
    }

footer {
    background-color: var(--card-color);
    color: var(--text-secondary);
    padding: 15px;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
}

/* --- Main Content & Card Layout --- */
main {
    padding: calc(var(--header-height) + 40px) 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    text-align: center;
}

.hero {
    border: 2px solid var(--primary-accent);
}

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5em;
    color: var(--text-primary);
}

h2 {
    font-size: 2em;
    color: var(--primary-accent);
}

h3 {
    font-size: 1.4em;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

/* --- Specific Section Layouts --- */
.two-column-layout, .three-column-layout {
    display: flex;
    gap: 30px;
    text-align: left;
    align-items: center;
    margin-top: 20px;
}

.three-column-layout {
    align-items: stretch;
}

.column, .service-card {
    flex: 1;
}

.service-card {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px var(--shadow-color);
    }

    .service-card h3 {
        margin-top: 0;
    }

.map-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}

    .map-container iframe {
        width: 100%;
        height: 100%;
    }

.bible-quote {
    border-left: 3px solid var(--primary-accent);
    margin: 30px auto;
    padding: 10px 20px;
    max-width: 700px;
    text-align: left;
}

    .bible-quote p {
        font-style: italic;
        margin-bottom: 0.5rem;
    }

    .bible-quote span {
        display: block;
        text-align: right;
        color: var(--text-primary);
        font-weight: 600;
    }

/* --- Slideshow --- */
.slideshow {
    width: 100%;
    max-width: 900px;
    margin: 20px auto 0;
    overflow: hidden;
    border-radius: 8px;
    padding: 0 0 30px 0;
}

.slides {
    display: flex;
    width: 400%; /* 100% * number of slides */
    animation: slide-animation 24s infinite; /* 6s per slide */
}

    .slides figure {
        width: 25%; /* 100% / number of slides */
        flex-shrink: 0;
        position: relative;
    }

    .slides img {
        width: 100%;
        display: block;
        object-fit: cover;
    }

    .slides figcaption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        color: white;
        padding: 40px 20px 20px;
        text-align: left;
    }

        .slides figcaption h3 {
            color: white;
            margin-bottom: 0.5rem;
        }

        .slides figcaption p {
            color: #ddd;
            margin-bottom: 0;
            font-size: 0.9em;
        }

@keyframes slide-animation {
    0% {
        transform: translateX(0%);
    }

    20% {
        transform: translateX(0%);
    }
    /* Stay on slide 1 */
    25% {
        transform: translateX(-25%);
    }
    /* Move to slide 2 */
    45% {
        transform: translateX(-25%);
    }
    /* Stay on slide 2 */
    50% {
        transform: translateX(-50%);
    }
    /* Move to slide 3 */
    70% {
        transform: translateX(-50%);
    }
    /* Stay on slide 3 */
    75% {
        transform: translateX(-75%);
    }
    /* Move to slide 4 */
    95% {
        transform: translateX(-75%);
    }
    /* Stay on slide 4 */
    100% {
        transform: translateX(0%);
    }
    /* Loop back to start */
}
.ad-container {
    text-align: center;
    margin: 20px 0;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    header {
        height: auto;
        padding: 15px 0;
        position: static;
    }

    html {
        scroll-padding-top: 20px;
    }

    main {
        padding-top: 20px;
    }

    .two-column-layout, .three-column-layout {
        flex-direction: column;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.7em;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 20px;
    }

    nav li {
        margin: 0 8px;
    }

    .header-contact {
        text-align: center;
    }
}
