@import url('theme.css');


/* ============================================================
   Public foundation and site chrome
   Source: public-base.css
   ============================================================ */

/* =====================================================================
   PUBLIC BASE — global site chrome shared by every public page.
   Owns: reset, nav, hero, announcement ticker, main/section layout,
   worship/ministry times grid, footer, events, modal shell.
   Split from the original style.css (see public-components.css for the
   second half: content pages, forms, cards, and page-specific rules).
   Load order: public-base.css -> public-components.css -> (page CSS).
   ===================================================================== */

/********** Global Styles **********/
/********** Body **********/

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    scroll-behavior: smooth;
    min-height: 100vh; /* Ensure html takes at least full viewport height */
    height: 100%; /* Ensure html stretches */
}

body {
    background-image: url('ConImg/Church.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: 100px; /* Adjusted to prevent content overlap by 100px fixed navbar */
    min-height: calc(100% - 100px); /* Ensure body content area can fill remaining space */
    box-sizing: border-box; /* Include padding in height calculation */
    overflow-x: hidden; /* Prevent horizontal scroll from nav/tab overflow */
}

/* Accessibility utility: visually hidden but still available to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/********** Top Navigation Bar Styling **********/

.top-nav {
    background-color: rgba(0, 0, 0, 0.3);
    height: 100px;
    padding: 0 10px; /* Handles margins for logo and button */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensures logo and menu button are spaced out */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in width/height */
    z-index: 1000; /* Keeps navbar on top */
}

.nav-logo {
    height: 100px; /* Adjust as needed to fit well */
    width: auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.devicon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    text-decoration: none;
    flex: 0 0 auto;
}

.devicon-btn:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.35);
}

.devicon-btn__text {
    font-weight: 800;
    font-size: 0.95em;
    line-height: 1;
}

/********** Menu Button Styling **********/

.menu-button {
    background-color: transparent;
    border: 2px solid black; /* Added border */
    padding: 5px; /* Added padding for space around lines */
    cursor: pointer;
    display: flex; /* Changed from none to flex to make it visible by default */
    flex-direction: column;
    justify-content: space-between;
    height: 45px; /* Adjusted for 4 lines (2px each) and 3 spaces (2px each) = 14px, with some extra for visual balance */
    width: 40px; 
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}

.menu-button span {
    display: block;
    width: 100%; 
    height: 4px; 
    background-color: #c46123; 
}

/********* Navigation Links Styling *********/

.nav-links {
    display: none; /* Hidden by default, shown when .active */
    flex-direction: column;
    width: min(340px, calc(100vw - 20px)); /* Responsive dropdown width */
    background-color: rgba(0, 0, 0, 0.85);
    position: absolute;
    top: 70px; /* Position below the nav bar (give the menu more room) */
    left: auto; /* Remove left alignment */
    right: 10px; /* Keep some breathing room on small screens */
    padding-bottom: 6px;
    z-index: 999; 
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    border-radius: 5px; /* Added rounded corners */
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.nav-links.active {
    display: flex; /* Show when active (toggled by JS) */
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 4px; /* Tighter so menu fits without internal scroll */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* Centered text for dropdown items */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator for dropdown items */
    font-size: 1.05em;
    white-space: normal; /* Allow full labels to wrap */
    overflow-wrap: anywhere;
    word-break: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Remove the public-site Login tab (admin is not a public nav destination). */
.nav-links a[href="admin/"],
.nav-links a[href="/admin/"],
.nav-links a[href="../admin/"],
.nav-links a[href$="/admin/"] {
    display: none !important;
}

.nav-links a:last-child {
    border-bottom: none; /* No border for the last item */
}

.nav-links a:hover {
    background-color: rgb(196, 97, 35);
    border-radius: 0; /* Override previous border-radius if any, or keep if desired */
}

.nav-item-group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-parent-toggle {
    appearance: none;
    border: none;
    margin: 0;
    color: white;
    background: transparent;
    text-decoration: none;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
}

.nav-parent-toggle:hover {
    background-color: rgb(196, 97, 35);
}

.nav-parent-caret {
    font-size: 0.8em;
    line-height: 1;
}

.nav-submenu {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
}

.nav-item-group.is-open .nav-submenu {
    display: flex;
}

.nav-submenu a {
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1em;
    font-weight: 700;
}

.nav-submenu a:last-child {
    border-bottom: none;
}

/* Photo gallery: center the dropdown menu and bump nav text slightly (local request). */
@media (max-width: 1399px) {
    .page-photo-gallery .nav-links {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .page-photo-gallery .nav-links a {
        font-size: 1.15em;
    }
}

/* Desktop navigation: show links as horizontal tabs with centered, stacked text */
@media (min-width: 1400px) {
    .top-nav {
        /* Use a 2-column grid so the logo stays left and the tab bar starts after it */
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr 56px; /* bottom row is the "piano key" tab bar */
        align-items: center;
        column-gap: 24px;
        overflow: visible;
    }

    .nav-left {
        justify-self: start;
        grid-column: 1;
        grid-row: 1 / span 2;
        margin-left: 0;
    }

    .menu-button {
        display: none;
    }

    .nav-links {
        /* Piano-key tab bar along the bottom, starting AFTER the logo */
        grid-column: 2;
        grid-row: 2;

        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: center;

        position: static;
        width: 100%;
        height: 56px;
        padding: 0 12px;
        background-color: transparent;
        border-top: none;
        border-radius: 0;
        box-sizing: border-box;
        min-width: 0; /* allow the grid item to shrink instead of forcing overflow */
        overflow-x: visible;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 4px;
        transform: translateY(-2px);
    }

    .nav-links > * + * {
        margin-left: 2px;
    }

    .nav-links a {
        /* Each link behaves like a "key" */
        flex: 1 1 0;
        min-width: 0;
        height: 100%;
        padding: 2px; /* 2px padding around text */

        display: flex;
        align-items: center;
        justify-content: center;

        background-color: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-bottom: none;
        border-radius: 10px 10px 0 0;

        text-align: center;
        white-space: normal; /* allow multi-line */
        overflow: hidden;
        text-overflow: clip;
        line-height: 1.05;
        font-size: 1.02em;
        font-weight: 700;
    }

    .nav-item-group {
        position: relative;
        flex: 1 1 0;
        border-bottom: none;
        min-width: 0;
    }

    .nav-parent-toggle {
        width: 100%;
        height: 100%;
        min-width: 0;
        line-height: 1.05;
        font-size: 1.02em;
        padding: 2px;
        background-color: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-bottom: none;
        border-radius: 10px 10px 0 0;
    }

    .nav-parent-toggle:hover {
        background-color: rgba(196, 97, 35, 0.9);
        border-color: rgba(255, 255, 255, 0.22);
    }

    .nav-submenu {
        position: absolute;
        left: 50%;
        top: calc(100% + 2px);
        transform: translateX(-50%);
        min-width: 260px;
        width: max-content;
        max-width: min(360px, 96vw);
        background-color: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
        z-index: 1200;
        padding: 4px 0;
    }

    .nav-item-group:hover .nav-submenu,
    .nav-item-group:focus-within .nav-submenu,
    .nav-item-group.is-open .nav-submenu {
        display: flex;
    }

    .nav-submenu a {
        height: auto;
        padding: 11px 14px;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 0;
        background: transparent;
    }

    .nav-submenu a:last-child {
        border-bottom: none;
    }

    .nav-links a + a {
        margin-left: 0;
    }

    /* Keep labels centered vertically. Avoid overriding display:flex with -webkit-box here. */

    .nav-links a + a {
        margin-left: 2px; /* small gap between keys */
    }

    .nav-links a:hover {
        background-color: rgba(196, 97, 35, 0.9);
        border-color: rgba(255, 255, 255, 0.22);
        border-radius: 10px 10px 0 0;
    }
}

/********** Hero Section **********/

.hero-section {
    /* Use min-height (not fixed height) so large hero text/buttons never overflow
       into the next section on shorter landscape viewports (e.g., Surface Pro). */
    min-height: 75vh;
    height: auto;
    padding: 40px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0); /* Dark overlay for better text readability */
}

/* Match hero content width to the rest of the page (same as main) so the
   announcement ticker lines up with the site containers. */
.hero-content {
    width: 90%;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content h1 {
    font-size: 6em;
    margin-bottom: 0px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.75);
}

/* Accessibility: honor reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Keep the schedule manager file input hidden without inline styles */
#schedule-file-input-modal {
    display: none;
}

/* Hero title styling */
.hero-content h1 .hero-line {
    display: block;
    margin-bottom: 0.5em; /* Space between lines */
    white-space: nowrap; /* Ensures content of each line stays on a single line */
}

.hero-content h1 .hero-line:last-child {
    margin-bottom: 50px;
}

.hero-content .hero-subtitle {
    font-size: 0.6em; /* Roughly 2 sizes smaller than 1em, adjust as needed */
}

/********** Contact Button Styling **********/

.btn-contact {
    display: inline-block;
    padding: 7px 15px;
    background-color: #c46123; /* A welcoming purple, can be changed */
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    border-radius: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Added transform to transition */
}

/* Utility modifier: adds top spacing when a button is used inline in text */
.btn-contact.btn-contact--spaced {
    margin-top: 10px;
}

.btn-contact:hover {
    background-color: #c46123; /* Darker shade on hover */
    transform: scale(1.25); /* Increase size by 25% */
}

/* Touch/pen devices can end up in a "stuck" hover-like state; avoid scaling that
   can visually overlap nearby content on those devices. */
@media (hover: none) {
    .btn-contact:hover {
        transform: none;
    }
}

.btn-contact:active {
    color: black; /* Black text on click */
}

/********** Home Announcement Ticker **********/

.announcement-ticker-wrap {
    /* Match the site's main content width/margins */
    width: 100%;
    max-width: none;
    margin: 25px auto; /* 25px space above/below between button and first container */
    padding: 0;
    box-sizing: border-box;
}

.announcement-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    /* Taller banner (roughly double previous height) */
    padding: 20px 16px;
    min-height: 70px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.announcement-ticker:focus {
    outline: 3px solid rgba(196, 97, 35, 0.9);
    outline-offset: 3px;
}

.announcement-ticker__label {
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgb(196, 97, 35);
    text-transform: uppercase;
    font-size: 0.95em;
}


.announcement-ticker__viewport {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    /* line height determines the visible band */
    height: 1.35em;
}

.announcement-ticker__stack {
    display: block;
    will-change: transform;
    transform: translateY(0);
}

.announcement-ticker__line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* JS toggles this class to animate to the next line */
.announcement-ticker__stack.is-sliding {
    transition: transform 420ms ease;
    transform: translateY(-1.35em);
}

.announcement-ticker:hover .announcement-ticker__stack,
.announcement-ticker:focus .announcement-ticker__stack,
.announcement-ticker:focus-within .announcement-ticker__stack {
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .announcement-ticker__viewport { height: auto; }
    .announcement-ticker__line { white-space: normal; }
    .announcement-ticker__stack,
    .announcement-ticker__stack.is-sliding {
        transition: none;
        transform: none;
    }
}

/********** Main Content Area **********/

main {  /***** Center area behind containers *****/
    background-color: rgba(0, 0, 0, 0); 
    padding-top: 75px;
    margin-left: auto; /* Center main content */
    margin-right: auto; /* Center main content */
    max-width: 1350px; /* Set a max-width for main content area */
    width: 90%; /* Allow it to be responsive */
}

/********** Section Styling **********/

section {
    padding: 5px;
    text-align: center;
    margin-bottom: 50px; 
    border-radius: 15px; 
    background-color: #000;
    /* Removed fixed height, section will now size to content */
}

section:last-of-type {
    border-bottom: none;
}

section h2 {    /*Section Names*/
    font-size: 3em;
    margin-bottom: 5px;
    color: #ffffff;
}

/* Home page: orange section label headings */
.home section h2 {
    color: rgb(196, 97, 35);
}

/* Home page: orange labels inside the Times section */
.home #times .worship-day {
    color: rgb(196, 97, 35);
}

