body {
    margin: 0;
}

#map {
    width: 100%;
    height: 100vh;
    position: relative;
}

.map-message {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: min(90vw, 480px);
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(43, 43, 43, 0.95);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.thumb-marker {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0,0,0,.4);
}

.leaflet-container .leaflet-marker-pane .thumb-marker img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================
   Popup Leaflet
   ========================== */

.leaflet-popup-content-wrapper {
    background: #2b2b2b;
    color: #e8e8e8;
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: #2b2b2b;
}

.leaflet-popup-content {
    margin: 14px;
    color: #e8e8e8;
}

.wide-popup .leaflet-popup-content {
    width: min(480px, calc(100vw - 120px));
}

@media (max-width: 768px) {
    .wide-popup .leaflet-popup-content {
        width: min(336px, calc((100vw - 120px) * 0.7));
    }
}

.leaflet-popup-content h3 {
    margin-top: 0;
    color: #ffffff;
}

.leaflet-popup-content a {
    color: #8fc8ff;
}

.popup-image {
    width: 100%;
    max-width: 100%;
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.popup-media {
    position: relative;
    display: block;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.popup-media--video::after {
    content: "▶";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(25, 25, 25, 0.72);
    color: #ffffff;
    font-size: 34px;
    line-height: 72px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.popup-media--video .popup-image {
    margin-bottom: 0;
}

#lightbox-image[hidden],
#lightbox-video-wrapper[hidden] {
    display: none;
}

#lightbox-video-wrapper {
    width: min(92vw, 1280px);
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 30px rgba(0,0,0,.7);
}

#lightbox-video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================
   Lightbox
   ========================== */

#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(25,25,25,.96);
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,.7);
}

#lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    font-size: 34px;
    line-height: 34px;
    color: #ffffff;
    background: none;
    border: 0;
    cursor: pointer;
}

#lightbox-close:hover {
    opacity: .7;
}
