/* =========================================================
   MY DOG RUN V2 - MAP AND FIELD CARDS
   ========================================================= */

.mdr-mapcards {
    width: 100%;
    margin: 0 auto;
    color: #17488c;
}

.mdr-mapcards-map-wrap {
    width: 100%;
    background: #f3f7fb;
    border-bottom: 1px solid #aaa;
}

.mdr-mapcards-map {
    width: 100%;
    height: 520px;
    min-height: 360px;
}

.mdr-mapcards-cards {
    max-width: 1200px;
    margin: 38px auto 60px auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
}

.mdr-field-card {
    margin: 0;
    width: 340px;
    height: 390px;
    display: block;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .mdr-field-card.is-active {
        transform: translateY(-4px);
    }

        .mdr-field-card.is-active .flip-card-front,
        .mdr-field-card.is-active .flip-card-back {
            border-color: #17488c;
            box-shadow: 0 8px 24px rgba(23,72,140,.22);
        }

    .mdr-field-card .flip-card-pic {
        width: calc(100% + 30px);
        height: 190px;
    }

        .mdr-field-card .flip-card-pic img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .mdr-field-card .flip-card-title {
        color: #17488c;
        font-size: 1.2em;
        font-weight: 700;
        line-height: 1.2;
    }

    .mdr-field-card .flip-card-summary {
        color: #333;
        height: 92px;
        line-height: 1.35;
    }

    .mdr-field-card .flip-card-desc {
        max-height: 205px;
        color: #333;
    }

    .mdr-field-card .flip-card-front .mdr-field-book,
    .mdr-field-card .flip-card-back .mdr-field-book {
        position: absolute;
        left: 50%;
        right: auto;
        top: auto;
        bottom: 12px;
        transform: translateX(-50%);
        display: inline-block;
        margin: 0;
        padding: 8px 16px;
        border-radius: 999px;
        background: #17488c;
        color: #fff;
        text-decoration: none;
        font-size: .95em;
        white-space: nowrap;
        z-index: 20;
    }

    .mdr-field-card .mdr-field-book:hover {
        background: #0d3164;
        color: #fff;
    }

.mdr-mapcards-info {
    color: #17488c;
    font-family: Jost, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
}

    .mdr-mapcards-info strong {
        display: block;
        margin-bottom: 4px;
    }

.mdr-mapcards-cards.has-selection .mdr-field-card {
    opacity: 0.25;
    filter: grayscale(1);
    transition: all .25s ease;
}

    .mdr-mapcards-cards.has-selection .mdr-field-card.selected {
        opacity: 1;
        filter: none;
    }

@media (max-width: 800px) {
    .mdr-mapcards-map {
        height: 420px;
    }

    .mdr-field-card {
        width: 100%;
        max-width: 360px;
    }
}

/* Formatted CKEditor content on the reverse of field cards.
   Keep the title and first paragraph together without affecting
   the fixed-position booking button at the bottom. */
.mdr-field-card .flip-card-back .flip-card-title {
    margin-bottom: 8px;
}

.mdr-field-card .flip-card-back .flip-card-desc {
    margin-top: 0;
    padding-top: 0;
}

    .mdr-field-card .flip-card-back .flip-card-desc > :first-child {
        margin-top: 0;
    }

    .mdr-field-card .flip-card-back .flip-card-desc p {
        margin-bottom: 12px;
        line-height: 1.5;
    }


/* Front of field card – reduce title-to-description gap */
.mdr-field-card .flip-card-front .flip-card-title {
    margin-bottom: 6px;
}

.mdr-field-card .flip-card-front .flip-card-summary {
    margin-top: 0;
    padding-top: 0;
}

    .mdr-field-card .flip-card-front .flip-card-summary > :first-child {
        margin-top: 0;
    }