/* Base Reset & Variables */
:root {
    --primary-blue: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --primary-pale: #dbeafe;

    --neutral-white: #ffffff;
    --neutral-offwhite: #fafafa;
    --neutral-greywhite: #f5f5f5;
    --neutral-lightgrey: #e5e7eb;
    --neutral-mediumgrey: #9ca3af;
    --neutral-darkgrey: #374151;
    --neutral-charcoal: #1f2937;

    --accent-gold: #f59e0b;
    --accent-green: #10b981;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Montserrat', sans-serif;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;

    --shadow-sm: 0 4px 12px rgba(30, 58, 138, 0.08);
    --shadow-hover: 0 10px 25px rgba(30, 58, 138, 0.15);
}

/* Slideshow Hero */
.hero-section {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    color: var(--neutral-white);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-md);
    animation: fadeUp 1s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    color: var(--neutral-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }

    .hero-content p {
        font-size: 1.75rem;
    }
}

.slider-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--neutral-white);
    transform: scale(1.2);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
    cursor: pointer;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--neutral-darkgrey);
    line-height: 1.6;
    background-color: var(--neutral-offwhite);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--neutral-charcoal);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
    .section {
        padding: 80px 0;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-family: var(--font-accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--neutral-white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-gold {
    background-color: var(--accent-gold);
    color: var(--neutral-charcoal);
    /* Better contrast? Or white? Prompt implies gold accent */
}

.btn-gold:hover {
    background-color: #d97706;
    /* Darker gold */
}

.btn-secondary {
    background-color: var(--neutral-white);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-pale);
}

.white-outline {
    background: transparent;
    border-color: var(--neutral-white);
    color: var(--neutral-white);
}

.white-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* Header */
#main-header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
    background-color: var(--neutral-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-white);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a img {
    height: 40px;
    width: auto;
    border-radius: 0;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

#main-header.scrolled .logo a {
    color: var(--primary-blue);
}

#main-header.scrolled .logo a img {
    filter: none;
}

.footer-logo {
    height: 45px;
    width: auto;
    border-radius: 0;
    margin-bottom: 15px;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.desktop-nav a {
    font-family: var(--font-accent);
    font-weight: 500;
    color: var(--neutral-white);
    /* White on hero */
    transition: color 0.3s ease;
}

#main-header.scrolled .desktop-nav a {
    color: var(--neutral-darkgrey);
}

.desktop-nav a:hover,
.desktop-nav a.active-link {
    color: var(--accent-gold);
    /* Gold hover on dark */
}

#main-header.scrolled .desktop-nav a:hover,
#main-header.scrolled .desktop-nav a.active-link {
    color: var(--primary-blue);
}

.nav-cta {
    padding: 10px 24px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 4px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--neutral-white);
    border-radius: 2px;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

#main-header.scrolled .mobile-menu-toggle span {
    background-color: var(--primary-blue);
}

/* Hamburger → X animation when menu is open */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    /* Hide desktop nav by default on mobile */
    .desktop-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-blue);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        padding: 0;
        overflow: hidden;
    }

    /* Show when toggled open */
    .desktop-nav.mobile-open {
        display: block;
    }

    /* Stack all nav items vertically */
    .desktop-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 16px;
    }

    .desktop-nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .desktop-nav ul li:last-child {
        border-bottom: none;
        padding: 12px 24px 4px;
    }

    .desktop-nav a {
        display: block;
        padding: 14px 24px;
        color: var(--neutral-white) !important;
        font-size: 1rem;
        font-weight: 600;
    }

    .desktop-nav a:hover,
    .desktop-nav a.active-link {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--accent-gold) !important;
    }

    /* Give button full width feel */
    .desktop-nav .btn-gold {
        display: block;
        text-align: center;
        border-radius: 8px;
        padding: 12px 24px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Ensure header is positioned so the dropdown can be absolute */
    #main-header {
        position: sticky;
        top: 0;
    }
}


/* Footer */
footer {
    background-color: var(--neutral-offwhite);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--neutral-lightgrey);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col h3,
.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
    color: var(--primary-blue);
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--accent-gold);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    background-color: var(--primary-blue);
    color: var(--neutral-white);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