/* Home page: keep actual time values white */
.home #times .time-slot {
    color: #ffffff;
}

/* Home page: Upcoming Events label in orange */
.home #events > h2 {
    color: rgb(196, 97, 35);
}

/* ======================================================================
   Combined Times container (Worship left, Ministries right)
   ====================================================================== */

#times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

#times .times-column {
    background-color: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
}

#times .times-column > h2 {
    margin-top: 0;
    color: rgb(196, 97, 35);
}

/* Reduce event block padding inside the combined Times container */
#times .service-block {
    padding: 4px;
}

section div {   /*Days Container*/
    background-color: rgba(0, 0, 0, 0); /* Simplified from #c4238100 */
    margin: 0;
    padding: 5px 5px 5px 5px;
    border-radius: 15px;
    max-width: 1350px; /* Match main content width */
}

section div p {
    font-size: 1.1em;
    line-height: 1.6;
}

/********** Worship Times Styling **********/

.worship-day {
    text-align: center;
    font-size: 2em; /* Made Sunday a bit larger */
    margin-bottom: 0px;
    font-weight: bold; /* Make day names bold */
}

.service-times-row {
    display: flex;
    justify-content: space-around; /* Evenly space the time slots -> Changed to center */
    align-items: flex-start; /* Align time slots to the top of this container */
    margin-top: 0px; /* Space below "Sunday" */
    gap: 5.25rem; /* Ensures a minimum space between time slots */
}

.time-slot {    /*Individual times*/
    font-size: 1.3em; /* Style for the times */
    color: #ffffff;
    margin: 0 0 5px; /* Provides space around each time, allowing more to be added */
    padding: 2px 5px;
    background-color: #c4612380;
    border-radius: 5px;
    border: 1px solid #bd5f25;
}

/********** Day Container Styling **********/

.days-container {
    display: flex;
    justify-content: space-around; 
    align-items: stretch; /* Makes all .day items in a row the same height */
    gap: 20px; 
    flex-wrap: wrap; /* Allows items to wrap */
}

.day {
    padding: 0px 10px 0px 10px; 
    background-color: rgba(0, 0, 0, 0); 
    border-radius: 15px;
    flex: 1; /* Allows day blocks to grow and shrink equally to fill space */
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center; 
    justify-content: flex-start; /* ADDED: Aligns items to the top of the .day container */
}

/* ======================================================================
   Schedule layout (Worship Times + Weekly Ministry Times)
   Days down the left, events on the right
   ====================================================================== */

#worship-times .days-container,
#ministries .days-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

#worship-times .day,
#ministries .day {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px 14px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(196, 97, 35, 0.35);
}

#worship-times .day-label,
#ministries .day-label {
    display: flex;
    align-items: center;
    justify-content: center;
}

#worship-times .day-label .worship-day,
#ministries .day-label .worship-day {
    text-align: center;
    margin: 2px 0 0;
    font-size: 1.8em;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.65);
}

#worship-times .day-events,
#ministries .day-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* Generic time + event row */
.simple-event-row,
#worship-times .sunday-event-group,
#ministries .thursday-event-group {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
}

.simple-event-row .time-slot,
#worship-times .sunday-event-group .time-slot,
#ministries .thursday-event-group .time-slot {
    margin: 0;
    justify-self: center;
}

/* When an event has multiple blocks (e.g., Wednesday ministries, Thursday 6pm) */
.event-service-blocks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.event-service-blocks-row .service-block {
    flex: 1;
    min-width: 240px;
}

/* Tablet-ish widths (e.g., Surface Pro): stack multi-block rows to avoid overflow */
@media (max-width: 1400px) and (min-width: 981px) {
    #times .event-service-blocks-row {
        flex-direction: column;
    }

    #times .event-service-blocks-row .service-block {
        min-width: 0;
        width: 100%;
    }
}

/* Stack Day → Time → Events earlier to prevent overflow while resizing */
@media (max-width: 980px) {
    #worship-times .day,
    #ministries .day {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: start;
    }

    #worship-times .day-label,
    #ministries .day-label {
        justify-content: center;
    }

    .simple-event-row,
    #worship-times .sunday-event-group,
    #ministries .thursday-event-group {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: start;
        min-width: 0;
    }

    .simple-event-row .time-slot,
    #worship-times .sunday-event-group .time-slot,
    #ministries .thursday-event-group .time-slot {
        justify-self: center;
        width: fit-content;
    }

    .event-service-blocks-row {
        flex-direction: column;
    }

    .event-service-blocks-row .service-block {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #times {
        grid-template-columns: 1fr;
    }

    #worship-times .day,
    #ministries .day {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .simple-event-row,
    #worship-times .sunday-event-group,
    #ministries .thursday-event-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .event-service-blocks-row .service-block {
        min-width: 0;
    }
}

/* New styles for Sunday service blocks */
.sunday-services .service-block {
    display: flex;
    flex-direction: column; /* Stack time and details vertically by default */
    align-items: center; /* Center items within the block */
    width: 100%; /* Ensure blocks take full width of their container */
    margin-bottom: 15px; /* Space between service blocks */
}

