#archive-map {
    width: 100%;
    height: 420px;
    transition: opacity .3s ease, height .3s ease;
    margin-bottom: 3rem;
}

#archive-map.is-hidden {
    opacity: 0;
    height: 0;
    pointer-events: none;
    overflow: hidden;
}

#archive-map.is-visible {
    opacity: 1;
    height: 420px;
    pointer-events: auto;
}

/* Wrapper für Pin + Karte */
.map-marker-wrapper {
    position: relative;
    width: 0;
    height: 0;
    z-index: 10;
    transition: z-index 0.2s ease;
    pointer-events: auto;
    touch-action: manipulation;
}

/* Pin */
.map-pin {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Zentriert den Kreis vertikal & horizontal */
    cursor: pointer;
    display: block;
}

/* Karte */
.map-card {
    position: absolute;
    bottom: 10px; /* Abstand über dem Pin */
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,.25);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    touch-action: manipulation;
}

.map-card img {
    border-radius: 8px 8px 0 0;
}

.map-card::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}

/* Karte aktiv */
.map-marker-wrapper .map-card {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.96);
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.map-marker-wrapper .map-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-14px) scale(1);
    box-shadow: 0 12px 30px rgba(0,0,0,.28);
    transition:
            opacity 0.25s ease-out,
            transform 0.25s cubic-bezier(.2,.8,.2,1),
            box-shadow 0.25s ease-out;
}

/* Bild in Karte */
.map-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Textbereich Karte */
.map-card-content {
    padding: 10px;
}

.map-card.active a:focus,
.map-card.active a:hover {
    color: inherit;
}

.map-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.map-card .meta {
    font-size: 12px;
    color: #666;
}

.map-card .price {
    margin-top: 6px;
    font-weight: bold;
    color: #c00;
}

.map-card::after {
    transition: opacity 0.25s ease-out;
    opacity: 0;
}

.map-card.active::after {
    opacity: 1;
}
