html {
    scroll-behavior: smooth;
}

/* Optional: Add a hover effect to the new link */
.nav-links li a:hover {
    color: #e67e22; /* Matches your church's accent color */
}


:root {
    --primary: #2c3e50;
    --accent: #e67e22;
    --light: #ecf0f1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-weight: bold; font-size: 1.5rem; color: var(--primary); }
.logo span { color: var(--accent); font-size: 0.9rem; }
/* Logo Container Styling */
.logo {
    display: flex;
    align-items: center;
    padding: 5px 0; /* Adds a little space above and below */
}

.logo img {
    /* Increase height for better visibility */
    height: 90px; 
    
    /* Keeps the proportions perfect */
    width: auto; 
    
    /* High-quality rendering fix */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    
    /* Modern shadow to make it 'pop' against the background */
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
    
    display: block;
}

/* Ensure the navbar adjusts to the larger logo */
nav {
    min-height: 100px; /* Adjusts the bar height to fit the logo */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}
.logo img:hover {
    transform: scale(1.05); /* Slight zoom effect when you hover */
}

/* Vision & Mission Styling */
.mission-section {
    background-color: #f9f9f9;
    padding: 100px 10%;
    text-align: center;
}

.vision-box {
    max-width: 800px;
    margin: 0 auto 50px;
}

.subtitle {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 0.9rem;
}

.vision-box h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    color: var(--primary);
}

.divider {
    width: 100px;
    border: 2px solid var(--accent);
    margin: 40px auto;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.mission-card {
    background: white;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-bottom: 4px solid transparent;
}

.mission-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--accent);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.mission-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.mission-card p {
    font-size: 0.95rem;
    color: #666;
}

/* Ensure the Nav keeps everything aligned with the new image */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Update your existing nav-links in style.css */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center; /* Keeps everything vertically centered */
}

.nav-links li {
    margin: 0 15px; /* Adds space between the words */
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #e67e22; /* Changes color when you hover over it */
}
.give-btn {
    background: var(--accent);
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('images/church_group.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

/* Slider Container */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* Fallback */
}

/* Slide Styling */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Smooth 1.5s crossfade */
    z-index: 1;
}

.slide.active {
    opacity: 1;
}

/* Content & Typography */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #e67e22;
    border-color: #e67e22;
    transform: scale(1.3);
}

/* Mobile Portability */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-slider { height: 80vh; }
}

.hero h1 { font-size: 3.5rem; margin-bottom: 10px; }

.btn-primary { background: var(--accent); color: white; padding: 15px 30px; text-decoration: none; border-radius: 5px; margin-right: 10px; }
.btn-secondary { border: 2px solid white; color: white; padding: 13px 30px; text-decoration: none; border-radius: 5px; }

/* Content Sections */
.container { padding: 80px 10%; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
img { width: 100%; border-radius: 10px; }

footer { background: var(--primary); color: white; text-align: center; padding: 40px 0; }
.social-links a { color: white; font-size: 1.5rem; margin: 0 10px; }

@media (max-width: 768px) {
    .logo img {
        height: 70px; /* Smaller for mobile screens */
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.close:hover {
    color: #e67e22; /* Changes color when you hover over the X */
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
}

/* This is the most important part for the popup to work */
/* This hides the form initially */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Blurs the background church image */
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
}

.modal-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

#connectionForm input, #connectionForm textarea {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #f1f1f1;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

#connectionForm input:focus, #connectionForm textarea:focus {
    border-color: #e67e22; /* Church accent color */
    background: #fffaf5;
}

.submit-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    padding: 18px;
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
    margin-top: 15px;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* Video Modal Specific Styling */
.video-modal-content {
    max-width: 850px !important;
    background: #000 !important; /* Dark background for a cinema feel */
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Make sure the close button is white and visible on the black background */
#videoModal .close {
    color: #fff;
    right: 15px;
    top: 10px;
    z-index: 100;
}


.about-section {
    padding: 80px 0;
    background-color: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.img-caption {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    color: #555;
    font-style: italic;
}

.subtitle {
    color: #e67e22; /* Use your brand accent color */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.bible-verse {
    background: #fdf2e9;
    padding: 25px;
    border-left: 5px solid #e67e22;
    border-radius: 8px;
    margin: 20px 0;
}

.bible-verse p {
    font-size: 1.1rem;
    font-style: italic;
    color: #2c3e50;
    margin-bottom: 10px !important;
}

.bible-verse cite {
    font-weight: bold;
    color: #e67e22;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.feature {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature i {
    color: #27ae60;
}


@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .feature {
        justify-content: center;
    }
}

/* 1. Global Reset & Fluidity */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden; /* Prevents horizontal scrolling */
    width: 100%;
}

img, iframe {
    max-width: 100%; /* Ensures media never "breaks" the screen width */
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 2. Navigation Fix */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    flex-wrap: wrap; /* Allows menu to drop down if screen is too narrow */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

/* 3. Hero Section (Home) */
.hero {
    padding: 100px 20px;
    text-align: center;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Buttons stack on small phones */
}

/* 4. Responsive Grids (About, Mission, Contact) */
.about-grid, .contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: start;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 5. Mobile Adjustments (Media Queries) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide standard links on mobile (recommend Hamburger menu) */
    }
    
    .hero-content h1 {
        font-size: 1.8rem; /* Smaller text for mobile */
    }

    .about-text, .contact-info {
        text-align: center;
    }
    
    .about-img img {
        margin: 0 auto;
    }
}