.sunday-services .service-block:last-child {
    margin-bottom: 0;
}

.sunday-services .service-details p {
    margin: 2px 0; /* Adjust spacing around service detail text */
    text-align: center; /* Center text within Sunday service details paragraphs on mobile */
}

/********** Styling for side-by-side divs A and B **********/

.side-by-side-divs {
    display: flex;
    justify-content: space-around; /* Or space-between, or center, depending on desired spacing -> Changed to center */
    margin-top: 0px; /* Add some space above these divs */
    padding: 0; /* ADDED to negate padding from 'section div' */
}

.side-by-side-divs > div { /* Style for direct children (divA and divB) */
    flex-basis: 45%; /* Example: each div takes up slightly less than half, allowing for some space between */
    /* padding: 0px 0px 0px 10px; */
    background-color: #c4612380; /* Light grey background for distinction */
    border: 1px solid #bd5f25;
    border-radius: 5px;
}

/* Added rule for when a .side-by-side-divs container has only one child div */
.side-by-side-divs > div:only-child {
    box-sizing: border-box; /* Ensures padding and border are included in the width */
    flex-basis: auto;       /* Override the 45% basis */
    width: calc(100% - 30px); /* Makes the element 15px narrower on each side than its parent .side-by-side-divs. With 15px margins, this results in 25px from .day's border (10px .day padding + 15px item margin). */
    margin-left: 15px;      /* Adjusted from 10px to 15px */
    margin-right: 15px;     /* Adjusted from 10px to 15px */
}

/********** Pastor Section Styling **********/

.pastor-container {
    position: relative; 
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.025); /* User's preference */
    overflow: hidden; /* Changed from auto to hidden to remove scrollbar */
    margin: 0; 
    max-width: none; 
    box-shadow: none; 
}

.pastor-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    float: none;
    border-radius: 15px;
}

/********** FAQ Section Styling **********/

.faq-section-wrapper {
    display: flex;
    justify-content: space-between; /* Adjust as needed: space-around, center, etc. */
    align-items: center; /* Align items to the top */
    gap: 200px; /* Space between FAQ list and image container */
}

.faq-container {
    flex: 1; /* FAQ container takes more space */
    max-width: 50%; /* Adjust as needed */
    margin-left: 100px; /* Centering is now handled by flex wrapper */
    text-align: center;
}

.faq-image-stack-container {
    flex: 2; /* Image container takes less space */
    display: flex;
    flex-direction: column; /* Default: stack vertically */
    align-items: center; /* Center images horizontally within this container */
    justify-content: space-around; /* Center stack vertically if container is taller */
    gap: 10px; /* Space between the two images */
    min-width: 200px; /* Minimum width, adjust as needed */
    max-width: 100%; /* Adjust as needed */
    padding-top: 0px; /* Add some padding to visually center/adjust if needed */
    padding-bottom: 0px; /* Add some padding */
}

/* ======================================================================
   Homepage FAQ collage (main image + overlapping thumbnail)
   ====================================================================== */

.faq-image-collage {
    position: relative;
    display: block;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 10px;
    padding-bottom: 120px; /* space for the overlapping thumbnail */
    overflow: visible;
.contact-form--spaced {
    margin-top: 18px;
}
.footer-subscribe-form {
    display: grid;
    gap: 8px;
}
.footer-subscribe-form .input {
    width: 100%;
}
.btn-contact--spaced {
    margin-top: 6px;
}
.muted {
    color: #4f4f4f;
    font-size: 0.9rem;
}
}

.faq-image-collage .faq-collage-main {
    width: 100%;
    max-width: 980px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.faq-image-collage .faq-collage-thumb {
    position: absolute;
    left: 15%;
    bottom: 46px; /* anchors to the bottom edge, slightly overlapping */
    transform: translateX(-50%);
    width: min(64%, 520px); /* a little bigger than before */
    height: auto;
    border-radius: 14px;
    border: 6px solid #ffffff;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

@media (max-width: 820px) {
    .faq-image-collage {
        padding-bottom: 100px;
    }

    .faq-image-collage .faq-collage-thumb {
        width: min(64%, 520px);
        bottom: 46px;
    }
}

@media (max-width: 600px) {
    .faq-image-collage {
        padding-bottom: 10px;
    }

    .faq-image-collage .faq-collage-thumb {
        position: static;
        transform: none;
        width: min(92%, 520px);
        margin: 14px auto 0;
        border-width: 4px;
    }
}

.stacked-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    padding-left: 0;
    display: block;
    margin: 0 auto;
   /* box-shadow: 0 1px 3px rgba(0,0,0,0.3); */
}

.faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #c46123;
}

.faq-question {
    padding: 16px;
    margin: 0;
    cursor: pointer;
    font-size: 1.2em;
    color: #ffffff;
    background-color: rgba(196, 97, 35, 0.5); /* Semi-transparent accent color */
    border-radius: 10px 10px 10px 10px; /* Round top corners if answer is hidden initially */
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(196, 97, 35, 0.7);
}

.faq-answer {
    padding: 0 4px; /* Add padding only to sides initially */
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out; /* Smooth transition for height and padding */
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 10px 10px; /* Round bottom corners */
}

.faq-answer p {
    padding: 15px 0; /* Add vertical padding when answer is shown */
    margin: 0;
    color: #f0f0f0; /* Lighter text for answer */
    font-size: 1em;
    line-height: 1.6;
}

/***** Style for when the FAQ item is active/open *****/

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust as needed to fit content */
    padding: 0 15px; /* Ensure side padding is maintained */
}

.faq-item.active .faq-question {
    background-color: #c46123cc;
    border-radius: 10px 10px 10px 10px;
}

/********** Footer Styles **********/

footer {
    background-color: #121212;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 20px;
    text-align: center; /* Removed, alignment handled by flex children */
}

.footer-top-row {   /* Top row with logo and text */
    display: flex;
    flex-direction: row; /* Arrange logo and text side-by-side */
    justify-content: center; /* Center the logo-text pair */
    align-items: center; /* Vertically align logo and text block */
    gap: 20px; /* Gap between logo and text block */
    width: 100%;
}

.footer-logo {
    height: 100px;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.footer-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align text to the start (left) of its container */
    text-align: left; /* Align text to the left within its block */
    max-width: none;
    flex: 1;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-around; /* Distribute link sections */
    width: 100%;
    max-width: 1350px; /* Match main content width */
    gap: 20px; /* Space between link sections */
    padding-top: 20px;
}

.footer-links-section {
    background-color: #ffffff0d; /* Transparent div background */
    padding: 10px; /* Reduced padding */
    border-radius: 8px;
    text-align: center; /* Changed from left to center for h4 */
    flex: 1; /* Make sections equal width */
    display: flex; /* Enable flex for vertical alignment of children */
    flex-direction: column; /* Stack h4 and ul vertically */
}

.footer-links-section h4 {
    margin-top: 0;
    margin-bottom: 8px; /* Reduced margin */
    color: #c46123;
    border-bottom: 1px solid #c46123;
    padding-bottom: 4px; /* Reduced padding */
    font-size: 1.1em; /* Slightly adjust font size if needed */
}

.footer-links-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    flex-grow: 1; /* Allow ul to grow and fill space */
    justify-content: center; /* Center items if not enough to space-around */
    gap: 4px; /* Added gap between li items */
}

.footer-links-section ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.85em; /* Slightly reduced font size */
    line-height: 1.6; /* Adjusted line height */
    display: flex; /* Changed to flex for icon and text alignment */
    align-items: center; /* Vertically align icon and text */
    padding: 1px 0; /* Reduced padding */
}

.footer-links-section ul li a .link-icon {
    margin-right: 5px; /* Restored original space */
    display: inline-block; /* Or inline-flex */
    width: 14px; /* Slightly reduced icon size */
    height: 14px; /* Slightly reduced icon size */
    vertical-align: left; /* Helps align image with text */
}

/* Comment related to YouTube icon spacing removed */

.footer-links-section ul li a .link-text {
    display: inline-block;
}

.footer-links-section ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copyright-row {
    text-align: center; /* Horizontally center the copyright text */
    padding: 10px 0;
    border-top: 1px solid #444; /* Optional: adds a separator line */
    margin-top: 20px; /* Optional: adds some space above the copyright line */
}

/* Desktop: align footer content to main/body margins */
@media (min-width: 1025px) {
    .footer-top-row,
    .footer-bottom-row,
    .footer-copyright-row {
        width: 90%;
        max-width: 1350px;
        margin-left: auto;
        margin-right: auto;
    }
}

