* {
    box-sizing: border-box;
}

:root {
    --bg: #f3f3f0;
    --white: #ffffff;
    --text: #171717;
    --muted: #858585;
    --line: #e8e8e4;
    --soft: #f7f7f5;
    --black: #111111;
}

html {
    margin: 0;
    min-height: 100%;
    overflow-y: auto;
}

body {
    margin: 0;
    min-height: 100%;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    display: flex;
    flex-direction: column;

    -webkit-font-smoothing: antialiased;
}

/* =========================================
   HEADER
========================================= */

.header {
    height: 68px;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* =========================================
   LOGO (upravené)
========================================= */

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    transform: translateY(7px);
}

.logo-image {
    height: 48px;
    width: auto;
    display: block;
}

.logo-subtitle {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.05px;
    margin: 0 0 20px;
}

/* =========================================
   MODERN PIN — MULTI-MODE SYSTEM
========================================= */

.modern-pin {
    background: transparent !important;
    border: none !important;
}

.modern-pin span {
    display: block;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    position: relative;
}

.modern-pin span::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #111;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.modern-pin span.mode1 {
    background-color: #FFCC00;
    width: 30px;
    height: 30px;
    animation: markerPulse 1.8s ease-out infinite;
}

.modern-pin span.active {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(17, 17, 17, 0.15);
    border-radius: 50%;
    position: relative;
    animation: markerPulse 1.8s ease-out infinite;
}

.modern-pin span.active::after {
    width: 12px;
    height: 12px;
    background: #111;
    box-shadow: 0 0 0 3px #fff;
}

.modern-pin span.active.mode1 { background-color: white; }

@keyframes markerPulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(17, 17, 17, 0.30),
            0 5px 18px rgba(0, 0, 0, 0.20);
    }
    70% {
        box-shadow:
            0 0 0 14px rgba(17, 17, 17, 0),
            0 5px 18px rgba(0, 0, 0, 0.20);
    }
    100% {
        box-shadow:
            0 0 0 0 rgba(17, 17, 17, 0),
            0 5px 18px rgba(0, 0, 0, 0.20);
    }
}

/* =========================================
   REST OF ORIGINAL CSS (unchanged)
========================================= */

.project-count {
    padding: 7px 12px;
    background: #f6f6f4;
    border: 1px solid #e9e9e5;
    border-radius: 999px;
    color: #777;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

/* Hlavná časť má vždy výšku viewportu pod headerom.
   Footer je až pod ňou a zobrazí sa po scrollovaní. */
.main {
    flex: 0 0 auto;
    height: calc(100vh - 68px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
}

.map-container {
    min-width: 0;
    min-height: 0;
    position: relative;
    background: #e8e8e5;
}

#map {
    width: 100%;
    height: 100%;
}

.sidebar {
    min-height: 0;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

.sidebar-header {
    padding: 28px 25px 21px;
    border-bottom: 1px solid var(--line);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.65px;
    line-height: 1.2;
}

.sidebar-header p {
    margin: 8px 0 20px;
    color: #858585;
    font-size: 12px;
    line-height: 1.5;
}

#search {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #f7f7f5;
    border: 1px solid #e7e7e3;
    border-radius: 11px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#search::placeholder {
    color: #a0a09c;
}

#search:hover {
    background: #fff;
}

#search:focus {
    background: #fff;
    border-color: #d1d1cc;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.035);
}

.project-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #d7d7d2 transparent;
}

.project {
    padding: 17px 15px;
    margin-bottom: 2px;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, transform 0.18s ease;
}

.project:hover {
    background: #f6f6f4;
    transform: translateX(3px);
}

.project::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: transparent;
    border-radius: 10px;
    transition: background 0.18s ease;
}

.project:hover::before {
    background: #111;
}

.project h2 {
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 620;
    letter-spacing: -0.25px;
    line-height: 1.35;
}

.project-info {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 11px;
    color: #222;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.project-link::after {
    content: "↗";
    font-size: 11px;
    transition: transform 0.18s ease;
}

.project-link:hover {
    text-decoration: none;
}

.project-link:hover::after {
    transform: translate(2px, -2px);
}

.leaflet-container {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

.leaflet-control-zoom {
    margin-right: 18px !important;
    margin-bottom: 18px !important;
    border: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.13) !important;
}

.leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #222 !important;
    border: 0 !important;
    font-size: 17px !important;
    transition: background 0.15s ease;
}

.leaflet-control-zoom a:hover {
    background: #f2f2f0 !important;
}

.leaflet-control-attribution {
    padding: 4px 7px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    color: #888;
    font-size: 9px !important;
    backdrop-filter: blur(8px);
}

.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 18px;
    min-width: 195px;
}

.leaflet-popup-tip {
    box-shadow: none;
}

.leaflet-tile {
    filter: grayscale(0.9) brightness(1.09);
}

.popup h3 {
    margin: 0 0 1px;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.25px;
    line-height: 1.3;
}

.popup h4 {
    margin: 0 0 2px;
}

.popup p {
    margin: 0;
    color: #858585;
    font-size: 12px;
}

.popup a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eeeeeb;
    color: #151515;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.popup a::after {
    content: "↗";
    font-size: 12px;
}

.popup a:hover {
    opacity: 0.55;
}

.popup-status {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 8px 0 0;
    color: #777;
    font-size: 10px;
}

.status-icon {
    color: #444;
    font-size: 14px;
    line-height: 1;
}

.popup-distance {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 10px;
    color: #777;
    font-size: 11px;
}

.popup-distance span {
    color: #111;
    font-size: 12px;
}

.popup-apartments {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 0;
    color: #777;
    font-size: 12px;
}

.apartments-icon {
    color: #222;
    font-size: 16px;
    line-height: 1;
}

/* =========================================
   FOOTER
   HTML nemeníme:
   disclaimer = tmavý blok cez celú šírku
   columns = 2 stĺpce pod ním
========================================= */

footer {
    flex: 0 0 auto;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--line);
    color: #999;
    font-size: 11px;
    line-height: 1.45;
}

.footer-disclaimer {
    width: 100%;
    padding: 20px 30px;
    background: #31261D;
    color: #aaa;
    font-size: 14px;
    line-height: 1.2;
    
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 0px 30px 36px;
    background: #31261D;
    color: #aaa;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-col h3 {
    margin: 0 0 5px;
    color: #171717;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -0.1px;
}

.footer-col a {
    color: #858585;
    font-size: 11px;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: #171717;
}

.project-list::-webkit-scrollbar {
    width: 6px;
}

.project-list::-webkit-scrollbar-track {
    background: transparent;
}

.project-list::-webkit-scrollbar-thumb {
    background: #deded9;
    border-radius: 20px;
}

.project-list::-webkit-scrollbar-thumb:hover {
    background: #c9c9c3;
}

@media (max-width: 800px) {

    .header {
        height: 62px;
        padding: 0 16px;
    }

    .logo-image {
        height: 36px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .project-count {
        padding: 6px 9px;
        font-size: 10px;
    }

    .main {
        height: calc(100vh - 62px);
        grid-template-columns: 1fr;
        grid-template-rows: 55% 45%;
    }

    .sidebar {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .sidebar-header {
        padding: 20px 17px 16px;
    }

    .sidebar-header h1 {
        font-size: 18px;
    }

    .project-list {
        padding: 7px;
    }

    .project {
        padding: 14px;
    }

    .footer-disclaimer {
        padding: 16px 18px;
    }

    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        padding: 25px 18px 30px;
    }
    
    
}
