/* ==================== GLOBAL STYLES & VARIABLES ==================== */
:root {
    --primary-color: #800000;
    /* Maroon */
    --secondary-color: #D4AF37;
    /* Gold */
    --background-color: #F8F4F0;
    /* Off-white */
    --text-color: #333333;
    --light-text-color: #FFFFFF;
    --header-height: 140px;
    /* Combined height for fixed header */
    --font-heading: 'Lora', serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: #c5a135;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.btn-secondary:hover {
    background-color: #660000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--light-text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    border-bottom: 1px solid #eee;
}

.header-socials {
    display: flex;
    gap: 10px;
}

.header-socials .social-icon {
    color: var(--text-color);
    margin: 0 8px;
    font-size: 1.2rem;
    transition: color 0.3s ease;

}

.header-socials .social-icon:hover {
    color: var(--secondary-color);
}

.header-logo a {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

.header-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 5px;
}

.nav-main {
    display: flex;
    justify-content: center;
    background-color: var(--primary-color);
}

.nav-list {
    display: flex;
}

.nav-list li a {
    display: block;
    padding: 15px 20px;
    color: var(--light-text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.nav-list li a:hover,
.nav-list li:hover>a {
    background-color: #660000;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--primary-color);
    min-width: 220px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

@media (min-width: 993px) {
    .dropdown:hover>.dropdown-menu {
        display: block;
    }
}

.dropdown-menu li a {
    padding: 12px 20px;
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
}


/* ==================== BODY & SECTIONS ==================== */
body {
    padding-top: var(--header-height);
}

.content-section {
    padding: 60px 0;
}

.hero-section {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/alter.webp') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--light-text-color);
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
}

.fade-in {
    animation: fadeIn 1.5s ease-in-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1.5s 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-give-section {
    display: none;
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
    margin-top: 2rem;
}

.schedule-list h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.schedule-list ul li {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.gallery-section {
    padding: 60px 0;
    background-color: #fff;
}

.slider {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: clamp(260px, 45vw, 520px);
    /* responsive height */
    margin: 1rem auto 0;
    overflow: hidden;

}

.slide {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide .gallery-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Anchor and image both fill the slide */
.slide .gallery-card a,
.slide .gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
}

.slide .gallery-card img {
    object-fit: cover;
    /* crop nicely */
    transition: transform 0.4s ease;
    position: relative;
    z-index: 0;
}

.slide .gallery-card:hover img {
    transform: scale(1.05);
}

.slide .overlay {
    position: absolute;
    top: 0;
    /* stick to the top */
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.0));
    color: #fff;
    z-index: 1;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

/* Show on hover (desktop) */
.slide .gallery-card:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Overlay text: clamp to avoid huge descriptions covering everything */
.slide .overlay-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* show up to 3 lines by default */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* On hover, allow full caption (optional; comment this out if you prefer clamped always) */
.slide .gallery-card:hover .overlay-text {
    -webkit-line-clamp: unset;
    max-height: none;
}

@media (hover: none) and (pointer: coarse) {
    .slide .overlay {
        opacity: 1;
        transform: none;
    }
}

/* Always show overlay */
.slide .overlay {
    opacity: 1;
    transform: none;
}

.slide .gallery-card:hover .overlay {
    opacity: 1;
    transform: none;
}


.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pray-section {
    background: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
}

.pray-section h2 {
    color: var(--light-text-color);
}

.pray-section .btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    margin: 10px;
}

.pray-section .btn-secondary:hover {
    background-color: #f0f0f0;
}

.pastor-section {
    background-color: #fff;
}

.pastor-flex {
    display: flex;
    align-items: center;
    gap: 40px;
}

.pastor-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
}

.pastor-text span {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    font-style: italic;
}

.mission-section {
    text-align: center;
}

.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* ADD THIS TO YOUR INDEX.CSS FILE */

.reflection-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* space between articles */
}

.reflection-item {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    line-height: 1.7;
    font-family: Georgia, "Times New Roman", serif;
}

.reflection-item header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #800000;
    /* maroon (church tone) */
}

.reflection-item .meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.reflection-content p {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 1.2rem;
    text-align: justify;
    /* gives article feel */
}

.reflection-footer {
    font-size: 0.9rem;
    color: #555;
    text-align: right;
    font-style: italic;
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
}

/* ===== News & Events ===== */
.news-events-section {
    padding: 3rem 0;
    background: #f8f8f8;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #800000;
    margin-bottom: 2rem;
}

/* Grid layout for professional look */
.news-events-section {
    padding: 40px 20px;
    background: #f9f9f9;
}

