/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: white;
}

/* Root Variables */
:root {
    --primary-color: #000000;
    --secondary-color: #a3b68a;
    --accent-color: #5c724a;
    --text-dark: #24331f;
    --text-light: #666;
    --white: #ffffff;
    --light-bg: #FEFCF8;
    --gradient-primary: linear-gradient(135deg, #24331f 0%, #a3b68a 100%);
    --gradient-secondary: linear-gradient(135deg, #F5F5D5 0%, #5c724a 100%);
    --shadow-light: 0 10px 30px rgba(53,74,47, 0.1);
    --shadow-medium: 0 15px 40px rgba(53,74,47, 0.15);
    --shadow-heavy: 0 20px 60px rgba(53,74,47, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2C1810;
    border-radius: 4px;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.backdrop-blur {
    backdrop-filter: blur(20px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Accessibility Focus */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

@keyframes confettiFall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}


.slide-in-left { opacity: 0; transform: translateX(-50px); transition: opacity 0.8s ease, transform 0.8s ease; }
.slide-in-left.visible { opacity: 1; transform: translateX(0); }
.slide-in-right { opacity: 0; transform: translateX(50px); transition: opacity 0.8s ease, transform 0.8s ease; }
.slide-in-right.visible { opacity: 1; transform: translateX(0); }
.scale-in { opacity: 0; transform: scale(0.8); transition: opacity 0.8s ease, transform 0.8s ease; }
.scale-in.visible { opacity: 1; transform: scale(1); }
.floating { animation: float 3s ease-in-out infinite; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2d5541;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: var(--white);
}

.preloader-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: fadeInUp 0.7s ease-out;
}


.preloader-logo img {
    width: 150px;  /* Set a fixed width */
    height: auto;  /* Maintain aspect ratio */
    display: block;
    margin: 0 auto;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: var(--white);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: none;
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background: transparent;
    padding: 0.5rem 2rem;
}

.logo img {
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #B89047;
    margin: 5px auto;  /* Change from '5px 0' to '5px auto' */
    transition: all 0.3s ease;
    margin-right: 20px;

}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100%;
    background: transparent;
    transition: right 0.3s ease;
    z-index: 1000;
    padding-top: 4rem;
}

.sidebar.active {
    right: 0;
}

.navbar.scrolled .logo img {
    height: 70px;
}

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

.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
    outline: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #24331f;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 769px) {
    .sidebar {
        position: static;
        width: auto;
        height: auto;
        padding-top: 0;
        box-shadow: none;
        background: transparent;
    }

    .nav-links {
        flex-direction: row;
        gap: 2rem;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        display: block;
    }

    .nav-links {
        align-items: flex-start;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('/static/images/COVER.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
   /* height: 60px;  Adjust this for deeper/shallower curve */
    background: var(--light-bg); /* Matches the body background color below the hero */
    /*clip-path: ellipse(60% 100% at 50% 100%); */
    z-index: 1; /* Places it above the hero content if needed */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeInUp 1.2s ease-out;
}



.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    line-height: 1.1;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 300;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;

}

.cta-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section Backgrounds */
.section-bg {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    backdrop-filter: blur(1px);
    border: 2px solid black;
}

.section-bg > * {
    position: relative;
    z-index: 2;
}

/* Description Section */
.description {
    padding: 8rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background: #24331f;
    border: 3px solid #24331f;
    margin-bottom: 4rem;
}

.description h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description p {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
}

.parallax {
    position: relative;
    height: 500px;
    overflow: hidden;

}
.parallax {
    height: 500px;
    border: solid 1px #24331f;
    background: url('/static/images/paral.jpeg') center center / cover no-repeat;
    background-attachment: fixed;   /* FIXED IMAGE */

    position: relative;
}

.parallax-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-inner h2 {
    color: white;
    font-size: 2.5rem;
    letter-spacing: 5px;
}


/* Gallery Section */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Two images side-by-side when space allows */
    gap: 4rem;
    padding: 1rem;
    max-width: 1200px; /* Limit max width for large screens */
    margin: 0 auto; /* Center the container */
    margin-bottom: 4rem;

}

.gallery-item {

    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: var(--shadow-medium);
    height: 400px; /* Fixed height for consistency */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure images fill the container without distortion */
    display: block;
    border-radius: 5px;
    transition: transform 0.5s ease;

}

.gallery-item img:hover {
    transform: scale(1.05); /* Retain hover zoom effect */
}

/* Service Times */
.service-times {
    padding: 8rem 1rem;
    text-align: center;
    background: var(--gradient-secondary);
    color: var(--text-dark);
    position: relative;
}

.service-times::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><path d="M0 10l20-10v20zM20 10l20-10v20zM40 10l20-10v20zM60 10l20-10v20zM80 10l20-10v20z" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
}

.service-times h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 4rem;
    color: var(--text-dark);
}

