/* Locations Map Block
   Loaded on both frontend and Gutenberg editor so preview matches output. */

/* Editor-only: keep block preview non-interactive so ACF map fields remain usable. */
.editor-styles-wrapper .locations-map-section .map-wrapper {
    pointer-events: none;
    cursor: default;
}

/* Editor-only: Bootstrap grid fallback for card layout in block preview. */
.editor-styles-wrapper .locations-map-section .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.editor-styles-wrapper .locations-map-section .row > * {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    margin-bottom: 1.5rem;
}

.editor-styles-wrapper .locations-map-section .col-6,
.editor-styles-wrapper .locations-map-section .col-md-4,
.editor-styles-wrapper .locations-map-section .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.locations-map-section {
    padding: 60px 0;
}

.locations-map-section .map-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

/* Google map container div rendered by PHP template. */
.locations-map-section .map-wrapper > div {
    width: 100%;
    height: 700px;
    display: block;
}

.locations-map-section .city-heading {
    color: #233155;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.locations-map-section .city-group {
    margin-bottom: 50px;
}

.locations-map-section .city-group:last-child {
    margin-bottom: 0;
}

.location-card {
    background-color: #2c3e6b;
    border-radius: 50px;
    overflow: hidden;
    color: #fff;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(44, 62, 107, 0.35);
}

.location-card .card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.location-card .card-body {
    padding: 20px 16px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.location-card .pin-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.location-card .card-address {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.location-card .card-city {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.85;
    margin: 0;
}

.location-card .card-map-link {
    color: #fff;
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.75;
    margin-top: 8px;
    transition: opacity 0.2s ease;
}

.location-card .card-map-link:hover {
    opacity: 1;
}

@media (max-width: 767.98px) {
    .locations-map-section .map-wrapper > div {
        height: 320px;
    }

    .locations-map-section .city-heading {
        font-size: 1.5rem;
    }
}

/* Google Maps InfoWindow card styling. */
.gm-style-iw-chr {
    position: absolute;
    width: 100% !important;
}

.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 30px rgba(44, 62, 107, 0.35) !important;
    max-width: 220px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
}

.gm-style .gm-style-iw-tc {
    display: none !important;
}

.gm-style button.gm-ui-hover-effect {
    top: 4px !important;
    right: 4px !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 50% !important;
}

.gm-style button.gm-ui-hover-effect > span {
    filter: brightness(10) !important;
}

.map-info-card {
    background-color: #2c3e6b;
    color: #fff;
    text-align: center;
    overflow: hidden;
    font-family: inherit;
    width: 220px;
}

.map-info-card .map-info-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.map-info-card .map-info-body {
    padding: 14px 12px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.map-info-card .map-info-body .pin-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 4px;
    opacity: 0.9;
    color: #fff;
}

.map-info-card .map-info-address {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.map-info-card .map-info-city {
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.85;
    margin: 0;
}

.map-info-card .map-info-link {
    color: #fff;
    font-size: 0.75rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.75;
    margin-top: 6px;
    transition: opacity 0.2s ease;
}

.map-info-card .map-info-link:hover {
    opacity: 1;
}
