/* ================================================
   SF Mapa de Edificios — editorial minimal
   ================================================ */

.sf-mapa-wrapper {
    width: 100%;
    min-height: 400px;
    border-radius: 2px;
    overflow: hidden;
    background: #f5f5f2;
    position: relative;
    z-index: 1;
}

.sf-mapa-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 16px;
}

/* ========== MARCADOR PIN ========== */
.sf-mapa-marker-wrap {
    background: transparent !important;
    border: none !important;
}

.sf-mapa-pin {
    position: relative;
    width: 40px;
    height: 52px;
    transition: transform 0.2s ease;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

.sf-mapa-pin:hover {
    transform: translateY(-4px) scale(1.08);
}

.sf-mapa-pin-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a3a5c;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sf-mapa-pin::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 14px solid #1a3a5c;
    z-index: -1;
}

.sf-mapa-pin-letra {
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    font-style: italic;
}

.sf-mapa-pin-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* ========== MODO IMAGEN COMPLETA ========== */
.sf-mapa-pin-img {
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}
.sf-mapa-pin-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.sf-mapa-pin-img:hover {
    transform: translateY(-4px) scale(1.08);
}
.sf-mapa-pin-img.is-destacado {
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
    animation: sf-mapa-pulse 2.2s ease-in-out infinite;
    z-index: 500;
}
.sf-mapa-pin-img.is-destacado:hover {
    animation: none;
    transform: translateY(-6px) scale(1.1);
}

/* ========== PIN DESTACADO ========== */
.sf-mapa-pin.is-destacado {
    width: 48px;
    height: 62px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.4));
    animation: sf-mapa-pulse 2.2s ease-in-out infinite;
}

.sf-mapa-pin.is-destacado .sf-mapa-pin-body {
    width: 48px;
    height: 48px;
    border: 4px solid #fff;
    /* background se setea con CSS inline por el shortcode */
}

.sf-mapa-pin.is-destacado::after {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid;
    /* border-top-color se setea con CSS inline */
    bottom: 3px;
}

.sf-mapa-pin.is-destacado .sf-mapa-pin-letra {
    font-size: 22px;
}

.sf-mapa-pin.is-destacado .sf-mapa-pin-logo {
    width: 26px;
    height: 26px;
}

/* halo sutil detrás del pin destacado */
.sf-mapa-pin.is-destacado::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -6px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.18;
    animation: sf-mapa-halo 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

@keyframes sf-mapa-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes sf-mapa-halo {
    0%, 100% { transform: scale(1); opacity: 0.18; }
    50% { transform: scale(1.3); opacity: 0.05; }
}

.sf-mapa-pin.is-destacado:hover {
    animation: none;
    transform: translateY(-6px) scale(1.1);
}

/* ========== POPUP ========== */
.sf-mapa-popup .leaflet-popup-content-wrapper {
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    padding: 0;
    overflow: hidden;
}
.sf-mapa-popup .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    line-height: 1.4;
}
.sf-mapa-popup .leaflet-popup-tip {
    background: #fff;
}
.sf-mapa-popup .leaflet-popup-close-button {
    color: #111 !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    padding: 6px 10px !important;
    width: auto !important;
    height: auto !important;
    background: rgba(255,255,255,0.95) !important;
    border-radius: 50% !important;
    top: 8px !important;
    right: 8px !important;
    line-height: 1 !important;
    z-index: 10 !important;
    text-decoration: none !important;
}
.sf-mapa-popup .leaflet-popup-close-button:hover {
    color: #d4361a !important;
}

/* ========== CARD ========== */
.sf-card {
    width: 300px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.sf-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}
.sf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.08) contrast(1.02);
    transition: filter 0.4s ease, transform 0.6s ease;
}
.sf-card:hover .sf-card-img img {
    filter: grayscale(0) contrast(1);
    transform: scale(1.04);
}
.sf-card-body {
    padding: 20px 22px 22px;
}
.sf-card-titulo {
    margin: 0 0 10px !important;
    font-family: Georgia, 'Times New Roman', 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    color: #0a0a0a;
    letter-spacing: -0.01em;
    padding: 0 !important;
    border: none !important;
}
.sf-card-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 12px;
}
.sf-card-dir {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    line-height: 1.5;
    padding-top: 10px;
    border-top: 1px solid #e8e8e4;
}

/* ========== MOBILE ========== */
@media (max-width: 640px) {
    .sf-mapa-wrapper {
        min-height: 320px;
    }
    .sf-mapa-popup .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 40px);
    }
    .sf-card {
        width: 260px;
    }
    .sf-card-body {
        padding: 16px 18px 18px;
    }
    .sf-card-titulo {
        font-size: 19px;
    }
    .sf-card-desc {
        font-size: 13px;
    }
    .sf-card-dir {
        font-size: 11px;
    }
}

/* ========== CONTROLES ========== */
.sf-mapa-wrapper .leaflet-control-zoom a {
    background: #fff;
    color: #111;
    border: none;
    font-weight: 400;
    font-size: 18px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.sf-mapa-wrapper .leaflet-control-zoom a:hover {
    background: #111;
    color: #fff;
}
.sf-mapa-wrapper .leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}
.sf-mapa-wrapper .leaflet-control-attribution {
    background: rgba(255,255,255,0.85);
    font-size: 10px;
    padding: 2px 8px;
}
