/* Modern Styles for Church List v2 */

/* Step 1: Responsive Grid Layout */
.jm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Step 2: Card & Filter Design */

/* Filter Bar */
.jm-churchlist-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #eee;
}
.jm-churchlist-filter input[type="search"],
.jm-churchlist-filter select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex-grow: 1;
    min-width: 200px; /* Prevent filters from getting too small */
}
.jm-churchlist-filter .jm-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: #5A3F2E;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.jm-churchlist-filter .jm-btn:hover {
    background-color: #4a3224;
}

/* Card Design */
.jm-card {
    background-color: #ffffff;
    border: 1px solid #e2d6b8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.jm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.jm-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.jm-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f0f0;
}
.jm-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.jm-card:hover .jm-card-thumb img {
    transform: scale(1.05);
}
.jm-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.jm-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}
.jm-card-meta {
    margin-bottom: 0.75rem;
}
.jm-pill {
    display: inline-block;
    width: fit-content;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #5A3F2E;
    background-color: #f5f2ed;
    border: 1px solid #e2d6b8;
    border-radius: 999px;
}
.jm-addr {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    margin-top: auto; /* Pushes address to the bottom */
    padding-top: 0.5rem;
}

/* Pagination */
.jm-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}
.jm-pagination .jm-page {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #5A3F2E;
    background-color: white;
    transition: all 0.2s ease;
}
.jm-pagination .jm-page.is-active,
.jm-pagination .jm-page:hover {
    background-color: #5A3F2E;
    color: white;
    border-color: #5A3F2E;
}