/* =========================================================
   Interactive Map for Elementor — v3.0
   Exact match: 400x250 cards, 16px body, always visible
   ========================================================= */

.ime-widget { width: 100%; font-family: inherit; }

/* ── Map container — 3:2 matches source PNG 1368×912 exactly, no cropping ── */
.ime-map-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: #0d0d0d;
    border-radius: 0;
    overflow: visible;
    aspect-ratio: 3 / 2;
}

.ime-map-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 0;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
    z-index: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ── Pin wrapper ── */
.ime-pin-wrap {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -100%);
}

/* ── SVG Pin ── */
.ime-pin {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.7));
    transition: transform 0.2s ease;
    z-index: 12;
}
.ime-pin:hover { transform: scale(1.12) translateY(-2px); }

/* ── Pulse ── */
.ime-pulse {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pin-color, #9b2626);
    opacity: 0;
    animation: ime-pulse 2.6s ease-out infinite;
}
@keyframes ime-pulse {
    0%  { transform: translateX(-50%) scale(0.4); opacity: 0.8; }
    75% { transform: translateX(-50%) scale(3.2); opacity: 0; }
    100%{ opacity: 0; }
}

/* ── Info Card — exact 400×250 ── */
.ime-card {
    position: absolute;
    left: var(--offset-x, -410px);
    top:  var(--offset-y, -80px);
    width:  var(--card-w, 400px);
    height: var(--card-h, 250px);
    background: rgba(62, 58, 58, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 14px;
    padding: 0 18px;
    z-index: 20;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    /* Hidden until activated */
    opacity: 0;
    transform: scale(0.93);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    box-sizing: border-box;
}

/* Always visible */
.ime-always-visible .ime-card {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}

/* Hover / click active */
.ime-pin-wrap.ime-active .ime-card,
.ime-widget:not(.ime-always-visible) .ime-pin-wrap:hover .ime-card {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Card title */
.ime-card h4 {
    margin: 0 0 10px;
    font-size: var(--title-size, 20px);
    font-weight: 700;
    color: var(--card-title-color, #cc3333);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

/* Card body */
.ime-card p {
    margin: 0;
    font-size: var(--body-size, 14px);
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    font-weight: 300;
}

/* ── Click mode ── */
.ime-click-mode .ime-pin-wrap:hover .ime-card {
    opacity: 0; transform: scale(0.93); pointer-events: none;
}
.ime-click-mode .ime-pin-wrap.ime-active .ime-card {
    opacity: 1; transform: scale(1); pointer-events: auto;
}

/* ── Mobile stacked ── */
.ime-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}
.ime-mobile-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(50,47,47,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px 20px;
}
.ime-mobile-dot {
    width: 12px; height: 12px; min-width: 12px;
    border-radius: 50%;
    background: var(--pin-color, #9b2626);
    margin-top: 4px;
    box-shadow: 0 0 0 4px rgba(155,38,38,0.22);
}
.ime-mobile-card h4 {
    margin: 0 0 7px;
    font-size: 14px; font-weight: 700;
    color: var(--card-title-color, #cc3333);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.ime-mobile-card p {
    margin: 0; font-size: 14px; line-height: 1.65;
    color: rgba(255,255,255,0.78);
}

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
    .ime-map-wrap { aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; }
    .ime-card { display: none !important; }
    .ime-pin svg { width: 22px !important; height: 32px !important; }
    .ime-pulse { width: 10px; height: 10px; }
    .ime-mobile-cards { display: flex; }
}
@media (max-width: 480px) {
    .ime-map-wrap { aspect-ratio: 1/0.9; border-radius: 8px; }
    .ime-pin svg { width: 16px !important; height: 24px !important; }
    .ime-mobile-card { padding: 14px 16px; }
}

/* ── Elementor editor preview ── */
.elementor-editor-active .ime-card {
    opacity: 0.6 !important;
    transform: scale(1) !important;
    pointer-events: none !important;
    display: flex !important;
}

/* ── Pins-only: city label under pin ── */
.ime-pin-wrap--solo {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -100%);
}
/* override the base transform since it's also set on .ime-pin-wrap */
.ime-pin-wrap--solo { transform: translate(-50%, -85%); }

.ime-pin-label {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
}

/* Pins-only simple mobile row */
.ime-mobile-card--simple {
    align-items: center;
    padding: 12px 18px;
}
.ime-mobile-card--simple h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--card-title-color, #cc3333);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