.footer-copyright-row p {
    margin: 0; /* Remove default paragraph margins */
    font-size: 0.9em; /* Adjust font size as needed */
    color: #ccc; /* Lighter text color for the copyright */
}

/********** Events Section Styles **********/

#events {
    background-color: #000;
    padding: 10px 10px 10px 10px; /* Padding around the section */
    border-radius: 15px;
}

#events h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 20px;
}

#events .events-container {
    display: flex;
    gap: 10px;
    align-items: stretch; /* Ensures children are of equal height */
    width: 100%;
    max-width: none; /* Override global section div max-width */
    padding: 4px; /* Override global section div padding */
}

#events .event-image-container {
    flex: 1 1 0; /* Equal width columns; allow shrinking */
    min-width: 0; /* Prevent overflow from long content */
    display: flex; /* To allow image to fill height */
    flex-direction: column; /* Stack content vertically if any */
    /* Removed max-width to allow flex to control width */
    max-width: none; /* Override global section div max-width */
    padding: 0;
    border-radius: 15px;
    overflow: hidden; /* Clip image to match schedule panel shape */
}

/* Homepage: match the schedule panel height on desktop */
@media (min-width: 981px) {
    .home #events .event-image-container {
        height: 420px;
    }
}

#events .event-image {
    width: 100%;
    height: 100%; /* Makes the image take the full height of its container */
    object-fit: cover; /* Ensures the image covers the area, maintaining aspect ratio */
    border-radius: 0;
}

#schedule-display-area {
    flex: 1 1 0; /* Equal width columns; allow shrinking */
    min-width: 0; /* Prevent overflow from long content */
    display: flex; /* Added to allow its content to be flex-managed if needed */
    flex-direction: column; /* Align content within this area */
    max-width: none; /* Override global section div max-width */
    padding: 0;
}

/* Modal Styles */
.modal-hidden {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

.modal-content {
    background-color: #2c2c2c; /* Dark background for modal */
    color: #f1f1f1;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 25px;
    border: 1px solid #555;
    width: 60%; /* Could be more or less, depending on screen size */
    max-width: 700px; /* Max width */
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.close-modal-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-modal-button:hover,
.close-modal-button:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* ============================================================
   Public reusable components and forms
   Source: public-components.css
   ============================================================ */

/* =====================================================================
   PUBLIC COMPONENTS — content pages, forms, cards, and reusable widgets.
   Owns: content-section, rental gallery, contact/rental forms, contact
   cards, YouTube/live-praise components, leadership & ministry profile
   cards, service blocks, and the shared 1024px/768px responsive rules.
   Loads after public-base.css (see that file for global site chrome).
   ===================================================================== */

/* Content Pages Styling */
.content-section {
    padding: 5px;
    max-width: none;
    width: 100%;
    margin: 0 auto 50px;
    background-color: #000;
    border-radius: 15px;
    color: #ffffff; /* Updated for consistency with homepage sections */
}

.content-section h1, .content-section h2 {
    color: #c46123; /* Theme color for headers */
    border-bottom: 2px solid #c46123;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.content-section p, .content-section li {
    line-height: 1.6;
    margin-bottom: 10px;
}

.content-section ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.facility-availability-badge {
    display: inline-block;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #c46123;
    border: 1px solid #c46123;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0 0 16px;
}

.facility-heading-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 12px;
    margin-bottom: 12px;
}

.facility-heading-row h1 {
    grid-column: 2;
    justify-self: center;
    margin-bottom: 0;
}

.facility-booking-picker {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
}

.facility-booking-picker select {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #c46123;
    background-color: rgba(196, 97, 35, 0.2);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.facility-booking-picker select:focus-visible {
    outline: 2px solid rgba(196, 97, 35, 0.9);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .facility-heading-row {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }

    .facility-heading-row h1,
    .facility-booking-picker {
        grid-column: 1;
        justify-self: center;
    }
}


.content-subnav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.content-subnav a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #c46123;
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    background-color: rgba(196, 97, 35, 0.2);
}

.content-subnav a:hover {
    background-color: #c46123;
}

.content-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 10px 0 25px;
}

.content-image-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(196, 97, 35, 0.6);
}

.content-image-grid img.content-image-grid__hero {
    height: clamp(280px, 38vw, 520px);
}

/* =====================================================================
   Facility Rental: Image-first gallery
   ===================================================================== */

.rental-gallery {
    width: 100%;
    margin: 12px 0 22px;
}

.rental-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(196, 97, 35, 0.55);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55);
    transform: translateZ(0);
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.rental-gallery img:hover {
    transform: scale(1.02);
    filter: saturate(1.05) contrast(1.02);
    box-shadow: 0 14px 34px rgba(0,0,0,0.65);
}

.rental-gallery__hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    margin: 0 0 12px;
}

.rental-gallery__hero img:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: clamp(300px, 32vw, 520px);
}

.rental-gallery__hero img:nth-child(2),
.rental-gallery__hero img:nth-child(3) {
    min-height: clamp(144px, 16vw, 254px);
}

.rental-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.rental-gallery__grid img {
    aspect-ratio: 4 / 3;
}

@media (max-width: 820px) {
    .rental-gallery__hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .rental-gallery__hero img:nth-child(1) {
        grid-column: auto;
        grid-row: auto;
        min-height: clamp(240px, 52vw, 420px);
    }

    .rental-gallery__hero img:nth-child(2),
    .rental-gallery__hero img:nth-child(3) {
        min-height: clamp(180px, 42vw, 320px);
    }
}

.content-media-right {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    margin: 10px 0 15px;
}

/* Float-right image that allows surrounding text to flow down the photo */
.content-float-right {
    float: right;
    width: min(42%, 420px);
    max-width: 420px;
    height: auto;
    margin: 4px 0 10px 18px;
    border-radius: 15px;
    border: 2px solid rgba(196, 97, 35, 0.6);
    object-fit: cover;
}

.content-media-right > p {
    flex: 1 1 620px;
    margin: 0;
}

.content-media-right__image {
    flex: 0 1 420px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: 2px solid rgba(196, 97, 35, 0.6);
    object-fit: cover;
}

.content-figure {
    margin: 20px auto;
    max-width: 1350px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
}

/* Caption overlay (top-right) variant used on Church History */
.content-figure--caption-overlay {
    position: relative;
    max-width: 935px;
    display: block;
    margin: 18px auto;
}

.content-figure--caption-overlay .content-figure-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    border: 2px solid rgba(196, 97, 35, 0.6);
    object-fit: cover;
}

.content-figure--caption-overlay figcaption {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: min(62%, 520px);
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78em; /* subscript-like */
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.96);
    text-align: left;
}

.bulletin-frame-wrap {
    width: 100%;
    margin-top: 16px;
}

.bulletin-frame {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.bulletin-frame__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.bulletin-frame__title {
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
}

.bulletin-frame__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--mmmbc-accent, #c46123);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.bulletin-frame__open:hover {
    filter: brightness(1.05);
}

.bulletin-frame__body {
    padding: 12px;
}

.bulletin-frame__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.bulletin-frame__pdf {
    width: 100%;
    height: min(72vh, 680px);
    border: 0;
    border-radius: 12px;
    background: #fff;
}

.bulletin-frame__note {
    margin-top: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
    color: #fff;
}

.bulletin-frame__fallbackLink {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 520px) {
    .bulletin-frame__pdf {
        height: 60vh;
    }
}
.content-figure-image {
    flex: 1 1 720px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    justify-self: center;
    border: 2px solid rgba(196, 97, 35, 0.6);
}

.content-figure figcaption {
    flex: 0 1 420px;
    margin-top: 0;
    font-size: clamp(0.85em, 1.4vw, 0.95em);
    font-style: italic;
    line-height: 1.5;
    color: #ffffff;
    text-align: left;
}

@media (max-width: 768px) {
    .content-media-right {
        flex-direction: column;
        align-items: center;
    }

    .content-float-right {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 10px 0 12px;
        display: block;
    }

    .content-media-right > p {
        margin: 0;
    }

    .content-media-right__image {
        max-width: 100%;
    }

    .content-figure {
        flex-direction: column;
        align-items: center;
    }

    .content-figure figcaption {
        text-align: center;
    }

    .content-figure--caption-overlay figcaption {
        position: static;
        max-width: 100%;
        margin-top: 10px;
        font-size: 0.88em;
        text-align: left;
    }
}

