/* ============================================================
   Mapa projektů — Férovémilovice (redesign)
   ============================================================ */

.fm-mapa-page {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--fm-svetla, #f4f7fb);
}

/* ---- HERO PRUH ---- */
.fm-mapa-hero {
    background: linear-gradient(115deg, var(--fm-modra-tmava, #143f63), var(--fm-modra, #1d5b8f));
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.fm-mapa-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -6%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(240,100,73,0.30), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.fm-mapa-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 24px 34px;
}
.fm-mapa-hero-text h1 {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin: 8px 0 12px;
    line-height: 1.08;
}
.fm-mapa-hero-text p {
    color: rgba(255,255,255,0.9);
    font-size: 1.08rem;
    max-width: 52ch;
    margin: 0;
    line-height: 1.5;
}
.fm-eyebrow--light {
    color: #ffd9d0;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* ---- Editační lišta pro admina ---- */
.fm-edit-info {
    background: #fff8e1;
    border-bottom: 1px solid #f0d97d;
    color: #5a4a00;
    font-size: 0.85rem;
    padding: 8px 16px;
    flex-shrink: 0;
    z-index: 1001;
    text-align: center;
}

/* ---- Lišta s filtry ---- */
.fm-filtry {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #e6ebf1;
    overflow-x: auto;
    flex-shrink: 0;
    z-index: 1000;
    position: relative;
    justify-content: center;
    flex-wrap: wrap;
}
@media (max-width: 720px) {
    .fm-filtry { justify-content: flex-start; flex-wrap: nowrap; }
}
.fm-filtr-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px !important;
    border: 1px solid #d3dde8 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #365068 !important;
    font-size: 0.88rem !important;
    font-weight: 500;
    cursor: pointer !important;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    line-height: 1.4 !important;
}
.fm-filtr-btn:hover {
    border-color: var(--fm-modra, #1d5b8f) !important;
    box-shadow: 0 2px 8px rgba(29,91,143,0.12);
}
.fm-filtr-btn.aktivni {
    background: var(--fm-modra, #1d5b8f) !important;
    border-color: var(--fm-modra, #1d5b8f) !important;
    color: #fff !important;
}
.fm-filtr-btn.aktivni .fm-filtr-tecka { box-shadow: 0 0 0 2px rgba(255,255,255,0.6); }

/* Barevná tečka v tlačítku filtru (dle kategorie) */
.fm-filtr-tecka {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #999;
}
.fm-filtr-tecka[data-kat="centrum"]        { background: #c9a227; }
.fm-filtr-tecka[data-kat="doprava"]        { background: #2196f3; }
.fm-filtr-tecka[data-kat="infrastruktura"] { background: #7a8794; }
.fm-filtr-tecka[data-kat="skoly"]          { background: #ff9800; }
.fm-filtr-tecka[data-kat="senori"]         { background: #9c27b0; }
.fm-filtr-tecka[data-kat="sport"]          { background: #2e9c4a; }
.fm-filtr-tecka[data-kat="spolky"]         { background: #e91e63; }

/* ---- Kontejner mapa + sidebar ---- */
.fm-mapa-kontejner {
    height: calc(100vh - 80px);
    min-height: 520px;
    max-height: 760px;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ---- Leaflet mapa ---- */
#fm-mapa {
    flex: 1 1 auto;
    min-height: 400px;
    height: 100%;
    z-index: 0;
    background: #e8edf2;
}

/* Vlastní teardrop pin */
.fm-pin {
    width: 30px; height: 30px;
    display: block;
}
.fm-pin-tvar {
    width: 30px; height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2.5px solid #fff;
    box-shadow: 0 3px 8px rgba(20,40,60,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease;
}
.fm-pin-tvar span {
    transform: rotate(45deg);
    font-size: 13px;
    line-height: 1;
    color: #fff;
    font-weight: 700;
}
.fm-pin:hover .fm-pin-tvar { transform: rotate(-45deg) scale(1.15); }
.fm-pin--neumisteno { opacity: 0.55; }

/* Výzva "klikněte na bod" (desktop, dokud není sidebar otevřen) */
.fm-mapa-navod {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,40,60,0.85);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    z-index: 500;
    pointer-events: none;
    transition: opacity 0.2s;
}
.fm-mapa-navod.skryto { opacity: 0; }
@media (max-width: 768px) { .fm-mapa-navod { bottom: 12px; } }

/* ---- Sidebar — desktop ---- */
.fm-sidebar {
    width: 380px;
    background: #fff;
    border-left: 1px solid #e6ebf1;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    flex-shrink: 0;
    z-index: 10;
    box-shadow: -8px 0 24px rgba(20,40,60,0.06);
}
.fm-sidebar.otevreny { transform: translateX(0); }

/* Sidebar — mobil/tablet (slide zdola) */
@media (max-width: 768px) {
    .fm-mapa-kontejner {
        height: calc(100dvh - 60px);
        min-height: 480px;
        max-height: none;
    }
    #fm-mapa { min-height: 360px; }

    .fm-sidebar {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        width: 100%;
        max-height: 72%;
        transform: translateY(100%);
        border-left: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -6px 24px rgba(20,40,60,0.18);
        z-index: 1000;
    }
    .fm-sidebar.otevreny { transform: translateY(0); }
    /* úchyt pro tažení (vizuální) */
    .fm-sidebar::before {
        content: '';
        position: sticky;
        top: 0;
        display: block;
        width: 40px; height: 4px;
        margin: 10px auto 0;
        background: #d3dde8;
        border-radius: 2px;
    }
}

.fm-sidebar-obsah { padding: 0 0 24px; }

.fm-sidebar-zavrit {
    position: absolute;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    color: #365068;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(20,40,60,0.2);
    z-index: 5;
    transition: background 0.15s;
}
.fm-sidebar-zavrit:hover { background: #fff; color: var(--fm-koral, #f06449); }

/* Foto nahoře přes celou šířku */
.fm-sidebar-foto {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}
.fm-sidebar-foto-placeholder {
    width: 100%;
    height: 96px;
    background: linear-gradient(115deg, var(--fm-modra-tmava, #143f63), var(--fm-modra, #1d5b8f));
}

.fm-sidebar-telo { padding: 20px 22px 0; }

/* Badge kategorie */
.fm-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    background: var(--fm-modra, #1d5b8f);
}

.fm-sidebar h2 {
    font-size: 1.35rem;
    margin: 0 0 12px;
    line-height: 1.2;
    color: var(--fm-text, #16222e);
}
.fm-sidebar-navrh {
    color: var(--fm-text-mid, #55636f);
    font-size: 0.98rem;
    margin-bottom: 22px;
    line-height: 1.6;
}

/* Garant kartička */
.fm-sidebar-garant {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--fm-text, #16222e);
    background: var(--fm-svetla, #f4f7fb);
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background 0.15s;
}
.fm-sidebar-garant:hover { background: #e9eff6; }
.fm-sidebar-garant img {
    width: 46px; height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.fm-sidebar-garant strong { font-size: 0.95rem; display: block; }
.fm-sidebar-garant span { color: var(--fm-text-mid, #55636f); font-size: 0.8rem; display: block; }

/* Odkaz na téma */
.fm-sidebar-tema {
    font-size: 0.9rem;
    margin: 0;
}
.fm-sidebar-tema a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fm-modra, #1d5b8f);
    text-decoration: none;
    font-weight: 600;
}
.fm-sidebar-tema a:hover { text-decoration: underline; }

/* Breadcrumbs skryté — hero je dělá zbytečnými */
.fm-mapa-breadcrumbs { display: none; }

/* Leaflet ovládání sladěné */
.leaflet-control-zoom a {
    color: var(--fm-modra, #1d5b8f) !important;
    border-radius: 6px !important;
}
.leaflet-bar { box-shadow: 0 2px 10px rgba(20,40,60,0.18) !important; border: none !important; }
