* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.map-page {
    height: 100vh;
    overflow: hidden;

    background-color: #f5f2e8;
    color: #244f35;
    font-family: "Roboto", sans-serif;
}

.map-header {
    height: 78px;
    padding: 0 6%;

    background-color: #f5f2e8;
    border-bottom: 1px solid #dedace;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-logo {
    display: flex;
    align-items: center;
    gap: 13px;

    color: #214c31;
    text-decoration: none;
    font-family: "Playfair Display", serif;
    font-size: 22px;
    font-weight: bold;
}

.map-logo-symbol {
    width: 29px;
    height: 36px;

    background-color: #28592e;
    color: white;
    border-radius: 15px 15px 18px 18px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "Roboto", sans-serif;
    font-size: 17px;
}

.map-header nav a {
    color: #59665c;
    text-decoration: none;
    font-size: 15px;
}

.map-header nav a:hover {
    color: #28592e;
}

.map-main {
    height: calc(100vh - 78px);

    display: flex;
    flex-direction: column;
}

.map-tools {
    flex-shrink: 0;
    padding: 16px 4%;

    background-color: white;
    border-bottom: 1px solid #dedfd9;

    display: flex;
    align-items: center;
    gap: 14px;
}

.map-search {
    flex: 1;

    display: flex;
    gap: 10px;
}

.map-search input {
    flex: 1;
    min-width: 0;

    padding: 14px 17px;
    background-color: #f5f2e8;
    border: 1px solid #dedfd9;
    border-radius: 8px;

    color: #344438;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
}

.map-search input:focus {
    outline: 2px solid #9ab09f;
    border-color: #28592e;
}

.map-search button {
    padding: 0 24px;

    background-color: #28592e;
    border: none;
    border-radius: 8px;

    color: white;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.map-search button:hover {
    background-color: #3e7252;
}

.map-location {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #28592e;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.map-location span {
    font-size: 17px;
}

.map-filters {
    display: flex;
    gap: 9px;
}

.map-filters a {
    padding: 10px 15px;

    background-color: white;
    border: 1px solid #d8ded9;
    border-radius: 22px;

    color: #526157;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.map-filters a:hover {
    background-color: #edf2eb;
    border-color: #28592e;
    color: #28592e;
}

.map-workspace {
    flex: 1;
    min-height: 0;

    display: flex;
}

.church-results {
    flex-shrink: 0;
    width: 32%;
    min-width: 420px;
    padding: 16px;

    background-color: #f5f2e8;
    border-right: 1px solid #dedace;

    overflow-y: auto;
}

.church-result-card {
    min-height: 140px;
    margin-bottom: 14px;
    padding: 16px;

    background-color: white;
    border: 1px solid #dce1dc;
    border-radius: 14px;

    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
}

.church-result-card:hover {
    border-color: #9eb3a3;
}

.church-result-card img {
    flex-shrink: 0;

    width: 92px;
    height: 92px;

    object-fit: cover;
    border-radius: 10px;
}

.result-text {
    flex: 1 1 140px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.result-type {
    margin: 0 0 7px;

    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.protestant-type {
    color: #28592e;
}

.catholic-type {
    color: #b8924a;
}

.result-text h2 {
    margin: 0 0 6px;

    color: #173f2c;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.25;
}

.result-district {
    margin: 0 0 12px;

    color: #79817a;
    font-size: 12px;
}

.result-time {
    margin: 0;

    color: #28592e;
    font-size: 12px;
    font-weight: 500;
}

.today-service {
    color: #28592e;
}

.result-actions {
    flex-shrink: 0;
    margin-left: auto;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
}

.result-actions > p {
    margin: 0;

    color: #79817a;
    font-size: 12px;
}

.result-actions a {
    padding: 8px 11px;

    background-color: white;
    border: 1px solid #b8c8bc;
    border-radius: 7px;

    color: #28592e;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
}

.result-actions a:hover {
    background-color: #28592e;
    color: white;
}

.map-image-area {
    flex: 1;
    min-width: 0;
    height: 100%;

    background-color: #e8e3d6;

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.map-image-area img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

@media (max-width: 1100px) {
    .map-tools {
        flex-wrap: wrap;
    }

    .map-search {
        width: 100%;
        flex: none;
    }

    .church-results {
        width: 42%;
        min-width: 390px;
    }
}

@media (max-width: 768px) {
    .map-page {
        height: auto;
        overflow: auto;
    }

    .map-header {
        height: 66px;
        padding: 0 20px;
    }

    .map-logo {
        font-size: 17px;
    }

    .map-logo-symbol {
        width: 25px;
        height: 31px;
        font-size: 14px;
    }

    .map-header nav a {
        font-size: 13px;
    }

    .map-main {
        height: auto;
    }

    .map-tools {
        padding: 14px 20px;

        flex-direction: column;
        align-items: stretch;
    }

    .map-search {
        width: 100%;
    }

    .map-search input {
        padding: 12px;
        font-size: 12px;
    }

    .map-search button {
        padding: 0 17px;
        font-size: 13px;
    }

    .map-location {
        font-size: 12px;
    }

    .map-filters {
        flex-wrap: wrap;
    }

    .map-filters a {
        padding: 8px 12px;
        font-size: 11px;
    }

    .map-workspace {
        flex-direction: column;
    }

    .church-results {
        width: 100%;
        min-width: 0;
        padding: 14px;

        border-right: none;
        overflow: visible;
    }

    .church-result-card {
        min-height: auto;
        padding: 13px;
        gap: 11px;
        flex-wrap: wrap;
    }

    .church-result-card img {
        width: 72px;
        height: 72px;
    }

    .result-text h2 {
        font-size: 14px;
    }

    .result-type,
    .result-district,
    .result-time {
        font-size: 10px;
    }

    .result-actions {
        width: 100%;

        flex-direction: row;
        justify-content: flex-end;
    }

    .result-actions a {
        font-size: 11px;
    }

    .map-image-area {
        width: 100%;
        height: auto;
        min-height: 360px;
    }

    .map-image-area img {
        height: auto;
    }
}
