.al-offices-map {
    position: relative;
    width: 100%;
    margin-bottom: 120px;
}

.al-offices-map .al-map-inner {
    position: relative;
    width: 100%;
    overflow: visible; /* allow top pins/cards to escape container bounds */
    min-height: 300px; /* keep some vertical space if map image is slow to load */
}

@media(max-width: 768px) {

    .al-offices-map {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .al-map-image {
        /* transform: translateY(16px); */
    }

    .al-map-pins {
      transform: translateY(-16px);
    }

    .al-offices-map .al-map-inner {
        display: flex;
        align-items: center;
        min-height: 0px;
    }
}

.al-offices-map .al-map-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.al-offices-map .al-map-pins {
    position: absolute;
    inset: 0;
}

.al-offices-map .al-map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.al-offices-map .al-map-pin img {
    width: 28px;
    height: 36px;
    display: block;
}

.al-offices-map .al-map-pin:focus-visible {
    outline: 2px solid #16cefc;
    outline-offset: 4px;
}

.al-offices-map .al-map-empty {
    margin: 0;
    padding: 12px;
    background: #f7f7f7;
    border: 1px dashed #ddd;
}

.al-offices-map-placeholder__frame {
    width: 100%;
    background: #f6f6f6;
    border: 1px dashed #d8d8d8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Popup card */
.al-map-card {
    position: absolute;
    transform: translate(-50%, -100%);
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 14px 16px;
    min-width: 240px;
    max-width: 280px;
    z-index: 3;
}

.al-map-card::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

.al-map-card-content {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 12px;
    align-items: start;
}

.al-map-card-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 30px;
    font-weight: 700;
    color: #111;
}

.al-map-card-contact {
    margin: 0;
    font-family: monospace;
    font-size: 10px;
    line-height: 19px;
    color: #111;
    border-left: none !important;
    word-break: break-word;
    padding-top: 0 !important;
    padding-left: 0 !important;
}

.al-map-card-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding-top: 4px;
}

.al-map-card-icons a {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.al-map-card-icons a:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

.al-map-card-icons a:active {
    transform: scale(0.95);
}

.al-map-card-icons img {
    width: 32px;
    height: 32px;
    display: block;
    pointer-events: none;
}

.al-map-card-features {
    margin-bottom: 8px;
}

.al-map-card-features .al-office-feature-circle {
    margin-right: 4px;
}

/* Legend styles */
.al-offices-map .al-map-legend-sub,
.al-offices-map .al-map-legend {
    margin: 0;
    font-family: 'TWK Everett Mono', monospace;
    font-size: 10px;
    line-height: 19px;
    color: #111;
    padding-left: 0px !important;
    border-left: none !important;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0px;
}

.al-offices-map .al-map-legend-sub {
    margin-top: 16px;
}

.al-offices-map .al-map-legend {
    margin-bottom: 16px;
}

@media(max-width: 700px) {
    .al-offices-map .al-map-legend {
        margin-left: auto;
        margin-right: auto;
        transform: translateX(0);
        display: grid;
        grid-template-columns: repeat(4, auto);
        gap: 8px;
        justify-content: center;
        text-align: left;
    }
}

.al-offices-map .al-office-feature-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #13cefc;
    color: #fff;
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
    margin-left: 0px;
    font-family: 'TWK Everett Mono', monospace;
}
