/* Stile für die Jahr-Legende */
.year-legend {
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: Arial, sans-serif;
    min-width: 150px;
    max-width: 350px;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: visible;
    max-height: none;
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: default; /* Zeige normalen Cursor statt Pointer */
    pointer-events: auto; /* Stellt sicher, dass die Legende Klick-Events erhält */
}

.year-legend:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.year-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    text-align: center;
}

/* Stile für die Karte und Pins */
.pin-icon {
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
    transition: all 0.2s ease;
}

.pin-icon:hover {
    transform: scale(1.2);
    filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.7));
}

/* Stile für benutzerdefinierte div-basierte Marker */
.custom-div-icon {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 25px;
    height: 25px;
    border-radius: 50% 50% 50% 0;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -12.5px 0 0 -12.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    border: 2px solid #ffffff;
}

.marker-pin::after {
    content: '';
    width: 15px;
    height: 15px;
    margin: 4px 0 0 4px;
    background-color: white;
    position: absolute;
    border-radius: 50%;
}

.custom-div-icon:hover .marker-pin {
    transform: rotate(-45deg) scale(1.3);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6);
    z-index: 9999;
}

/* Anpassungen für Popups */
.custom-popup {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 0;
    border: none;
}

.custom-popup .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 2px solid #4caf50;
}

.custom-popup .leaflet-popup-tip {
    background-color: #4caf50;
}

.custom-popup .leaflet-popup-close-button {
    color: #333;
    font-size: 18px;
    padding: 4px;
    top: 5px;
    right: 5px;
}

/* Innenbereich des Popups */
.pin-popup {
    padding: 5px 10px;
}

.pin-popup h3 {
    margin: 5px 0 10px 0;
    color: #2c7a2e;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
}

.pin-detail {
    margin: 8px 0;
}

.pin-label {
    font-weight: bold;
    color: #333;
}

.pin-value {
    color: #0056b3;
}

.pin-description {
    margin: 10px 0;
    font-style: italic;
    text-align: justify;
    line-height: 1.4;
}

.pin-image {
    margin: 10px 0;
    text-align: center;
}

.pin-image img {
    width: 60%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Zusätzlicher Stil für kompaktere Bilder */
.compact-image {
    max-width: 60% !important;
    max-height: 100px !important;
    margin: 5px auto;
}

.pin-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.pin-links {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.pin-link {
    color: #2c7a2e;
    text-decoration: none;
    font-weight: bold;
    padding: 3px 8px;
    transition: all 0.2s ease;
}

.pin-link:hover {
    background-color: #eaf7ea;
    border-radius: 4px;
    color: #0a5a0c;
    text-decoration: none;
}

/* Spezielle Pin-Typen */
.custom-popup.special .leaflet-popup-content-wrapper {
    border-color: #e74c3c;
}

.custom-popup.special .leaflet-popup-tip {
    background-color: #e74c3c;
}

.custom-popup.special h3 {
    color: #c0392b;
}