.hidden {
    display: none;
}

/* =====================================================================
   Basic form styles (Contact + Facility Rental)
   ===================================================================== */

.contact-form {
    max-width: 900px;
    margin: 18px auto 0;
    text-align: left;
    padding: 14px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.contact-form > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
}

.contact-form label {
    font-weight: 700;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.96);
}

.contact-form input:not([type="checkbox"]):not([type="radio"]),
.contact-form textarea {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.35;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(196, 97, 35, 0.75);
    box-shadow: 0 0 0 3px rgba(196, 97, 35, 0.25);
}

.contact-form button.submit-btn {
    width: min(260px, 100%);
    display: block;
    margin: 10px auto 0;
}

.contact-form h2 {
    text-align: center;
    margin-top: 12px;
}

.form-note {
    max-width: 900px;
    margin: 10px auto;
    font-style: italic;
    opacity: 0.9;
}

/* =====================================================================
   Contact: Get In Touch cards
   ===================================================================== */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 12px 0 14px;
}

.contact-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.contact-card__icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.55));
}

.contact-card__body {
    min-width: 0;
}

.contact-card__label {
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff;
    margin-bottom: 4px;
}

.contact-card__value {
    color: #ffffff;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.contact-card__value a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Contact page: never show bullet markers in the main content area */
#contact-form-section ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* =====================================================================
   Contact: YouTube showcase
   ===================================================================== */

.youtube-live-placeholder {
    margin: 10px 0 16px;
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.25);
    text-align: center;
}

.youtube-live-placeholder__inner {
    max-width: 900px;
    margin: 0 auto;
}

