.sicily-map-container {
    width: 100%;
    margin: 0 auto;
}

.sicily-map {
    width: 100%;
    height: auto;
    display: block;
}

.sicily-map-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background: white;
    padding-bottom: 8rem;
    position: relative;
    z-index: 0;
}

#map {
    width: 100%;
    max-width: 1200px;
    height: 65vh;
    background: #9ddcf0;
}

#map::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: linear-gradient(to bottom, #f8f8fa, transparent 15%);
}

.marker-has-tooltip .marker-label {
    display: none;
}

.sicily-map-tooltip {
    position: fixed;
    z-index: 9999;
    background: #fff;
    color: #333;
    font-family: "Roboto Condensed", arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    padding: 7px 11px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sicily-map-tooltip.visible {
    opacity: 1;
}

.sicily-map-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fff;
}

/* Marker style similar to your map */
.marker {
    width: 5px;
    height: 5px;
    background: black;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.marker-label {
    position: absolute;
    white-space: nowrap;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 8px;
    color: #2c3e50;
    padding: 2px 6px;
}

.marker-label-multiline {
    white-space: pre-line;
    text-align: center;
    line-height: 1.2;
}

.marker-label-bottom {
    left: 50%;
    top: calc(100% + 1.1rem);
    transform: translateX(-50%);
}

.marker-label-top {
    left: 50%;
    bottom: calc(100% + 1.1rem);
    transform: translateX(-50%);
}

.marker-label-left {
    right: calc(100% + 0.1rem);
    top: 50%;
    transform: translateY(-50%);
}

.marker-label-right {
    left: calc(100% + 0.2rem);
    top: 50%;
    transform: translateY(-50%);
}

.marker-label-large {
    font-size: 11px;
    font-weight: 400;
    padding: 3px 8px;
}

/* Highlighted orange marker */
.marker-active {
    width: 8px;
    height: 8px;
    background: #ff5722;
    border-width: 5px;
}

/* Marker stacking order: hovered > active > inactive */
.maplibregl-marker { z-index: 1; }
.maplibregl-marker.marker-active { z-index: 2; }
.maplibregl-marker.marker:hover { z-index: 3; }

.marker-pin {
    width: 0;
    height: 0;
    background: none;
    border: none;
    box-shadow: none;
    position: relative;
}

.marker-pin.marker-active::before {
    transform: rotate(-45deg) translate(-50%, -50%) scale(1.2);
}

.marker-pin::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: #ff5722;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg) translate(-50%, -50%);
    top: -12px;
    left: 6px;
}

#map .maplibregl-ctrl-scale {
    background-color: unset;
    height: 6px;
    border: 1.5px solid #333;
    border-top: #333;
    margin: 0px 0px 15px 75px;
    line-height: 0.5;
    text-indent: -40px;
}

canvas {
    outline: none;
}

.maplibregl-cooperative-gesture-screen {
    display: none !important;
}

@media only screen and (min-width: 601px) {
    .sicily-map-wrapper {
        display: none;
    }

    #map {
        height: 700px;
        max-height: 65vh;
        background: #eeedeb;
    }

    .marker {
        width: 24px;
        height: 24px;
        background: transparent;
        border: none;
        box-shadow: none;
        zoom: 1;
        transition: none !important;
    }

    .marker-pin::after {
        display: none;
    }

    .marker::after {
        content: '';
        position: absolute;
        width: 8px;
        height: 8px;
        background: black;
        border-radius: 50%;
        border: 8px solid white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: transform 0.2s ease;
    }

    .marker-label {
        font-size: 12px;
    }

    .marker-label-left {
        right: calc(100% + 1.1rem);
    }

    .marker-label-right {
        left: calc(100% + 1.1rem);
    }

    .marker-label-large {
        font-size: 16px;
        font-weight: 500;
    }

    /* Highlighted orange marker */
    .marker-active:not(.marker-pin)::after,
    .marker:hover:not(.marker-pin)::after {
        transform: translate(-50%, -50%) scale(1.3);
        background: #ff5722;
    }

    .marker-pin::before {
        transition: transform 0.2s ease;
    }

    .marker-pin.marker-active::before,
    .marker-pin:hover::before {
        transform: rotate(-45deg) translate(-50%, -50%) scale(1.2);
    }

    #map::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 5;
        background:
            linear-gradient(to left, white, transparent 60%),
            linear-gradient(to bottom, white, transparent 25%),
            linear-gradient(to left bottom, white, transparent 60%);
    }
}