@font-face {
    font-family: "Avenir Next";
    src: url("https://cdn.ebnermediagroup.de/fonts/avenir-next/AvenirNext-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    font-family: "Avenir Next", sans-serif;
}

#map-container {
    position: relative;
    width: 1400px;
    height: 1400px;
    margin: auto;
}

#map-container img {
    width: 1400px;
    height: 1400px;
    display: block;
}

.marker {
    position: absolute;
    width: 90px;
    height: 20px;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

#popup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    text-align: left;
    box-sizing: border-box;
    padding: 12px 16px 14px;
    z-index: 100;
    width: max-content;
    white-space: nowrap;
    background-color: #FFFFFF;
    border-top: 4px solid #154768;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(16, 32, 48, 0.25), 0 1px 3px rgba(16, 32, 48, 0.15);
    pointer-events: none; /* disable clicks when hidden */
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#popup.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto; /* clickable when visible */
}

#popup.hidden { display: none; }

/* Arrow pointing at the marker; side set by data-placement, offset by --arrow-x / --arrow-y */
#popup::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    transform: rotate(45deg);
}

#popup[data-placement^="top"]::after {
    bottom: -6px;
    left: calc(var(--arrow-x) - 6px);
    box-shadow: 3px 3px 4px rgba(16, 32, 48, 0.12);
}

#popup[data-placement^="bottom"]::after {
    top: -10px;
    left: calc(var(--arrow-x) - 6px);
    background: #154768;
}

#popup[data-placement="middle-right"]::after {
    left: -6px;
    top: calc(var(--arrow-y) - 6px);
}

#popup[data-placement="middle-left"]::after {
    right: -6px;
    top: calc(var(--arrow-y) - 6px);
}

#popup[data-placement="fallback"]::after { display: none; }

#popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #154768;
}

#popup a {
    display: inline-block;
    margin-top: 4px;
    color: #23262f;
    font-weight: 700;
    font-size: 15px;
    font-style: normal;
    line-height: 1.4;
    letter-spacing: -0.015rem;
    text-decoration: none;
}

#popup a::after {
    content: "→";
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

#popup a:hover {
    color: #154768;
    text-decoration: underline;
}

#popup a:hover::after {
    transform: translateX(3px);
}

