/* ============================================================
   Branches Map Widget — Frontend Styles
   ============================================================ */

.bmw-section {
    padding: 64px 24px;
    overflow: hidden;
    background: #fff;
    color: #1a1a2e;
}

/* ── Label ─────────────────────────────────────────────────── */
.bmw-label {
    color: #e0654a;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* ── Heading ───────────────────────────────────────────────── */
.bmw-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 48px;
}

.bmw-heading span {
    color: #e0654a;
}

/* ── Map Wrapper ───────────────────────────────────────────── */
.bmw-map-wrapper {
    position: relative;
    width: 100%;
}

.bmw-map-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.bmw-map-placeholder {
    width: 100%;
    min-height: 300px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ── Decorative SVG ────────────────────────────────────────── */
.bmw-decorative-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Pins ──────────────────────────────────────────────────── */
.bmw-pin {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -100%);
    cursor: pointer;
}

.bmw-pin-bubble {
    background: #e0654a;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.bmw-pin-triangle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #e0654a;
}

/* ── Pin Hover Animations ──────────────────────────────────── */

/* Scale */
.bmw-anim-scale:hover .bmw-pin-bubble {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(224, 101, 74, 0.35);
}

/* Bounce */
@keyframes bmw-bounce {
    0%, 100% { transform: translateY(0); }
    40%       { transform: translateY(-6px); }
    70%       { transform: translateY(-3px); }
}

.bmw-anim-bounce:hover .bmw-pin-bubble {
    animation: bmw-bounce 0.5s ease;
}

/* Glow */
.bmw-anim-glow:hover .bmw-pin-bubble {
    box-shadow: 0 0 0 4px rgba(224, 101, 74, 0.25), 0 2px 8px rgba(0,0,0,0.15);
    transform: scale(1.05);
}

/* None — no animation */
.bmw-anim-none:hover .bmw-pin-bubble {
    transform: none;
}

/* ── Popup ─────────────────────────────────────────────────── */
.bmw-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: none;
    pointer-events: none;
}

/* Hover trigger */
.bmw-pin[data-trigger="hover"]:hover .bmw-popup,
.bmw-pin[data-trigger="hover"]:focus .bmw-popup {
    display: block;
    animation: bmw-popup-in 0.2s ease forwards;
    pointer-events: auto;
}

/* Click trigger — toggled via JS class */
.bmw-pin.bmw-popup-open .bmw-popup {
    display: block;
    animation: bmw-popup-in 0.2s ease forwards;
    pointer-events: auto;
}

@keyframes bmw-popup-in {
    from { opacity: 0; transform: translateX(-50%) scale(0.94) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) scale(1)    translateY(0); }
}

.bmw-popup-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    width: 224px;
}

.bmw-popup-inner iframe {
    display: block;
    border: 0;
    width: 100%;
}

.bmw-popup-label {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: #1e293b;
    background: #fff;
}

.bmw-popup-link-wrap {
    padding: 4px 12px 10px;
    text-align: center;
}

.bmw-popup-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e0654a;
    text-decoration: none;
    transition: opacity 0.2s;
}

.bmw-popup-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

.bmw-popup-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #e5e7eb;
}

/* ── Statistics ────────────────────────────────────────────── */
.bmw-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 48px;
}

.bmw-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.bmw-stat-label {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (min-width: 768px) {
    .bmw-heading {
        font-size: 3rem;
    }
    .bmw-stat-number {
        font-size: 3.75rem;
    }
    .bmw-stats {
        gap: 80px;
    }
}

@media (max-width: 600px) {
    .bmw-pin-bubble {
        font-size: 0.625rem;
        padding: 2px 6px;
    }
    .bmw-popup-inner {
        width: 180px !important;
    }
    .bmw-popup-inner iframe {
        height: 110px !important;
    }
    .bmw-stats {
        gap: 24px;
    }
    .bmw-stat-number {
        font-size: 2rem;
    }
}
