/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5530;
    --primary-dark: #1e3d22;
    --primary-light: #4a7c4f;
    --accent-color: #d4a853;
    --text-color: #333333;
    --text-light: #666666;
    --background-color: #fafafa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 2rem;
}

.hero-small {
    padding: 3rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero .event-date {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.card li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Churches Grid */
.churches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.church-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.church-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.church-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.church-location {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.church-card > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.church-details {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.church-details p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.church-details p:last-child {
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.875rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-top: 0;
}

/* Video Landing Page */
.video-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #7BC8D4;
    position: relative;
}

.video-landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://res.cloudinary.com/djirfmbl9/image/upload/f_auto,q_auto/v1771519515/AD302799_nrjpgn.jpg') center center / cover no-repeat;
    opacity: 0.25;
    z-index: 0;
}

.video-landing > * {
    position: relative;
    z-index: 1;
}

.logo-banner {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: -2rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.landing-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
}

/* Verse Carousel */
.carousel {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
    position: relative;
}

.carousel-track {
    position: relative;
    height: 13rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verse {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.verse.active {
    opacity: 1;
    pointer-events: auto;
}

.verse-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1.6rem);
    line-height: 1.25;
    color: #E5D4A8;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.verse-ref {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    color: var(--accent-color);
    letter-spacing: 0.08em;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-dark);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot.active {
    background: #7BC8D4;
    transform: scale(1.3);
}

.video-container {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

.action-buttons {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: -2rem;
    align-self: stretch;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #7BC8D4;
    color: #ffffff;
    text-decoration: none;
    padding: 2rem 1rem;
    border-radius: 0;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-church::before  { background-image: url('https://picsum.photos/seed/church/600/200');  }
.btn-explore::before { background-image: url('https://picsum.photos/seed/reading/600/200'); }
.btn-questions::before { background-image: url('https://picsum.photos/seed/talk/600/200'); }

.action-btn:hover::before {
    opacity: 1;
}

.action-btn:hover .btn-text {
    background: linear-gradient(90deg, #C1440E 0%, #F0841A 40%, #F9C31A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-text {
    position: relative;
    z-index: 1;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1.6rem);
    letter-spacing: 0.04em;
    color: #ffffff;
    text-shadow: none;
}

.minimal-footer {
    background: none;
    color: #000000;
    text-align: center;
    padding: 1rem;
}

.minimal-footer p {
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Map Page */
.map-page {
    height: 100vh;
    overflow: hidden;
    background: #7BC8D4;
}

.churches-layout {
    display: flex;
    height: 100vh;
}

/* ── Left: map panel ── */
.map-panel {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    background: #7BC8D4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaflet-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.custom-marker {
    background: transparent;
}

.marker-dot {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 4px solid #7BC8D4;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.marker-dot:hover {
    transform: scale(1.15);
    background: #F0841A;
    border-color: #C1440E;
}

.marker-dot.active {
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-color: #1e3d22;
    transform: scale(1.15);
}

.map-logo-link {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    z-index: 1000;
    text-decoration: none;
}

.map-logo {
    width: 130px;
    height: auto;
    display: block;
}

/* ── Right: church list panel ── */
.church-list-panel {
    flex: 0 0 45%;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    padding: 1.25rem 1.75rem 0.5rem;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.9rem;
    background: linear-gradient(90deg, #C1440E 0%, #F0841A 40%, #F9C31A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.church-item {
    flex: 1;
    min-height: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.church-item-header {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.45rem 0;
    cursor: pointer;
    flex-shrink: 0;
}

.church-item-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: #1a1a1a;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.church-item.highlighted .church-item-name {
    color: #7BC8D4;
}

.church-item.expanded .church-item-name {
    color: #1a1a1a;
}

.church-item-location {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.78rem;
    color: #F0841A;
    letter-spacing: 0.07em;
}

.church-item-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.3s ease;
}

.church-item.expanded {
    flex: 0 0 auto;
}

.church-item.expanded .church-item-body {
    max-height: 700px;
    opacity: 1;
    padding-bottom: 1rem;
}

.church-item-body p {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.church-item-body strong {
    color: rgba(0, 0, 0, 0.8);
}

.church-website {
    width: 100%;
    height: 280px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 0.5rem 0;
    background: #f5f5f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='none' stroke='%237BC8D4' stroke-width='3' stroke-dasharray='80' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center center no-repeat;
    object-fit: cover;
    object-position: top;
}

/* Map Markers */
.marker {
    position: absolute;
    cursor: pointer;
    z-index: 50;
}

.marker-pin {
    width: 30px;
    height: 30px;
    background: var(--white);
    border: 4px solid #7BC8D4;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.marker:hover .marker-pin {
    transform: scale(1.2);
    background: #F0841A;
    border-color: #C1440E;
}

.marker.active .marker-pin {
    transform: scale(1.2);
    background: #ffffff;
    border-color: var(--primary-dark);
}

.marker-popup {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.marker.active .marker-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.marker-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: var(--white) transparent transparent;
}

.marker-popup h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: #7BC8D4;
    margin-bottom: 0.25rem;
}

.popup-location {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: #F0841A;
    margin-bottom: 0.5rem;
}

.marker-popup p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.popup-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: #C1440E;
    text-decoration: none;
}

.popup-link:hover {
    text-decoration: underline;
}

/* Contact / Ask Questions Page */
.contact-page {
    min-height: 100vh;
    background: #7BC8D4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.contact-logo-link {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
}

.contact-logo {
    width: 130px;
    height: auto;
    filter: brightness(0) invert(1);
}

.contact-content {
    text-align: center;
    max-width: 90%;
    width: 100%;
}

.contact-cta {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.contact-intro {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-email {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    letter-spacing: 0.04em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 2rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s ease;
}

.contact-email:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Question Carousel */
.question-carousel {
    width: 100%;
    text-align: center;
    margin: 0 auto 2.5rem;
}

.question-track {
    position: relative;
    height: 14rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    text-align: center;
}

.question.active {
    opacity: 1;
    pointer-events: auto;
}

.question-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 10vw, 5rem);
    line-height: 1.2;
    background: linear-gradient(90deg, #C1440E 0%, #F0841A 40%, #F9C31A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.04em;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .content {
        padding: 2rem 1rem;
    }

    .churches-grid {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .marker-popup {
        width: 200px;
        padding: 1rem;
    }

    .map-title h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .video-landing {
        padding: 1rem;
    }

    .video-container {
        margin-bottom: 2rem;
    }

    .action-buttons {
        gap: 1rem;
        width: 100%;
    }

    .action-btn {
        flex: 1;
        min-width: 140px;
        padding: 1rem 1.5rem;
    }

    .btn-icon {
        font-size: 1.5rem;
    }

    .btn-text {
        font-size: 0.95rem;
    }

    .marker-pin {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }

    .marker-popup {
        width: 180px;
        padding: 0.875rem;
        font-size: 0.8rem;
    }

    .marker-popup h3 {
        font-size: 1rem;
    }

    .back-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .map-title {
        bottom: 1rem;
    }

    .map-title h1 {
        font-size: 1.5rem;
    }

    .map-title p {
        font-size: 0.875rem;
    }

    /* Homepage buttons - add breathing room */
    .action-buttons {
        width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: -1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .action-btn {
        flex: 1 1 100%;
        padding: 1.25rem 1rem;
    }

    /* Churches page - fix overlapping titles */
    .churches-layout {
        flex-direction: column;
    }

    .map-panel {
        flex: 0 0 50vh;
        width: 100%;
    }

    .church-list-panel {
        flex: 1;
        width: 100%;
        height: auto;
        max-height: 50vh;
    }

    .church-item {
        flex: none;
    }

    .church-item-name {
        font-size: 1rem;
    }

    .church-item-location {
        font-size: 0.7rem;
    }
}