.news-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-card-body {
    padding: 15px;
}

.news-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #800000;
    /* Maroon */
}

.news-card-content {
    font-size: 14px;
    color: #444;
}

.news-card-footer {
    padding: 10px 15px;
    font-size: 12px;
    background: #f1f1f1;
    text-align: right;
    color: #666;
}


.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #800000;
}

.bulletin-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.bulletin-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.bulletin-item:hover {
    transform: translateY(-5px);
}

.bulletin-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bulletin-details {
    text-align: center;
}

.bulletin-details h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.meta-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.bulletin-actions .btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.bulletinbtn {
    background: #800000;
    color: #fff;
    transition: background 0.3s;
}

.bulletinbtn:hover {
    background: #a52a2a;
}

.bts {
    background: #ccc;
    color: #555;
}

.gallery-section {
    padding: 60px 20px;
    background: #f8f8f8;
    text-align: center;
}

.gallery-section .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #800000;
    /* Maroon */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    border-radius: 6px;
    margin: 0 auto;
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.caption {
    padding: 10px;
    background: #fafafa;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #444;

}

/* Leaders Section */
.leaders-section {
    background-color: var(--background-color);
    padding: 60px 20px;
}

.leaders-flex {
    display: flex;
    flex-direction: column;
    /* stack on mobile */
    gap: 40px;
}

.leader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-5px);
}

.leader-image {
    width: 100%;
    max-width: 280px;
    /* keep consistency */
    height: 360px;
    /* fixed height for all leaders */
    overflow: hidden;
    /* crop anything outside */
    border-radius: 12px;
    margin: 0 auto 15px auto;
}

.leader-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fill the box while keeping proportion */
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leader-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}


.leader-text h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.leader-text p {
    color: var(--text-color);
    font-size: 0.95rem;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px;
    text-align: center;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s ease;
}

.gallery-card:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-text {
    font-size: 1rem;
    font-weight: bold;
}

/* Responsive: side by side on larger screens */
@media (min-width: 768px) {
    .leaders-flex {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .leader-card {
        max-width: 300px;
    }
}


/* ==================== ANNOUNCEMENT BAR ==================== */
.announcement-bar {
    background-color: var(--secondary-color);
    /* Gold background */
    color: var(--text-color);
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    /* Prevents text from wrapping */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.announcement-content {
    display: inline-block;
    /* This starts the animation off-screen */
    padding-left: 100%;
    animation: scroll-left 60s linear infinite;
}

.announcement-content span {
    font-size: 1rem;
    margin-right: 20px;
}

/* The animation that scrolls the text from right to left */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}


/* ==================== FIXED BUTTON ==================== */
.btn-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    border: none;
    cursor: pointer;
    z-index: 998;
    transition: all 0.3s ease;
}

.btn-fixed:hover {
    transform: scale(1.05);
    background-color: #660000;
}

/* ==================== MODAL STYLES ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    animation: slideDown 0.5s ease-out;
}

.modal-content.modal-large {
    max-width: 90%;
    /* Prevent modals from being too wide */
    width: auto;
    overflow-x: hidden;
}

.modal-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    /* Horizontal scroll if needed */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
}

.modal form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.modal textarea {
    resize: vertical;
    min-height: 100px;
}

.modal form button {
    align-self: flex-start;
}

#donationLink {
    font-weight: bold;
    text-decoration: underline;
}

.mass-times-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 1.5rem;
}

.map-container,
.info-container {
    text-align: left;
}

.map-container iframe {
    border-radius: 5px;
}

.map-container .btn {
    margin-top: 15px;
}

.info-container h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.info-container p {
    margin-bottom: 0.5rem;
}