.times-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.time-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

/* Events Section */
.events {
    padding: 8rem 1rem;
    background: white;

}

.events-page h1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 600;
    margin-bottom: 3rem;
    background: var(--text-dark);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.events h2 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.events-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;

}

.event-card {
    width: 100%;
    height: auto;              /* allow card to expand with content */
    min-height: 260px;         /* optional: keep a nice baseline */
    box-sizing: border-box;
    overflow: hidden;         /* make sure text is not clipped */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid black;
    border-radius: 5px;
    background: white;
}
.event-card h3,
.event-card p {
    word-wrap: break-word;     /* prevent long words from breaking layout */
    white-space: normal;
    /* let text wrap normally */
}

.event-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: var(--shadow-heavy);
}

.event-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover img {
    transform: scale(1.1);
}

.event-content {
    padding: 2rem;
}

.event-date {
    color: #24331f;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.event-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    /*margin-bottom: 1rem;*/
    color: #24331f;
}

/* Contact Section */
.contact {
    padding: 8rem 1rem;
    background: #eeebe7;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact h2 {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-form {
    background: rgba(255, 255, 255, 0.70);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    transform: translateY(-2px);
}

.submit-btn {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.submit-btn:hover,
.submit-btn:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.map-section iframe {
    width: 100%;
    height: 300px;
    border: 10px solid white;
}

.location-info {
    padding: 2rem;
    font-family: 'Montserrat', sans-serif;
}

/* Page visibility */
.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.location-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
}

.location-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Montserrat', sans-serif;
}

.location-info i {
    color: var(--primary-color);
    width: 20px;
}

/* About Page Styles */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.about-content h1 {
   text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text {
   text-align: justify;
    max-width: 1200px;
    margin: 0 auto 5rem;
    font-size: 1.2rem;
    color: black;
    line-height: 1.8;
    gap: 20px;
    flex: 1; /* Takes remaining space */
}
.about-content h2 {
   text-align: justify;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 600;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-intro {
    text-align: justify;
    max-width: 1200px;
    margin: 0 auto 5rem;
    font-size: 1.2rem;
    color: black;
    line-height: 1.8;
    gap: 20px;
    flex: 1; /* Takes remaining space */
}

.story-intro img {
    width: 70%;
    height: 70%;
    object-fit: cover; /* Keeps image neat */
    border-radius: 12px;
    position: relative;
    left: 15%;
}

/* Sermons Page Styles */
.sermons-page {
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sermons-page h1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sermons-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
    font-size: 1.2rem;
    color: black;
    line-height: 1.8;
}

.sermons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.sermon-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.5s ease;
    cursor: pointer;
    position: relative;
}

.sermon-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-heavy);
}

.sermon-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.sermon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sermon-card:hover .sermon-image img {
    transform: scale(1.1);
}

