/* Main Layout Structure
   Sets up the two-column design with map and churches section */
.church-locator-container {
    display: flex;
    gap: 2em;
    margin: 2em 0;
}

.map-container {
    flex: 0 0 50%;
    width: 50%;
}

.churches-section {
    flex: 0 0 50%;
    width: 50%;
    display: flex;
    flex-direction: column;
    height: 600px; /* Match map height */
}

/* Map Styling
   Ensures the map displays properly with correct dimensions */
#church-map {
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Churches List Container
   Makes the list scrollable while keeping filters fixed */
.churches-list {
    width: 100%;
    overflow-y: auto; /* Enable vertical scrolling */
    flex-grow: 1; /* Take up remaining space */
    padding-right: 1em; /* Space for scrollbar */
}

/* Scrollbar Styling for better visibility */
.churches-list::-webkit-scrollbar {
    width: 6px;
}

.churches-list::-webkit-scrollbar-track {
    background: #F4F4F4;
    border-radius: 2px;
}

.churches-list::-webkit-scrollbar-thumb {
    background: #A0443E;
    border-radius: 2px;
}

.churches-list::-webkit-scrollbar-thumb:hover {
    background: #833631;
}

/* Filter Controls
   Styles the city and deanery dropdown filters */
.filter-controls {
    width: 100%;
    display: flex;
    gap: 1em;
    padding-bottom:1em;
}

.filter-select {
    flex: 1;
}

.filter-select select {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #D9D9D9;
    border-radius: 4px;
    background: white;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select select:focus {
    outline: none;
    border-color: #A0443E;
    box-shadow: 0 0 0 2px rgba(160, 68, 62, 0.1);
}

/* Church Accordion Styling
   Handles the expandable church listings */
.churches-list {
    width: 100%;
    border: 1px #D9D9D9 solid;
}

.church-accordion {
    margin-bottom: -1px;
    margin-top:-1px;
    overflow: hidden;
}

/* .church-header {
    padding: 1em;
    border: 1px #D9D9D9 solid;
    border-bottom: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    position: relative;
} */

.church-header {
    padding: 1em;
    border: 1px #D9D9D9 solid;
    border-left: none;
    border-bottom:none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.church-title {
    font-weight: bold;
    flex: 1;
}

.church-city {
    margin-right: 2.5em; /* Make room for the arrow */
    color: #A0443E;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .28px
}

.church-header::after {
    content: '▼';
    position: absolute;
    margin-right:8px;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.church-header.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Church Content Area
   Styles the expanded content showing Mass and Confession times */
.church-content {
    display: none;
    padding: 0 1em 1em 1em;
    background: #F4F4F4;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.times-container {
    display: flex;
    gap: 2em;
}

.mass-times-column,
.confession-times-column {
    flex: 1;
    font-size: .85em;
}

/* Schedule Display
   Styles for the Mass and Confession schedules */
.mass-times-column h4 {
    margin-top: 0;
    margin-bottom: 0;
    color: #483D3D !important;
    font-size: .85em;
    font-weight: 700;
    font-family:'DM Sans',Helvetica,Arial,Lucida,sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18px
}

.confession-times-column h4 {
    margin-top: 0;
    margin-bottom: 0;
    color: #483D3D !important;
    font-size: .85em;
    font-weight: 700;
    font-family:'DM Sans',Helvetica,Arial,Lucida,sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18px
}

.schedule-day {
    margin-bottom: 0;
}

.day-name {
    font-weight: bold;
    margin-bottom: 0;
}

.time-slot {
    margin-bottom: 0.25em;
}

.time {
    color: #A0443E;
    font-weight: 500;
}

.notice {
    color: #666;
    font-style: italic;
    font-size: .85em;
}

/* Map Marker Styling
   Customizes the appearance of church markers on the map */
.church-marker {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.marker-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marker-title {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Design
   Adapts the layout for different screen sizes */
@media (max-width: 768px) {
    .church-locator-container {
        flex-direction: column;
    }
    
    .map-container,
    .churches-section {
        flex: 0 0 100%;
        width: 100%;
    }

    .map-container {
        margin-bottom: 2em;
    }
    
    .filter-controls {
        margin-bottom: 1.5em;
    }
    
    .times-container {
        flex-direction: column;
        gap: 1.5em;
    }
}

@media (max-width: 480px) {
   
   .church-city {
        margin-right: 2em;
        font-size: 0.85em;
    }
    
    .church-header {
        padding: 0.75em;
    }
   
    .church-locator-container {
        gap: 1.5em;
        margin: 1.5em 0;
    }
    
    .filter-select select {
        padding: 0.5em;
        font-size: 0.95em;
    }
    
    .church-header {
        padding: 0.75em;
    }
    
    .church-content {
        padding: 1em;
    }
}