.youtube-live-placeholder__title {
    font-size: clamp(1.05em, 2.1vw, 1.35em);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.youtube-live-placeholder__text {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.45;
    margin-bottom: 10px;
}

.youtube-live-placeholder__button,
.youtube-section__button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(196, 97, 35, 0.65);
    background: rgba(196, 97, 35, 0.22);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.platform-link-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.platform-icon {
    width: 1.05em;
    height: 1.05em;
    fill: currentColor;
    flex: 0 0 auto;
}

.live-player-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

button.youtube-live-placeholder__button {
    cursor: pointer;
}

.youtube-live-placeholder__button.secondary {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.youtube-live-placeholder__button.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.live-player-actions--spaced {
    margin-top: 10px;
}

.youtube-live-fallback {
    margin-top: 12px;
}

.live-player-note {
    margin: 10px 0 0;
}

.youtube-section__status--tight {
    margin-top: -6px;
}

.youtube-live-placeholder__button:hover,
.youtube-section__button:hover {
    background: rgba(196, 97, 35, 0.35);
}

.youtube-section {
    margin: 8px 0 18px;
}

.content-section .youtube-section__title {
    color: #c46123;
    border-bottom: 2px solid #c46123;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.youtube-card {
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(196, 97, 35, 0.35);
    background: rgba(0, 0, 0, 0.20);
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.youtube-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-section__cta {
    text-align: center;
    margin-top: 12px;
}

.youtube-section__status {
    margin: 6px 0 10px;
    font-size: 0.95rem;
    opacity: 0.85;
}

.youtube-card__link {
    display: block;
    padding: 10px 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-top: 1px solid rgba(196, 97, 35, 0.35);
    background: rgba(0, 0, 0, 0.22);
    text-align: center;
}

.youtube-card__link:hover {
    background: rgba(0, 0, 0, 0.32);
}

/* =====================================================================
   Facility Rental: Non-member hero (pricing + rules)
   ===================================================================== */

.rental-hero {
    width: 100%;
    max-width: none;
    margin: 12px 0 16px;
    padding: 18px 14px;
    text-align: left;
    border-radius: 14px;
    border: 1px solid rgba(196, 97, 35, 0.35);
    background: rgba(196, 97, 35, 0.10);
}

.rental-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.content-section .rental-hero__title,
.content-section .rental-hero__subtitle {
    color: #ffffff;
    border-bottom: none;
    padding-bottom: 0;
    margin: 0 0 10px;
}

.rental-hero__title {
    font-size: clamp(1.15em, 2.2vw, 1.55em);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.rental-hero__subtitle {
    font-size: clamp(1.0em, 1.8vw, 1.2em);
    margin-top: 14px;
}

.rental-hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    align-items: start;
}

.rental-hero__card {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
}

.rental-hero__rates {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rental-hero__rates li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.rental-hero__rates li:last-child {
    border-bottom: none;
}

.rental-hero__rates li span:last-child {
    font-weight: 700;
    white-space: nowrap;
}

.rental-hero__rules {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.rental-hero__rules p {
    margin: 0 0 10px;
    font-style: normal;
}

.rental-hero__bullets {
    margin: 6px 0 0;
    padding-left: 22px;
}

.rental-hero__bullets li {
    margin-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin: 10px 0 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field--right {
    align-items: flex-end;
}

.form-field--right > label {
    text-align: right;
}

.form-field--right > label.form-label--center {
    align-self: stretch;
    text-align: center;
}

.form-field--center {
    align-items: center;
}

.form-field--center .form-checklist {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

.form-field label {
    font-weight: 600;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    box-sizing: border-box;
}

/* Prevent checkbox/radio inputs from inheriting text-input sizing */
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    background: transparent;
}

.contact-form textarea {
    resize: vertical;
}

.form-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 14px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(0, 0, 0, 0.20);
}

/* Reduce whitespace inside option boxes */
.form-checklist--tight {
    gap: 5px 10px;
    padding: 8px 10px;
}

/* Shrink bordered option box to its content (still responsive) */
.form-checklist--fit {
    display: inline-grid;
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    justify-content: start;
    justify-items: start;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
}

/* For short option sets (e.g., Yes/No): keep items packed to the left */
.form-checklist--compact {
    grid-template-columns: repeat(auto-fit, minmax(90px, max-content));
    justify-content: start;
    justify-items: start;
}

.form-check {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 500;
    text-align: left;
}

.form-checklist--tight .form-check {
    gap: 4px;
}

/* Extra-tight checkbox/radio to text spacing (per option) */
.form-check.form-check--tight {
    gap: 2px;
}

.form-check input {
    margin: 0;
}

/* One-row options that wrap to the next row on overflow */
.form-checklist.form-checklist--rowwrap {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.form-checklist--rowwrap .form-check {
    white-space: nowrap;
    gap: 4px;
}

.form-checklist--rowwrap .form-check.form-check--nextrow {
    flex: 0 0 100%;
    width: 100%;
    order: 999;
}

/* Hard override: Members form #9 must wrap, and Dressing Room must be on row 2 */
#facilityRentalMembersForm .form-checklist[aria-label="Facility selection"] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 6px 14px;
}

#facilityRentalMembersForm .form-checklist[aria-label="Facility selection"] .form-check {
    white-space: nowrap;
    gap: 4px !important;
}

#facilityRentalMembersForm .form-checklist[aria-label="Facility selection"] .form-check.form-check--nextrow,
#facilityRentalMembersForm .form-checklist[aria-label="Facility selection"] > label:nth-child(4) {
    flex: 0 0 100% !important;
    width: 100% !important;
    order: 999 !important;
}

/* Force 3 items on first row, remaining wraps to next row */
.form-checklist--three-up {
    grid-template-columns: repeat(3, max-content);
}

@media (max-width: 768px) {
    .form-checklist--three-up {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
}

.submit-btn {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: #c46123;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.submit-btn.secondary {
    background-color: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.submit-btn:hover {
    filter: brightness(1.05);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.ministry-category, .leadership-profile {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #4a4a4a; /* Card background */
    border-radius: 6px;
}

.leadership-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #c46123;
}

/* Optional: Make content pages match homepage section sizing */
.content-section--wide {
    box-sizing: border-box;
}

/* Make profile images larger to use the extra horizontal space */
.content-section--wide .profile-image {
    width: clamp(220px, 22vw, 320px);
    height: clamp(220px, 22vw, 320px);
}

.content-section--wide .leadership-profile {
    gap: 30px;
    align-items: center;
    padding: 20px;
}

.content-section--wide .profile-details {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* SMALLER WINDOW VIEWS */

@media (max-width: 768px) {
    .content-section--wide .leadership-profile {
        flex-direction: column;
        text-align: center;
    }

    .content-section--wide .profile-image {
        width: 220px;
        height: 220px;
    }
}

.profile-details h2 {
    border-bottom: none;
    margin-bottom: 10px;
}

/* Navigation Menu Styles */

/* General Responsive Styles */

/* Medium screens (e.g., tablets) */
@media (max-width: 1024px) {
    main {
        width: 85%; /* Adjusted from fixed margins */
    }

    .hero-content h1 {
        font-size: 5em;
    }

    section h2 {
        font-size: 2.5em;
    }

    .pastor-image {
        width: 100%;
        max-width: 100%;
    }

    .faq-section-wrapper {
        flex-direction: column; /* Stack FAQ items and image */
        align-items: center;
        gap: 25px; /* Reduce space between FAQ questions and images */
    }

    .faq-image-stack-container {
        margin-top: 20px;
        padding-top: 0; /* Reset padding as it\'s stacked now */
        max-width: 80%;
    }

    #events .events-container {
        flex-direction: column; /* Stack event image and schedule app */
        align-items: stretch; /* Fill the container width when stacked */
    }

    #events .event-image-container,
    #events #schedule-display-area {
        max-width: 100%; /* Allow them to take full width when stacked */
        width: 100%; /* Ensure they take full width */
    }

    #events .event-image-container {
        margin-bottom: 20px; /* Add space when stacked */
        height: auto; /* Allow height to adjust based on content or aspect ratio */
    }
}

/* Tablet Viewports (e.g., portrait tablets) */
@media (max-width: 768px) {
    body {
        padding-top: 40px; /* Adjusted for new nav height */
        background-size: contain;
        background-repeat: repeat-y; /* Repeat background vertically only */
        background-size: auto 50%;   /* Make the image repeat exactly twice vertically */
        background-position: top center;
        background-attachment: scroll;
    }

    .top-nav {
        height: 40px; /* Shrink nav height by 50% */
        padding: 0 10px; /* Set padding for logo and menu button spacing */
        justify-content: space-between; /* Ensure logo and menu button are at opposite ends */
    }

    .nav-logo {
        height: 40px; /* Shrink nav logo by 50% */
        margin-left: 0; /* Reset margin, padding on parent handles spacing */
    }

    .menu-button {
        height: 25px; /* Shrink button height */
        width: 25px;  /* Shrink button width */
        padding: 3px; /* Reduce padding */
        border-width: 1px; /* Make border thinner */
        margin-right: 0; /* Reset margin, padding on parent handles spacing */
    }

    .menu-button span {
        height: 2px; /* Make lines inside button thinner */
    }

    .nav-links {
        top: 40px; /* Position below the adjusted nav bar */
        right: 10px; /* Align with new padding */
        width: 200px; /* Slightly wider for tablet */
    }

    .hero-content h1 {
        font-size: 2.5em; /* From older rules, smaller */
    }

    .hero-content .hero-subtitle {
        font-size: 0.7em; /* From older rules, smaller */
    }
    
    .btn-contact { /* From older rules */
        font-size: 1em;
        padding: 8px 12px;
    }

    main {
        width: 95%;
        padding-top: 15px;
    }

    section {
        padding: 15px;
        margin-bottom: 20px; /* Added from older rules */
    }

    section h2 {
        font-size: 2em; /* From older rules, smaller */
        margin-bottom: 20px; /* From older rules, smaller */
    }

    /* Assuming 'contact' is the ID for your contact section */
    section#contact {
        margin-bottom: 25px; /* Specific margin for contact section on mobile */
    }    /* Ensure Sunday service blocks can be side-by-side in mobile view */
    
    /* Center text within Sunday service details paragraphs on mobile */

    /* New Styles for Sunday Schedule similar to Thursday */
    .sunday-schedule .sunday-event-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px; /* Space between event groups */
        width: 100%;
        text-align: center;
        gap: 10px; /* Consistent spacing between children (time-slot and service-block) */
    }

    .sunday-schedule .sunday-event-group:last-child {
        margin-bottom: 0;
    }

    #worship-times .sunday-schedule .time-slot {
        position: static;
        left: auto;
        display: inline-block;
        /* margin-bottom will be handled by gap on parent .sunday-event-group */
        /* General .time-slot styles (background, padding, font-size) will apply */
    }

    .sunday-schedule .service-block {
        width: calc(100% - 30px); /* Corrected for 25px margin from .day edge (10px day padding + 15px here) */
        text-align: center;
        padding: 8px 15px; /* Consistent padding with Thursday blocks */
        background-color: #c4612380;
        border: 1px solid #bd5f25;
        border-radius: 8px;
        box-sizing: border-box;
        display: flex; /* Added for vertical centering */
        flex-direction: column; /* Added for vertical centering */
        justify-content: center; /* Added for vertical centering */
        min-height: 50px; /* Ensure a minimum height for visual consistency, adjust as needed */
    }

    .sunday-schedule .service-block .service-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center; /* Vertically center content within service-details */
        width: 100%;
        flex-grow: 1; /* Allow service-details to take available space for centering */
    }

    .sunday-schedule .service-block .service-details p {
        margin: 0; /* Remove default margins for better centering control */
    }

    /* General behavior for .service-times-row and .side-by-side-divs */
    /* MODIFIED for row/wrap behavior */
    .service-times-row {
        flex-direction: row; /* Items in a row */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: center; /* Center wrapped items */
        align-items: flex-start; /* Align to top */
        gap: 10px; /* Space between items */
        width: 100%; /* ADDED: Ensure full width for content alignment */
        box-sizing: border-box; /* ADDED: Include padding/border in width calculation */
    }

    /* MODIFIED for row/wrap behavior */
    .side-by-side-divs {
        flex-direction: row; /* Items in a row */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: space-around; /* Distribute items */
        align-items: stretch; /* Stretch items if they have different heights */
        gap: 10px; /* Space between items */
        width: 100%; /* ADDED: Ensure full width for content alignment */
        box-sizing: border-box; /* ADDED: Include padding/border in width calculation */
    }

    /* MODIFIED for row/wrap behavior */
    .side-by-side-divs > div {
        flex-grow: 1;
        flex-shrink: 1;
        /* Adjust flex-basis for wrapped items. e.g., two items per row considering gap: */
        flex-basis: calc(50% - 10px); /* Assumes a 10px gap between two items */
        margin-bottom: 10px; /* Spacing for wrapped items */
    }

    .time-slot {
        margin: 5px 0; /* Stack vertically */
        font-size: 1.1em; /* From older rules */
    }

    .thursday-schedule .time-slot { /* UPDATED SELECTOR */
        position: static; /* Remove relative positioning */
        left: auto;       /* Remove left offset */
        display: inline-block; /* Allows centering via parent\'s align-items: center */
        margin-bottom: 8px; /* Space between time and the details below it */
        /* Other general .time-slot styles (background, padding, font-size) will apply */
    }

    .days-container {
        flex-direction: column; /* Stack days vertically */
        align-items: stretch; /* Stretch to full width */
    }

    .day {
        flex-basis: 100%; /* Full width for each day */
        margin-bottom: 10px; /* Space between days */
        /* align-items: stretch; REMOVED to inherit align-items: center from global .day style */
    }

    /* ADDED: FAQ spacing adjustments for mobile - REVISED */
    .faq-container {
        order: 2; 
        max-width: 95%; 
        padding-left: 10px; 
        padding-right: 10px;
        margin-left: auto; 
        margin-right: auto; 
        margin-top: 0; /* Image container will be above with margin-bottom */
        margin-bottom: 20px; /* Keep some space below FAQ text */
    }    /* REVERTED: Use the original image stack container */
    .faq-image-stack-container {
        display: flex; /* Re-enable display, it's flex by default for internal stacking */
        /* flex-direction, align-items, gap are inherited from general styles */
        order: 1; /* Place image stack before FAQ items */
        width: auto; /* Let content or max-width define it */
        /* max-width: 80%; is inherited from 1024px styles, which is good for mobile */
        margin: 0 auto; /* Let .faq-section-wrapper gap control spacing */
        /* padding-top: 0; is inherited from 1024px styles */
    }

    /* ADDED: Footer logo and text wrapping for mobile */
    .footer-top-row {
        display: flex; /* Use flex for centering logo */
        flex-direction: column; /* Stack logo and text vertically */
        align-items: center; /* Center items horizontally */
    }

    .footer-logo {
        height: 100px; /* Double logo size from 50px to 100px */
        width: auto;
        /* float: none; Removed as flex handles layout */
        margin: 0 0 -15px 0; /* Adjusted bottom margin */
    }

    .footer-text-content {
        /* overflow: visible; Removed, not strictly necessary here */
        /* display: block; Flex child, block is default for non-replaced */
        text-align: center; /* Center the text */
        margin-left: 10px; /* Add 10px margin from left */
        margin-right: 10px; /* Add 10px margin from right */
        max-width: 100%; /* Ensure it doesn\'t overflow small screens */
    }

    .pastor-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0;
        float: none;
        border-radius: 15px;
    }

    /* Thursday schedule specific adjustments for mobile */
    .thursday-schedule .thursday-event-group {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center time-slot and service-block */
        margin-bottom: 20px; /* Space between event groups */
        width: 100%; /* Ensure the group takes full width for centering */
        text-align: center; /* Added to help center inline-block children like time-slot */
        gap: 10px; /* ADDED: Consistent spacing between children */
    }

    /* UPDATED: Ensured this rule is specific enough and correctly placed for mobile */
    #ministries .thursday-schedule .time-slot {
        position: static; 
        left: auto;       
        display: inline-block; 
        /* margin-bottom: 8px; REMOVED: Replaced by gap on parent */
        /* margin-left and margin-right will be auto if text-align:center on parent doesn't center it, 
           but for inline-block, text-align:center on parent is the primary method. */    }    .thursday-schedule .service-block {
        width: 100%; /* Full width to match other containers */
        text-align: center;
        padding: 8px 15px; /* Consistent padding with Thursday blocks */
        background-color: #c4612380;
        border: 1px solid #bd5f25;
        border-radius: 8px; 
        box-sizing: border-box;
    }

    .thursday-schedule .service-block .service-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%; /* Ensure details take full width of the block */
    }

    /* Adjust footer icon spacing for mobile */
    .footer-links-section ul li a .link-icon {
        margin-right: 2px; /* Reduced space for mobile */
    }
}