.info-container .btn {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

/* ==================== SCHEDULE TABLE STYLES ==================== */
.schedule-table {
    width: 100%;
    margin-top: 1.5rem;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.schedule-table th {
    padding: 12px 15px;
    font-weight: 600;
}

.schedule-table td,
.schedule-table th {
    word-wrap: break-word;
    white-space: normal;
    /* Allow wrapping */
    padding: 8px;
}

.schedule-table tbody tr {
    border-bottom: 2px solid var(--primary-color);
    /* Maroon dividing line */
}

.schedule-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.schedule-table tbody tr:last-child {
    border-bottom: none;
}

/* ==================== NEW PAGE STYLES ==================== */
.page-hero-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    text-align: center;
    color: var(--light-text-color);
}

.page-hero-section h1 {
    color: var(--light-text-color);
    font-size: 3rem;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.leader-card {
    background: #fff;
    padding: 25px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.leader-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    margin-bottom: 1rem;
}

.leader-card h3 {
    margin-bottom: 0.5rem;
}

.leader-card p {
    color: #555;
    font-weight: 600;
}

/* ==================== DONATION MODAL STYLES ==================== */
.donation-grid {
    display: grid;
    /* This automatically fits as many boxes as possible per row */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.donation-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 5px solid var(--primary-color);
}

.donation-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.donation-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.donation-box .account-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* ==================== FIXED BUTTONS CONTAINER ==================== */
.fixed-buttons-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Adjust original fixed button to remove positioning */
.btn-fixed {
    position: static;
}

/* ==================== MULTI-STEP FORM STYLES ==================== */
.multi-step-form .form-step {
    display: none;
}

.multi-step-form .form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.multi-step-form .form-navigation {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.checkbox-group {
    display: block;
    /* Change from grid to block */
    margin-top: 0.5rem;
    text-align: left;
    border-top: 1px solid #eee;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 5px;
    border-bottom: 1px solid #eee;
    /* Add dividing line */
}

.child-entry {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    position: relative;
}

.child-entry h5 {
    margin-bottom: 10px;
}

.child-entry .remove-child-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4d;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.header-donate-btn {
    display: none;

}

.mobile {
    display: none !important;
}

.nav-list .submenu {
    display: none;
    position: absolute;
    background: var(--light-text-color);
    min-width: 200px;
    z-index: 999;
}

@media (min-width: 993px) {
    .nav-list .dropdown:hover>.submenu {
        display: block;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    .header-top {
        padding: 0 20px;
        height: var(--header-height);
    }

    .header-logo span,
    .header-socials,
    .header-give-btn {
        display: none;
        /* Hide top bar elements */
    }

    .header-donate-btn {
        display: block;
        /* Show it again in mobile */
        width: 90%;
        /* Full-width style */
        margin: 20px auto;
        /* Center it */
        text-align: center;
        order: 2;

    }

    .header-logo a {
        flex-direction: row;
        gap: 10px;
    }

    .header-logo img {
        height: 40px;
    }

    .nav-main {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        /* Start off-screen */
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        transition: left 0.4s ease-in-out;
        overflow-y: auto;
        /* allow vertical scrolling */
        -webkit-overflow-scrolling: touch;
        /* smooth scroll on iOS */
    }

    .nav-main.active {
        left: 0;
        /* Slide in */
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-list li a {
        padding: 15px 25px;
        border-bottom: 1px solid #a04040;
    }

    .nav-list .dropdown:hover>.submenu {
        display: none !important;
    }

    /* Default: hide submenu */
    .nav-list .submenu {
        display: none;
        position: static;
        /* override absolute so it stacks nicely */

    }

    /* Show only if .open is active */
    .nav-list .dropdown.open>.submenu {
        display: block !important;
    }

    .dropdown-menu {
        display: none;
        /* hide by default on mobile */
        position: static;
        background-color: #660000;
        box-shadow: none;
        padding-left: 20px;
    }

    .dropdown.open>.dropdown-menu {
        /* show when .open */
        display: block;
    }

    /* optional: rotate the chevron when open */
    .dropdown>a .fa-chevron-down {
        transition: transform .2s ease;
    }

    .dropdown.open>a .fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown>a i {
        float: right;
    }

    .mobile-menu-btn {
        display: block !important;
        /* force it */
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 2001;
        /* make sure it's above other elements */
    }

    .mobile-give-section {
        display: block;
    }

    .schedule-grid,
    .mass-times-grid {
        grid-template-columns: 1fr;
    }

    .pastor-flex {
        flex-direction: column;
        text-align: center;
    }

    .page-hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .modal-content {
        margin: 20% auto;
        width: 90%;
    }
}

/* This makes the grid stack into a single column on smaller screens */
@media (max-width: 768px) {
    .donation-grid {
        grid-template-columns: 1fr;
    }

    .modal-content.modal-large {
        max-height: 85vh;
        /* Prevent modal from going off-screen */
        overflow-y: auto;
        /* Scroll vertically if too tall */
    }

    .schedule-table {
        font-size: 0.9rem;
    }

    .schedule-table th,
    .schedule-table td {
        white-space: nowrap;
        /* Keep table compact, scroll instead of wrapping */
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile {
        display: flex !important;
        /* force display */
        justify-content: center;
        width: 100%;
        margin-top: 5px;
    }

    .header-socials .social-icon {
        font-size: 1.5rem;
        /* slightly bigger for touch screens */
    }
}