/* GALLERY MAP */
.gallery-map-container {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    position: relative;
}

#galleryMap {
    width: 100%;
    height: 100%;
}

/* Ocultar marca de agua de Leaflet */
.leaflet-control-attribution {
    display: none !important;
}

.leaflet-bottom.leaflet-right {
    display: none !important;
}

.gallery-map-marker {
    background: transparent;
    border: none;
}

.marker-photo-wrapper {
    position: relative;
}

.marker-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f3f4f6;
}

.marker-photo-inner {
    width: 100%;
    height: 100%;
}

.marker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.marker-pin-pointer {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.marker-location-dot {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #8b5cf6;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-map-marker:hover .marker-photo {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: #8b5cf6;
}

.gallery-map-marker:hover .marker-pin-pointer {
    border-top-color: #8b5cf6;
}

.gallery-map-marker:hover .marker-location-dot {
    background: #ec4899;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.map-popup-content {
    display: flex;
    flex-direction: column;
}

.map-popup-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f3f4f6;
}

.map-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.map-popup-image:hover img {
    transform: scale(1.05);
}

.map-popup-info {
    padding: 1rem;
}

.map-popup-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.map-popup-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
}

.map-popup-location i {
    font-size: 0.9375rem;
}

.map-popup-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Clusters mejorados */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.marker-cluster-small:hover,
.marker-cluster-medium:hover,
.marker-cluster-large:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: rgba(255, 255, 255, 0.95);
    color: #8b5cf6;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.marker-cluster-medium {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
}

.marker-cluster-medium div {
    color: #ec4899;
}

.marker-cluster-large {
    background: linear-gradient(135deg, #f97316 0%, #eab308 100%);
}

.marker-cluster-large div {
    color: #f97316;
}

/* Quitar outline de selección en marcadores */
.custom-photo-marker,
.custom-photo-marker *,
.marker-cluster,
.marker-cluster * {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.custom-photo-marker img {
    outline: none !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.gallery-map-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.gallery-map-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.gallery-map-title i {
    font-size: 2rem;
    color: #8b5cf6;
}



.gallery-map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f9fafb;
}

.gallery-map-loading i {
    font-size: 3rem;
    color: #8b5cf6;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .gallery-map-container {
        height: 400px;
        border-radius: 12px;
    }

    .gallery-map-title {
        font-size: 1.5rem;
    }

    .leaflet-popup-content {
        width: 240px !important;
    }

    .map-popup-image {
        height: 150px;
    }

    .marker-photo {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }
    
    .marker-pin-pointer {
        bottom: -8px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid white;
    }
    
    .marker-location-dot {
        bottom: -12px;
        width: 5px;
        height: 5px;
    }
}