/* ==========================================================================
   Service Blocks (Worship Times, Ministry Times)
   ========================================================================== */

/* Base style for service blocks - applies to both mobile and desktop */
.service-block {
    background-color: #c4612380; /* orange-brown, semi-transparent */
    border: 1px solid #bd5f25;   /* darker orange-brown border */
    border-radius: 8px;
    padding: 15px; /* Base padding, can be adjusted in media queries */
    color: #fff; /* Assuming light text on this background */
    text-align: center; /* Center text within the block by default */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.service-block .service-details p {
    margin: 0; /* Remove default paragraph margins */
    line-height: 1.6; /* Improve readability */
}

.service-details {
    display: flex;
    flex-direction: column;
    align-items: center;     /* Horizontally centers child elements (like the <p> block) */
    justify-content: center; /* Vertically centers child elements if .service-details has intrinsic height or min-height */
    width: 100%;             /* Ensures .service-details spans the .service-block width */
}

.thursday-schedule .thursday-event-group .event-service-blocks-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.thursday-schedule .event-service-blocks-row .service-block {
    flex: 1;
    min-width: 45%; /* Ensure two blocks can fit side by side */
    margin: 0;
}

/* Optional admin-managed theme overrides (safe if missing/404). */
@import url('theme.css');

/* ============================================================
   Schedule component
   Source: schedule_app.css
   ============================================================ */

/* Styles for the Schedule Application Components.
   Schedule-specific rules only — shared public mobile layout rules were
   moved to public-responsive.css (loaded immediately after this file). */

#schedule-display-area {
    flex: 1;
    background-color: rgba(196, 97, 35, 0.3);
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 981px) {
    .home #schedule-display-area { height: 420px; }
}

.schedule-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.schedule-header h3 { margin: 0; font-size: 2.5em; }

#schedule-display {
    min-height: 150px;
    max-height: none;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px dashed #555;
    border-radius: 0;
    padding: 10px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

@media (max-width: 980px) {
    #schedule-display {
        height: auto;
        max-height: 55vh;
        -webkit-overflow-scrolling: touch;
    }
}

.schedule-controls-modal h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    color: #e0e0e0;
}

.schedule-controls-modal input[type="text"],
.schedule-controls-modal input[type="date"],
.schedule-controls-modal input[type="time"],
.schedule-controls-modal button {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #f1f1f1;
    box-sizing: border-box;
}

.schedule-controls-modal button {
    background-color: rgb(196, 97, 35);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.schedule-controls-modal button:hover { background-color: rgb(160, 70, 20); }

#schedule-app-preview-display {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px dashed #454545;
    border-radius: 15px;
    padding: 10px;
    margin-top: 8px;
    margin-bottom: 15px;
}

#update-live-page-button {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    display: block;
    margin: 20px auto 0 auto;
    transition: background-color 0.2s ease;
}

#update-live-page-button:hover { background-color: #218838; }

