
/* ===== EKSPLORASI & PETA INTERAKTIF ===== */
.explore-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(14, 95, 100, 0.1), rgba(31, 141, 147, 0.15));
    filter: blur(40px);
    will-change: transform;
    transform: translateZ(0);
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

.explore-container {
    display: flex;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.explore-content {
    flex: 1;
}

.explore-map {
    flex: 1;
}

.map-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1654.55 / 1882.51; /* Preserve peta.svg aspect ratio */
    background: transparent;
    border-radius: 16px;
    overflow: visible;
    transform: scale(1.44) translateX(10%) translateY(10%);
    transform-origin: center center;
    margin: 5% 0;
}

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

/* Hotspot Markers */
.hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hotspot-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(14, 95, 100, 0.4);
    transition: all 0.3s ease;
}

.hotspot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse 2s infinite;
    will-change: transform, opacity;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.hotspot:hover .hotspot-dot {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 6px 20px rgba(14, 95, 100, 0.6);
}

/* Hotspot Popup */
.hotspot-popup {
    position: absolute;
    top: 50%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
    pointer-events: none;
}

.hotspot:hover .hotspot-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.popup-right {
    left: calc(100% + 20px);
}

.popup-left {
    right: calc(100% + 20px);
}

.popup-connector {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    background: var(--primary);
    transform: translateY(-50%);
}

.popup-right .popup-connector {
    left: -20px;
}

.popup-left .popup-connector {
    right: -20px;
}

.popup-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 280px;
    max-width: 320px;
}

.popup-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.popup-info {
    padding: 1.25rem;
}

.popup-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.popup-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .explore-container {
        flex-direction: column;
    }
    
    .map-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .popup-card {
        min-width: 240px;
        max-width: 280px;
    }
    
    .hotspot-popup {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%) scale(0.9);
    }
    
    .hotspot:hover .hotspot-popup {
        transform: translateX(-50%) scale(1);
    }
    
    .popup-connector {
        display: none;
    }
}

/* ===== INTERACTIVE TOURISM MAP PINS ===== */

/* Map Image */
.tourism-map-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Pins Layer */
.tourism-pins-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through to empty areas */
}

/* Location Pin Marker */
.location-pin {
    position: absolute;
    width: 14px;
    height: 18px;
    transform: translate(-50%, -100%); /* Point tip at coordinate */
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    color: #ffffff; /* Solid white for better visibility */
}

.location-pin:hover {
    z-index: 1000;
}

.location-pin.pin-inactive {
    opacity: 0.2;
    pointer-events: none;
}

.location-pin.pin-inactive .location-pin-icon {
    animation-play-state: paused;
}

.location-pin {
    transition: opacity 0.5s ease;
}

/* Pause animation on all pins except the hovered one */
#tourismPinsLayer.pins-hovered .location-pin:not(:hover) .location-pin-icon {
    animation-play-state: paused;
}

.location-pin-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pinGlowPulse 2.5s ease-in-out infinite;
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.location-pin-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: #0a4d6b;
    stroke-width: 1;
    filter:
        drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 6px rgba(31, 141, 147, 1))
        drop-shadow(0 0 10px rgba(31, 141, 147, 0.6));
}

.location-pin:hover .location-pin-icon {
    animation-duration: 1.2s;
    transform: scale(1.15);
}

.location-pin:hover .location-pin-icon svg {
    filter:
        drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 10px rgba(31, 141, 147, 1))
        drop-shadow(0 0 16px rgba(31, 141, 147, 0.8))
        drop-shadow(0 0 22px rgba(31, 141, 147, 0.4));
}

/* Eye-catching LED glow pulse animation with bounce */
@keyframes pinGlowPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.95;
    }
    25% {
        transform: translateY(-3px) scale(1.03);
        opacity: 0.98;
    }
    50% {
        transform: translateY(0) scale(1.05);
        opacity: 1;
    }
    75% {
        transform: translateY(-3px) scale(1.03);
        opacity: 0.98;
    }
}

/* Floating Information Card */
.pin-info-card {
    position: absolute;
    background: white;
    border-radius: 8px;
    padding: 8px 11px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 100;
    white-space: normal;
    min-width: 140px;
    max-width: 196px;
    width: max-content;
}

.location-pin:hover .pin-info-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Card positioning classes (dynamically added by JS) */
.pin-info-card.card-top {
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -10px);
    margin-bottom: 10px;
}

.location-pin:hover .pin-info-card.card-top {
    transform: translate(-50%, 0);
}

.pin-info-card.card-bottom {
    top: 100%;
    left: 50%;
    transform: translate(-50%, -10px);
    margin-top: 10px;
}

.location-pin:hover .pin-info-card.card-bottom {
    transform: translate(-50%, 0);
}

.pin-info-card.card-left {
    right: 100%;
    top: 50%;
    transform: translate(10px, -50%);
    margin-right: 10px;
}

.location-pin:hover .pin-info-card.card-left {
    transform: translate(0, -50%);
}

.pin-info-card.card-right {
    left: 100%;
    top: 50%;
    transform: translate(-10px, -50%);
    margin-left: 10px;
}

.location-pin:hover .pin-info-card.card-right {
    transform: translate(0, -50%);
}

.pin-info-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.66rem;
    margin-bottom: 0.35rem;
}

.pin-info-desc {
    font-size: 0.56rem;
    color: #666;
    line-height: 1.35;
    font-weight: 400;
}

/* Responsive tweaks for map */
@media (max-width: 968px) {
    .location-pin {
        width: 16px;
        height: 16px;
    }
    
    .pin-info-card {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .pin-info-card {
        position: absolute !important;
        min-width: 100px !important;
        max-width: 120px !important;
        width: 120px !important;
        padding: 8px !important;
        z-index: 9999 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        /* Hapus reset posisi dari fixed sebelumnya agar kembali menggunakan card-left/right dll */
        bottom: auto;
        left: auto;
        top: auto;
        right: auto;
        margin: auto;
    }
    
    .pin-info-title {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }

    .pin-info-desc {
        font-size: 0.55rem !important;
        line-height: 1.3 !important;
    }
}
