/* Mapa Interactivo - Fortalezas del Rey Lobo */
/* Archivo CSS para integración en Drupal */

.mapa-interactivo {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.mapa-interactivo img {
    width: 100%;
    height: auto;
    display: block;
}

.hotspot-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.hotspot-pulse {
    width: 100%;
    height: 100%;
    background-color: #a82626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.hotspot-pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #a82626;
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.hotspot:hover .hotspot-pulse {
    transform: scale(1.2);
}

.tooltip {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 20px;
    width: 250px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.tooltip.active {
    opacity: 1;
    pointer-events: auto;
}

.tooltip h5 {
    color: #a82626;
    margin-bottom: 10px;
    font-size: 16px;
}

.tooltip p {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.tooltip a {
    color: #a82626;
    text-decoration: none;
    font-weight: bold;
}

.tooltip a:hover {
    text-decoration: underline;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .hotspot {
        width: 25px;
        height: 25px;
    }

    .hotspot-pulse {
        font-size: 12px;
    }

    .tooltip {
        width: 200px;
        padding: 15px;
    }

    .tooltip h5 {
        font-size: 14px;
    }

    .tooltip p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hotspot {
        width: 20px;
        height: 20px;
    }

    .hotspot-pulse {
        font-size: 11px;
    }

    .tooltip {
        width: 180px;
        padding: 12px;
        font-size: 12px;
    }

    .tooltip h5 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .tooltip p {
        font-size: 12px;
    }
}

/* Ajuste para tooltips que se salen de la pantalla */
.tooltip.adjust-left {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.tooltip.adjust-left::after {
    left: auto;
    right: 20px;
    transform: translateX(0);
}

.tooltip.adjust-right {
    left: 0;
    transform: translateX(0);
}

.tooltip.adjust-right::after {
    left: 20px;
    transform: translateX(0);
}