/* Sub-page Hero */
.hero-small {
    height: 50vh;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--neutral-white);
    text-align: center;
}

/* Standard sub-page overlay (uniform) */
.hero-small::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.6);
    z-index: 2;
}

.hero-small .hero-content {
    animation: none;
    position: relative;
    z-index: 4;
}

/* -----------------------------------------------
   About-Us Hero — congregation worship photo
----------------------------------------------- */

/* Separate image layer so CSS filter doesn't bleed into text */
.about-hero .hero-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    /* JPG fallback first; WebP overrides in browsers that support it */
    background-image: url('../images/congregation-hero.jpg');
    background-image: url('../images/congregation-hero.webp');
    /* Warmth, saturation & brightness are baked into the image file by
       process-hero-image.py — no CSS filter needed here */
    z-index: 0;
}

/* Gradient overlay: rgba(30,58,138,.6) top → rgba(30,58,138,.3) bottom */
.about-hero::before {
    background: linear-gradient(
        to bottom,
        rgba(30, 58, 138, 0.6) 0%,
        rgba(30, 58, 138, 0.3) 100%
    );
    z-index: 2;
}

/* Vignette — darkens edges for cinematic depth */
.about-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 50%,
        transparent 55%,
        rgba(0, 0, 0, 0.38) 100%
    );
    z-index: 3;
    pointer-events: none;
}

/* Breadcrumb — top-left corner */
.hero-breadcrumb {
    position: absolute;
    top: 24px;
    left: 32px;
    font-size: 14px;
    font-family: var(--font-accent);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.04em;
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.hero-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Heading override for about hero — 40px bold */
.about-hero .hero-content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Subheading — 20px */
.about-hero .hero-subheading {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

/* Mobile: 40vh height */
@media (max-width: 767px) {
    .about-hero {
        height: 40vh;
        min-height: 280px;
    }

    .about-hero .hero-content h1 {
        font-size: 28px;
    }

    .about-hero .hero-subheading {
        font-size: 16px;
    }

    .hero-breadcrumb {
        top: 14px;
        left: 16px;
        font-size: 12px;
    }
}

/* Accordion for FAQ/Beliefs */
.accordion-item {
    border-bottom: 1px solid var(--neutral-lightgrey);
    margin-bottom: 10px;
}

.accordion-header {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--neutral-charcoal);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    display: none;
    padding-bottom: 20px;
    color: var(--neutral-darkgrey);
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* Team Grid */
.team-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 30px;
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--primary-pale);
}

/* Ministry Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

/* Ministry Cards */
.ministry-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ministry-card:hover {
    transform: translateY(-5px);
}

.ministry-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.ministry-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ministry-tags {
    margin-bottom: 10px;
}

.ministry-tag {
    background: var(--primary-pale);
    color: var(--primary-blue);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

/* Event Cards */
.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-date-badge {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.25rem;
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.event-meta {
    color: var(--neutral-mediumgrey);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.recurring-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.recurring-time {
    background: var(--primary-pale);
    color: var(--primary-blue);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    min-width: 100px;
}

.recurring-time strong {
    display: block;
    font-size: 1.2rem;
}

/* Media Page Styles */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    background: black;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sermon-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.sermon-card:hover {
    transform: translateY(-5px);
}

.sermon-thumb {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay {
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.sermon-card:hover .play-overlay {
    background: var(--primary-blue);
}

.sermon-content {
    padding: 20px;
}

.sermon-meta {
    font-size: 0.85rem;
    color: var(--neutral-mediumgrey);
    margin-bottom: 10px;
}

/* Contact Styles */
.contact-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-pale);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--neutral-charcoal);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--neutral-lightgrey);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.map-container {
    height: 450px;
    width: 100%;
    background: #eee;
}

/* Giving Page Styles */
.giving-card {
    background: white;
    border: 1px solid var(--neutral-lightgrey);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.giving-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.giving-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

/* Timeline for Visit Page */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-pale);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary-blue);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-container::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .left::after,
    .right::after {
        left: 21px;
    }

    .right {
        left: 0%;
    }
}

/* Simplified Testimonial Slider */
.testimonial-slider {
    overflow: hidden;
}

.testimonial-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 15px;
}

.testimonial-slide.active {
    opacity: 1;
}