/* LOCATIONS PAGE */
.locations-page {
    padding-top: calc(var(--header-h) + 46px);
}

.locations-hero {
    padding-bottom: 12px;
}

.locations-hero__content {
    max-width: 840px;
}

    .locations-hero__content h1 {
        margin: 0 0 16px;
        font-size: clamp(2rem, 4vw, 3.75rem);
        line-height: 1.04;
        letter-spacing: -0.03em;
    }

.locations-hero__actions {
    justify-content: flex-start;
}

.locations-map-card {
    padding: 0;
    overflow: hidden;
}

.locations-map {
    width: 100%;
    height: 560px;
    min-height: 560px;
    z-index: 1;
}

    /* Leaflet hardening: prevents the site's global rules or a blocked CDN stylesheet from breaking map tiles. */
    .locations-map.leaflet-container {
        position: relative;
        overflow: hidden;
        touch-action: pan-x pan-y;
    }

    .locations-map .leaflet-pane,
    .locations-map .leaflet-tile,
    .locations-map .leaflet-marker-icon,
    .locations-map .leaflet-marker-shadow,
    .locations-map .leaflet-tile-container,
    .locations-map .leaflet-pane > svg,
    .locations-map .leaflet-pane > canvas,
    .locations-map .leaflet-zoom-box,
    .locations-map .leaflet-image-layer,
    .locations-map .leaflet-layer {
        position: absolute;
        left: 0;
        top: 0;
    }

    .locations-map .leaflet-tile {
        max-width: none !important;
        width: 256px !important;
        height: 256px !important;
        display: block;
    }

    .locations-map .leaflet-control-container .leaflet-top,
    .locations-map .leaflet-control-container .leaflet-bottom {
        position: absolute;
        z-index: 1000;
    }

    .locations-map .leaflet-top {
        top: 0;
    }

    .locations-map .leaflet-right {
        right: 0;
    }

    .locations-map .leaflet-bottom {
        bottom: 0;
    }

    .locations-map .leaflet-left {
        left: 0;
    }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    color: var(--text);
}

.leaflet-popup-content strong {
    display: inline-block;
    margin-bottom: 4px;
}

.leaflet-popup-content a {
    color: var(--brand);
    font-weight: 800;
}

.locations-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.location-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .location-card:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.96);
    }

.location-card__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.location-card h3 {
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.location-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.location-card__address {
    margin-top: 6px !important;
    font-size: 0.95rem;
}

.location-card__distance {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(127, 177, 141, 0.16);
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 800;
}

.location-card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

@media (max-width: 820px) {
    .locations-list {
        grid-template-columns: 1fr;
    }

    .location-card__body {
        flex-direction: column;
    }

    .location-card__actions,
    .locations-hero__actions {
        justify-content: flex-start;
    }

    .locations-map {
        height: 460px;
        min-height: 460px;
    }
}

@media (max-width: 560px) {
    .locations-map {
        height: 380px;
        min-height: 380px;
    }

    .location-card__actions .btn {
        width: 100%;
    }
}