/* Ensure the total width is never exceeded */
body { overflow-x: hidden; }

/* Responsive Grid for About and Contact */
.about-grid, .contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    align-items: center;
}

/* Fixes for Mobile Screens */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 1.8rem; }
    
    /* Make the menu stackable */
    .nav-links {
        display: none; /* Add a toggle script or use the checkbox hack above */
    }
    
    .about-img img {
        max-width: 100%;
        height: auto;
    }
}

/* Bible Verse Styling */
.bible-verse {
    background: #fdf2e9;
    padding: 20px;
    border-left: 5px solid #e67e22;
    margin: 20px 0;
    font-style: italic;
}
/* --- THE SAFETY RESET --- */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Stops horizontal scrolling on iPhones */
}

/* --- FLEXIBLE CONTAINERS --- */
.container {
    width: 95%; /* Leaves a 2.5% margin on each side for small screens */
    max-width: 1200px;
    margin: 0 auto;
}

/* --- RESPONSIVE VIDEO MODAL --- */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- AUTO-STACKING GRID --- */
.about-grid, .contact-wrapper, .mission-grid {
    display: flex;
    flex-wrap: wrap; /* Automatically moves content to next line on mobile */
    gap: 20px;
}

.about-text, .about-img, .contact-info, .map-container {
    flex: 1 1 300px; /* Minimum width of 300px before it stacks */
}

/* --- CALENDAR GRID --- */
.calendar-grid {
    display: grid;
    /* This makes the grid PORTABLE: it shrinks or expands based on screen size */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.calendar-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.calendar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.calendar-card.highlight {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
}

.calendar-card.highlight .day-tag,
.calendar-card.highlight h3,
.calendar-card.highlight p {
    color: white;
}

/* --- BUTTONS INSIDE CARDS --- */
.btn-calendar {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    background: white;
    color: #e67e22;
}

.highlight .btn-calendar {
    background: white;
    color: #e67e22;
}

.btn-calendar.outline {
    background: transparent;
    border: 2px solid #e67e22;
    color: #e67e22;
}

.btn-calendar:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Container that prevents details from being cut off */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

/* Calendar Grid - Portability Logic */
.calendar-grid {
    display: flex;
    flex-wrap: wrap; /* Allows cards to wrap to the next line on mobile */
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.calendar-card {
    flex: 1 1 300px; /* Base width of 300px, but expands to fill space */
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 4px solid #e67e22;
    text-align: left;
}

/* Adjustments for Mobile Screens */
@media screen and (max-width: 768px) {
    .nav-links {
        flex-direction: column; /* Stacks nav links if screen is tiny */
        gap: 10px;
        text-align: center;
    }
    
    .calendar-card {
        flex: 1 1 100%; /* Makes cards full width on phones */
    }
    
    .hero-content h1 {
        font-size: 1.8rem; /* Shrinks text so it fits mobile */
    }
}

/* MISSION SECTION STYLING */
.mission-grid {
    display: grid;
    /* This makes 5 cards look good by centering the leftovers */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
    justify-content: center;
}

.mission-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden; /* Clips the image to the border radius */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards are same height */
}

.mission-card:hover {
    transform: translateY(-10px);
}

.mission-img {
    width: 100%;
    height: 200px;
}

.mission-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures your photos aren't stretched */
}

.mission-content {
    padding: 25px;
    text-align: center;
    flex-grow: 1; /* Pushes content to fill the card */
}

.mission-content h3 {
    margin: 15px 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.mission-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.card-icon {
    font-size: 2rem;
    color: #e67e22;
    margin-top: -50px; /* Pulls icon up over the image slightly */
    background: #fff;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Gallery Modal Styling */
.gallery-modal {
    max-width: 1000px !important;
    width: 95%;
    border-radius: 20px;
    padding: 30px;
}

.gallery-scroll-container {
    display: grid;
    /* This makes the gallery PORTABLE: it shrinks or expands based on screen size */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 70vh; /* Limits height so it doesn't go off-screen */
    overflow-y: auto; /* Allows scrolling inside the pop-up */
}

.gallery-scroll-container img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-scroll-container img:hover {
    transform: scale(1.03);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .gallery-scroll-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .gallery-scroll-container img {
        height: 120px;
    }
}

/* --- NAVIGATION BAR CONTAINER --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08); /* Adds that modern 'lift' */
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- LOGO & BRANDING --- */
.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-family: 'Poppins', sans-serif; /* Requires the Google Font link in your <head> */
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a252f;
    letter-spacing: 0.5px;
    line-height: 1;
}

.sub-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e67e22; /* Your orange accent */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 5px;
}

.location {
    color: #95a5a6; /* Subtle grey for the city name */
    font-weight: 400;
    text-transform: none; /* Keeps 'Jersey City' looking natural */
    letter-spacing: 0;
}

/* --- NAV LINKS & GIVE BUTTON --- */
.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #e67e22;
}

.give-btn {
    background: #e67e22;
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px; /* Pill shape like Church of the King */
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

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

/* Styling for the Featured Card */
.method-card.featured {
    border: 2px solid #e67e22;
    background: #fffdfb;
    transform: scale(1.02);
}

.method-card.featured i {
    color: #e67e22;
}

.btn-primary-small {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #e67e22;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-primary-small:hover {
    background: #d35400;
}