.sermon-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(139, 69, 19, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.sermon-card:hover .sermon-play-overlay {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.sermon-content {
    padding: 2rem;
}

.sermon-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sermon-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sermon-preacher {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sermon-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.sermon-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.sermon-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sermon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    background: var(--light-bg);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Sermon Modal */
.sermon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.sermon-modal.active {
    display: flex;
    opacity: 1;
}

.sermon-modal-content {
    background: white;
    border-radius: 30px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    margin: 2rem 0;
}

.sermon-modal.active .sermon-modal-content {
    transform: scale(1);
}

.sermon-modal-header {
    background: var(--gradient-primary);
    padding: 2rem;
    color: white;
    position: relative;
}

.close-sermon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sermon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sermon-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.sermon-modal-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.sermon-modal-body {
    padding: 3rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

.audio-player {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.audio-player h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.audio-player audio {
    width: 100%;
    border-radius: 10px;
}

.audio-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.audio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.audio-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.sermon-description-full {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .sermons-page h1 {
        font-size: 2.5rem;
    }

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

    .sermon-modal-content {
        width: 95%;
        margin: 1rem 0;
    }

    .sermon-modal-body {
        padding: 2rem 1.5rem;
    }

    .sermon-modal-title {
        font-size: 2rem;
    }
}

/*Ministries page*/
.ministries-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.ministries-content h1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 600;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ministries-content p {
    text-align: center;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: black;
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
    padding: 2rem;
}

.ministry-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 400px;

}

.ministry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.ministry-card:hover::before {
    opacity: 0.1;
}

.ministry-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.ministry-icon1 {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/gallery1.jpeg');
    background-size: cover;
    background-position: center;
    height: 250px; /* Increased height for the image section */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.ministry-icon1 h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.ministry-info {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.ministry-info p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    max-height: 60px;

}

.ministry-info .view-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto; /* Push to bottom */

}

.ministry-info .view-more:hover {
    gap: 1rem;
}

/* Events Page Styles */
.events-page {
    padding: 6rem 2rem 4rem;
}

.events-page h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #8B4513;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    text-align: center;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.success-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-message h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

/* Space Rental Styles */
.space-rental-page {
    padding: 8rem 1rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.space-rental-page h1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 600;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rental-intro {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: black;
}

.spaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.space-card {
    aspect-ratio: 16/9;  /* Fixed landscape aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.space-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.space-card:hover {
    transform: translateY(-15px) rotateY(5deg);
    box-shadow: var(--shadow-heavy);
}


.rental-form-section {
    background: #5c724a;
    padding: 4rem 2rem;
    border-radius: 30px;
    margin-top: 2rem;
    box-shadow: var(--shadow-light);
}

.rental-form {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.70);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-medium);
}

.rental-form h2 {
    text-align: center;
    font-family: 'Montserrat', serif;
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 4rem;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.checkbox-group {
    margin-bottom: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.checkbox-options {
    display: grid;
    font-family: 'Montserrat', serif;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.checkbox-item:hover {
    background: rgba(139, 69, 19, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 1rem 2rem;
    position: relative;
}

/*.footer::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    right: 0;*/
/*    bottom: 0;*/
/*    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 100L100 0v100z" fill="rgba(139,69,19,0.1)"/></svg>') repeat;*/
/*}*/

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.footer-section p,
.footer-section a {
    margin-bottom: 0.8rem;
    color: #ccc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: color 0.3s ease, transform 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.footer-section a:hover,
.footer-section a:focus {
    color: var(--white);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    position: relative;
    z-index: 10;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #24331f;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--white);
}

.social-links a:hover,
.social-links a:focus {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #999;
}

/* Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-container,
    .form-row,
    .checkbox-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-container,
    .times-container,
    .events-container,
    .spaces-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 4vw, 3rem);
    }

    .hero-content p {
        font-size: clamp(1rem, 1.5vw, 1.2rem);
    }

    .description h2,
    .service-times h2,
    .events h2,
    .contact h2,
    .space-rental-page h1,
    .about-content h1,
    .events-page h1 {
        font-size: clamp(2rem, 3vw, 2.5rem);
    }

    .space-rental-page,
    .about-content,
    .events-page {
        padding: 6rem 1rem 4rem;
    }
    .about-image {
        flex: none;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .gallery-item {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        max-height: 300px;
    }
}

@media (max-width: 480px) {

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
    }

    .submit-btn {
        padding: 0.8rem 1.5rem;
    }
    .events-container {
        grid-template-columns: 1fr;  /* stack cards vertically */
        gap: 1rem;
        padding: 0 1rem;
        width: 100%;
    }

    .event-card {
        width: 100%;
        height: auto;  /* critical: don’t fix height */
    }
}