*, *:before, *:after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* MAP fills the space between header (64px) and footer (32px) */
#map {
    position: fixed;
    top: 64px; left: 0;
    width: 100vw;
    height: calc(100vh - 64px - 32px);
    z-index: 0;
}

/* Header floats fixed above the map */
.header-block {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    margin: 0;
}
nav {
    position: fixed;
}

/* POPUP */
.custom-popup .leaflet-popup-content-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
    padding: 0;
    overflow: hidden;
    width: 220px;
}
.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 220px !important;
}
.custom-popup .leaflet-popup-tip-container { display: none; }

.popup-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}
.popup-img-placeholder {
    width: 100%;
    height: 80px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 28px;
}
.popup-body {
    padding: 10px 12px 12px;
    text-align: center;
}
.popup-title {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.3;
}
.popup-link {
    display: inline-block;
    padding: 5px 14px;
    background: #007bff;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.popup-link:hover { background: #0056b3; }

/* PING animation */
@keyframes ping {
    0%   { transform: scale(0.8); opacity: 0.7; }
    70%  { transform: scale(2.4); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}
.ping-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.4);
    animation: ping 2.5s ease-out infinite;
    pointer-events: none;
}

/* FOOTER */
#footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    height: 32px;
    background: #1e3144;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
}
#footer a {
    color: #ffffff;
    text-decoration: none;
}
#footer a:hover {
    text-decoration: underline;
}