.event-item {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid rgb(196, 97, 35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

#schedule-display .event-item {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 5px;
}

.event-item p { margin: 3px 0; color: #e0e0e0; text-align: center; }
.event-item strong { display: block; margin-bottom: 4px; color: #ffffff; font-size: 1.05em; text-align: center; }

.btn-delete-event {
    background-color: #c46123;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.btn-delete-event:hover { background-color: #a04e1c; }

#schedule-app-preview-display::-webkit-scrollbar,
#schedule-display::-webkit-scrollbar { width: 6px; }

#schedule-app-preview-display::-webkit-scrollbar-track,
#schedule-display::-webkit-scrollbar-track { background: #2a2a2a; border-radius: 3px; }

#schedule-app-preview-display::-webkit-scrollbar-thumb,
#schedule-display::-webkit-scrollbar-thumb { background: rgb(196, 97, 35); border-radius: 3px; }

#schedule-app-preview-display::-webkit-scrollbar-thumb:hover,
#schedule-display::-webkit-scrollbar-thumb:hover { background: rgb(172, 85, 30); }

/* ============================================================
   Public responsive behavior
   Source: public-responsive.css
   ============================================================ */

/* =====================================================================
   PUBLIC RESPONSIVE — shared mobile-layout overrides for public pages.
   Moved out of schedule_app.css (it is not schedule-specific). Loaded on
   the same pages that load schedule_app.css, immediately after it, to
   preserve the original cascade order exactly.
   ===================================================================== */

/* Shared mobile alignment for every public static page. */
@media (max-width: 768px) {
    body:not(.admin-page) main,
    body:not(.admin-page) main > section,
    body:not(.admin-page) main > article,
    body:not(.admin-page) .page-content,
    body:not(.admin-page) .content-container,
    body:not(.admin-page) .section-container,
    body:not(.admin-page) .container,
    body:not(.admin-page) .card,
    body:not(.admin-page) .form-container,
    body:not(.admin-page) .gallery-controls,
    body:not(.admin-page) .photo-gallery-section,
    body:not(.admin-page) .leadership-container,
    body:not(.admin-page) .ministries-container,
    body:not(.admin-page) .history-container,
    body:not(.admin-page) .contact-container,
    body:not(.admin-page) .giving-container,
    body:not(.admin-page) .rental-container,
    body:not(.admin-page) .live-praise-container,
    body:not(.admin-page) .footer-top-row,
    body:not(.admin-page) .footer-bottom-row,
    body:not(.admin-page) .footer-links-section {
        box-sizing: border-box !important;
        width: min(100%, calc(100vw - 32px)) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body:not(.admin-page) main,
    body:not(.admin-page) main > section,
    body:not(.admin-page) main > article {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body:not(.admin-page) h1,
    body:not(.admin-page) h2,
    body:not(.admin-page) .page-title,
    body:not(.admin-page) .section-title { text-align: center !important; }

    body:not(.admin-page) img,
    body:not(.admin-page) video,
    body:not(.admin-page) iframe { max-width: 100% !important; }

    body.home .hero-section {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        text-align: center !important;
    }

    body.home .hero-content {
        width: min(100%, 680px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    body.home .hero-content h1,
    body.home .hero-content .hero-line,
    body.home .hero-content p {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    body.home .hero-content .btn-contact,
    body.home .announcement-ticker-wrap,
    body.home .bulletin-frame-wrap {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body:not(.admin-page) .footer-top-row,
    body:not(.admin-page) .footer-bottom-row {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Keep profile cards inside their parent; center portraits without enlarging them. */
    body:not(.admin-page) .content-section .leadership-profile {
        box-sizing: border-box !important;
        width: auto !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
        align-items: stretch !important;
        text-align: left !important;
    }

    body:not(.admin-page) .content-section .leadership-profile .profile-image {
        display: block !important;
        float: none !important;
        width: auto !important;
        height: auto !important;
        max-width: min(200px, 100%) !important;
        margin: 0 auto 16px !important;
        align-self: center !important;
        object-position: center center !important;
    }

    body:not(.admin-page) .content-section .leadership-profile .profile-details {
        box-sizing: border-box !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
}

/* ============================================================
   Home page layout refinements
   Source: home-layout-updates.css
   ============================================================ */

/* Homepage schedule and footer refinements */

.home .schedule-context {
    display: inline;
    font-size: calc(1em - 2pt);
    font-style: italic;
}

/* Present Worship Times and Weekly Ministry Times as separate full-width sections. */
.home #times {
    grid-template-columns: 1fr;
    gap: 28px;
}

.home #worship-times .days-container,
.home #ministries .days-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

/* Worship: Sunday left; Tuesday and Wednesday stacked right. */
.home #worship-times .day:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.home #worship-times .day:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.home #worship-times .day:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

/* Weekly ministry: Tuesday and Wednesday stacked left; Thursday right. */
.home #ministries .day:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.home #ministries .day:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.home #ministries .day:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.home #worship-times .day,
.home #ministries .day {
    width: auto;
    box-sizing: border-box;
}

.home .footer-copyright-row a {
    color: #ccc;
    text-decoration: none;
}

.home .footer-copyright-row a:hover,
.home .footer-copyright-row a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .home #worship-times .days-container,
    .home #ministries .days-container {
        display: flex;
        flex-direction: column;
    }

    .home .footer-bottom-row {
        flex-direction: column;
        align-items: stretch;
    }

    .home .footer-links-section {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ============================================================
   QR scanner page
   Source: scan.css
   ============================================================ */

:root{
  --scan-bg:#0f2238;
  --scan-panel:#132b45;
  --scan-card:#173757;
  --scan-text:#f7f2e6;
  --scan-muted:#c4d0de;
  --scan-accent:#d2a84e;
  --scan-border:rgba(255,255,255,.14);
  --scan-ok:#c9f0d1;
  --scan-warn:#ffe2a7;
  --scan-error:#ffc3c3;
}

*{box-sizing:border-box;}
html,body{min-height:100%;}
body{
  margin:0;
  font-family:"Avenir Next","Segoe UI",Tahoma,sans-serif;
  background:radial-gradient(circle at top, rgba(210,168,78,.24), transparent 36%), linear-gradient(180deg, #0b1930 0%, var(--scan-bg) 100%);
  color:var(--scan-text);
}

.scanShell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
}

.scanCard{
  width:min(720px, 100%);
  background:rgba(19,43,69,.92);
  border:1px solid var(--scan-border);
  border-radius:24px;
  padding:20px;
  box-shadow:0 22px 44px rgba(0,0,0,.28);
}

.scanEyebrow{
  margin:0 0 8px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.8rem;
  color:var(--scan-accent);
  font-weight:900;
}

h1,h2{margin:0;}

.scanLead{
  margin:10px 0 18px;
  color:var(--scan-muted);
  line-height:1.5;
}

.scanStatus,
.scanSummary{
  margin:0 0 16px;
  border:1px solid var(--scan-border);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.05);
}

.scanCameraRegion{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  background:#091221;
  min-height:280px;
  border:1px solid rgba(210,168,78,.34);
}

.scanCamera{
  width:100%;
  min-height:280px;
  object-fit:cover;
  display:block;
}

.scanCameraOverlay{
  position:absolute;
  inset:18% 16%;
  border:3px solid rgba(210,168,78,.9);
  border-radius:20px;
  box-shadow:0 0 0 999px rgba(5,11,19,.22);
}

.scanStage,
.scanPanel,
.scanForm{display:grid;gap:12px;}

.scanForm{margin-top:18px;}

.scanLabel{
  font-weight:800;
  color:var(--scan-text);
}

.scanInput{
  width:100%;
  min-height:52px;
  padding:12px 14px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,.18);
  background:#fdf8ef;
  color:#1b2634;
  font-size:1rem;
}

.scanInput:focus,
.scanBtn:focus{
  outline:3px solid #76b7ff;
  outline-offset:2px;
}

.scanButtonRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.scanBtn{
  min-height:48px;
  padding:12px 16px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:var(--scan-text);
  font-weight:900;
  cursor:pointer;
}

.scanBtn--primary{
  background:linear-gradient(180deg, #d2a84e 0%, #ba8f3f 100%);
  color:#1f1b15;
  border-color:rgba(255,255,255,.12);
}

.scanStatus--ok{color:var(--scan-ok);}
.scanStatus--warn{color:var(--scan-warn);}
.scanStatus--error{color:var(--scan-error);}

@media (max-width:640px){
  .scanShell{padding:12px;}
  .scanCard{padding:16px;}
  .scanCameraRegion{min-height:220px;}
  .scanCamera{min-height:220px;}
  .scanCameraOverlay{inset:20% 10%;}
  .scanButtonRow{grid-template-columns:1fr;display:grid;}
}

/* ============================================================
   Giving page
   Source: Pages/giving.css
   ============================================================ */

body.givingPage {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.56)), url('../ConImg/Church.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #f6f1ea;
}

.givingMain {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.givingIntro {
  max-width: 760px;
  margin-bottom: 36px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.givingIntroLogo {
  display: block;
  width: clamp(110px, 18vw, 150px);
  height: auto;
  margin: 0 auto 14px;
}

.givingEyebrow {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffe2bf;
}

.givingIntro h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: .96;
}

.givingIntro p:last-child {
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.givingLayout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 28px;
  align-items: start;
}

.givingCard,
.givingTrustCard {
  background: rgba(255, 249, 239, .98);
  border: 1px solid rgba(196, 97, 35, .35);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  color: #000;
}

.givingCard { padding: clamp(24px, 4vw, 42px); }

.givingTrustCard {
  position: sticky;
  top: 110px;
  padding: 30px;
  text-align: center;
}

.givingTrustCard img {
  display: block;
  width: 110px;
  height: auto;
  margin: 0 auto 20px;
}

.givingTrustCard h2,
.givingSection h2 { margin: 0 0 16px; color: #000; }

.givingTrustCard p,
.givingTrustCard li,
.givingDisclosure p { line-height: 1.6; }

.givingTrustCard ul { padding-left: 20px; text-align: left; }
.givingTrustFinePrint { margin-top: 22px; font-size: .86rem; opacity: .72; }

.givingSection + .givingSection {
  margin-top: 32px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.givingFundGrid,
.givingAmountGrid,
.givingFrequency { display: grid; gap: 12px; }
.givingFundGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.givingAmountGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.givingFrequency { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.givingChoice { position: relative; cursor: pointer; }
.givingChoice input { position: absolute; opacity: 0; pointer-events: none; }

.givingChoice span,
.givingAmountBtn {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

.givingChoice input:checked + span,
.givingChoice input:focus-visible + span,
.givingAmountBtn.is-selected,
.givingAmountBtn:focus-visible {
  border-color: #c46123;
  box-shadow: 0 0 0 2px #c46123;
}

.givingDetailsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.givingField { display: grid; gap: 8px; font-weight: 700; }
.givingField--full { grid-column: 1 / -1; }

.givingField input,
.givingField textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
  color: inherit;
  font: inherit;
}

.givingField textarea { resize: vertical; }

.givingMoneyInput {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 12px;
  background: #fff;
  padding-left: 16px;
}

.givingMoneyInput input { border: 0; border-radius: 0 12px 12px 0; outline: none; }
.givingDisclosure { margin: 28px 0 18px; padding: 16px 18px; border-radius: 12px; background: rgba(0, 0, 0, .045); font-size: .9rem; }
.givingDisclosure p { margin: 0; }

.givingSubmit {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #cb6a29, #9d4718);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.givingSubmit:hover,
.givingSubmit:focus-visible { background: linear-gradient(180deg, #d97939, #a85223); }
.givingSubmit:disabled { cursor: wait; opacity: .65; }
.givingStatus { min-height: 1.4em; margin-top: 12px; font-weight: 700; }
.givingStatus.is-error { color: #9f1f1f; }

@media (max-width: 900px) {
  .givingLayout { grid-template-columns: 1fr; }
  .givingTrustCard { position: static; }
}

@media (max-width: 680px) {
  .givingMain {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 42px 16px 72px;
    margin-left: auto;
    margin-right: auto;
  }

  .givingIntro,
  .givingLayout,
  .givingCard,
  .givingSection,
  .givingDetailsGrid,
  .givingField,
  .givingMoneyInput,
  .givingStatus {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .givingLayout {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .givingCard { padding: 22px 16px; }

  .givingFundGrid,
  .givingAmountGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .givingDetailsGrid { grid-template-columns: 1fr; }
  .givingField--full { grid-column: auto; }
}
