/* BES Türkiye Haritası — modern, tam responsive */
.bes-harita-wrap{
    --bg:#ffffff; --panel:#f7f8fb; --line:#e5e8ef; --text:#0e1320;
    --muted:#5b6478; --accent:#0f6fff; --accent-2:#1746a2;
    --c0:#eef1f6; --c1:#cfe1ff; --c2:#86b4ff; --c3:#3a82f0; --c4:#1a4fbb;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    color:var(--text); background:var(--bg);
    border:1px solid var(--line); border-radius:14px;
    padding:clamp(12px, 2.4vw, 24px);
    box-shadow:0 1px 2px rgba(15,30,60,.04);
    -webkit-text-size-adjust:100%;
    box-sizing:border-box;
    width:100%; max-width:100%;
}
.bes-harita-wrap *,
.bes-harita-wrap *::before,
.bes-harita-wrap *::after{ box-sizing:border-box; }

.bes-harita-header{ text-align:center; margin-bottom:18px; }
.bes-harita-title{
    margin:0 0 6px;
    font-size:clamp(18px, 3.2vw, 26px);
    font-weight:800; letter-spacing:-.01em; line-height:1.2;
}
.bes-harita-desc{
    margin:0; color:var(--muted);
    font-size:clamp(12px, 2vw, 14px);
}

.bes-harita-stats{
    display:flex; justify-content:center; gap:10px; margin-top:14px; flex-wrap:wrap;
}
.bes-harita-stat{
    flex:1 1 100px;
    min-width:100px; max-width:200px;
    background:var(--panel); border:1px solid var(--line); border-radius:12px;
    padding:10px 14px; text-align:center;
}
.bes-harita-stat-num{
    display:block; font-weight:800; color:var(--accent); line-height:1;
    font-size:clamp(16px, 3vw, 22px);
}
.bes-harita-stat-lbl{
    display:block; color:var(--muted); margin-top:4px;
    text-transform:uppercase; letter-spacing:.04em;
    font-size:clamp(10px, 1.6vw, 12px);
}

.bes-harita-stage{
    display:grid; grid-template-columns: 1fr 320px; gap:18px; margin-top:18px;
}
@media (max-width: 980px){
    .bes-harita-stage{ grid-template-columns: 1fr; gap:14px; }
}

/* SVG harita */
.bes-harita-svg-box{
    position:relative; background:var(--panel); border:1px solid var(--line);
    border-radius:12px; padding:14px; overflow:hidden; min-height:200px;
}
.bes-harita-svg-box svg{
    width:100%; height:auto; display:block;
    max-height:560px;
    touch-action:manipulation;
}
.bes-harita-svg-box svg path{
    cursor:pointer; transition:fill .15s ease, transform .1s ease, filter .15s;
    stroke:#ffffff; stroke-width:.6;
}
.bes-harita-svg-box svg path:hover,
.bes-harita-svg-box svg path:focus{ filter:brightness(1.08); outline:none; }
.bes-harita-svg-box svg path.bes-active{
    stroke:#0e1320; stroke-width:1.2;
    filter:drop-shadow(0 2px 6px rgba(15,30,60,.25));
}

.bes-harita-svg-box svg path[data-lvl="0"]{ fill:var(--c0); }
.bes-harita-svg-box svg path[data-lvl="1"]{ fill:var(--c1); }
.bes-harita-svg-box svg path[data-lvl="2"]{ fill:var(--c2); }
.bes-harita-svg-box svg path[data-lvl="3"]{ fill:var(--c3); }
.bes-harita-svg-box svg path[data-lvl="4"]{ fill:var(--c4); }

/* Tooltip */
.bes-harita-tooltip{
    position:absolute; z-index:5; pointer-events:none;
    background:#0e1320; color:#fff; line-height:1.3;
    padding:8px 10px; border-radius:8px; opacity:0;
    transform:translate(-50%,-110%); transition:opacity .12s;
    white-space:nowrap; box-shadow:0 6px 16px rgba(0,0,0,.18);
    font-size:12px;
}
.bes-harita-tooltip strong{ display:block; font-size:13px; margin-bottom:2px; }
.bes-harita-tooltip.show{ opacity:1; }
@media (hover: none){
    .bes-harita-tooltip{ display:none !important; }
}

/* Sağ panel */
.bes-harita-side{
    background:var(--panel); border:1px solid var(--line); border-radius:12px;
    padding:14px; display:flex; flex-direction:column; gap:12px;
    max-height:600px;
}
@media (max-width: 980px){
    .bes-harita-side{ max-height:none; }
}
.bes-harita-side-title{
    margin:0 0 4px; font-weight:700; color:var(--muted);
    text-transform:uppercase; letter-spacing:.04em;
    font-size:clamp(12px, 1.8vw, 14px);
}

.bes-harita-search-box input{
    width:100%; padding:10px 12px;
    border:1px solid var(--line); border-radius:10px;
    background:#fff; outline:none;
    font-size:16px; /* iOS zoom önleme */
}
.bes-harita-search-box input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(15,111,255,.12);
}

.bes-harita-legend{ font-size:12px; }
.bes-l-title{ display:block; color:var(--muted); margin-bottom:6px; font-weight:600; }
.bes-l-bar{ display:flex; gap:4px; }
.bes-l-bar span{
    flex:1; padding:6px 0; text-align:center; border-radius:6px; color:#0e1320; font-weight:600;
    font-size:11px;
}
.bes-l-bar .bes-l0{ background:var(--c0); }
.bes-l-bar .bes-l1{ background:var(--c1); }
.bes-l-bar .bes-l2{ background:var(--c2); }
.bes-l-bar .bes-l3{ background:var(--c3); color:#fff; }
.bes-l-bar .bes-l4{ background:var(--c4); color:#fff; }

.bes-harita-province-list{
    list-style:none; margin:0; padding:0;
    overflow-y:auto;
    max-height:380px;
    border-top:1px solid var(--line);
    -webkit-overflow-scrolling:touch;
}
@media (max-width: 980px){
    .bes-harita-province-list{ max-height:300px; }
}
.bes-harita-province-list li{
    display:flex; align-items:center; justify-content:space-between;
    gap:10px;
    padding:10px 6px; border-bottom:1px solid var(--line);
    cursor:pointer; font-size:14px; transition:background .12s;
}
.bes-harita-province-list li:hover{ background:#eef3ff; }
.bes-harita-province-list li.zero{ color:var(--muted); }
.bes-harita-province-list li .pl-name{ font-weight:600; }
.bes-harita-province-list li .pl-count{
    background:#fff; border:1px solid var(--line); border-radius:999px;
    padding:2px 9px; font-size:12px; font-weight:700;
    color:var(--accent-2); min-width:28px; text-align:center;
}
.bes-harita-province-list li.zero .pl-count{ color:var(--muted); }

/* Modal */
.bes-harita-modal{
    position:fixed; inset:0; z-index:99999; display:none;
}
.bes-harita-modal.open{ display:block; }
.bes-harita-modal-bg{
    position:absolute; inset:0;
    background:rgba(8,12,24,.55);
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
}
.bes-harita-modal-box{
    position:absolute; left:50%; top:50%;
    transform:translate(-50%,-50%);
    width:min(960px, 94vw);
    max-height:88vh; overflow:hidden;
    background:#fff; border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,.35);
    display:flex; flex-direction:column;
}
@media (max-width: 640px){
    .bes-harita-modal-box{
        left:0; top:auto; bottom:0; transform:none;
        width:100%; max-width:100%;
        max-height:92vh;
        border-radius:16px 16px 0 0;
        animation:besSlideUp .25s ease;
    }
}
@keyframes besSlideUp{
    from{ transform:translateY(100%); }
    to{ transform:translateY(0); }
}

.bes-harita-modal-head{
    display:flex; align-items:center; justify-content:space-between;
    gap:12px; padding:14px 18px;
    border-bottom:1px solid var(--line);
    background:linear-gradient(135deg, #0f6fff 0%, #1746a2 100%);
    color:#fff;
}
.bes-harita-modal-title{
    margin:0; font-weight:800; line-height:1.2;
    font-size:clamp(18px, 3vw, 22px);
}
.bes-harita-modal-sub{
    display:block; opacity:.85; margin-top:2px;
    font-size:clamp(12px, 1.8vw, 13px);
}
.bes-harita-modal-close{
    background:rgba(255,255,255,.18); border:0; color:#fff;
    width:40px; height:40px; flex:0 0 40px;
    border-radius:10px; font-size:24px; line-height:1;
    cursor:pointer; transition:background .15s;
}
.bes-harita-modal-close:hover,
.bes-harita-modal-close:focus{ background:rgba(255,255,255,.32); outline:none; }

.bes-harita-modal-toolbar{
    padding:10px 18px;
    border-bottom:1px solid var(--line);
    background:#f7f8fb;
    display:flex; gap:10px; align-items:center;
}
.bes-harita-modal-toolbar input{
    flex:1; padding:9px 12px;
    border:1px solid var(--line); border-radius:10px;
    background:#fff; font-size:16px; outline:none;
}
.bes-harita-modal-toolbar input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(15,111,255,.12);
}
.bes-harita-modal-toolbar .bes-result-count{
    color:var(--muted); font-size:12px; font-weight:600;
    white-space:nowrap;
}

.bes-harita-modal-body{
    padding:16px 18px;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    flex:1;
}
.bes-harita-loading{
    text-align:center; color:var(--muted); padding:40px 0;
}

.bes-harita-cards{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
    gap:12px;
}
@media (max-width: 480px){
    .bes-harita-cards{ grid-template-columns:1fr; gap:10px; }
}

.bes-card{
    background:#fff; border:1px solid var(--line); border-radius:14px;
    padding:14px; display:flex; gap:12px; align-items:flex-start;
    transition:transform .12s, box-shadow .12s;
}
.bes-card:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 24px rgba(15,30,60,.08);
}
.bes-card .bes-avatar{
    width:54px; height:54px; border-radius:50%;
    background:#eef3ff; flex:0 0 54px;
    display:flex; align-items:center; justify-content:center;
    color:var(--accent-2); font-weight:800; font-size:17px;
    overflow:hidden;
}
.bes-card .bes-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.bes-card .bes-info{ flex:1; min-width:0; }
.bes-card .bes-name{
    font-weight:800; font-size:15px; margin:0 0 2px; line-height:1.25;
    word-break:break-word;
}
.bes-card .bes-unvan{
    font-size:12px; color:var(--accent-2); font-weight:700;
    margin-bottom:4px;
}
.bes-card .bes-kurum{
    font-size:12.5px; color:#0e1320; margin-bottom:3px; font-weight:600;
    line-height:1.3; word-break:break-word;
}
.bes-card .bes-yetkiler{
    font-size:11.5px; color:var(--muted); font-style:italic;
    margin-bottom:3px; word-break:break-word;
}
.bes-card .bes-birim{
    font-size:11px; color:var(--muted);
    margin-bottom:8px; word-break:break-word;
}
.bes-card .bes-actions{
    display:flex; gap:6px; flex-wrap:wrap;
}
.bes-card .bes-btn{
    display:inline-flex; align-items:center; gap:5px;
    padding:6px 11px; font-size:12px; font-weight:600;
    text-decoration:none; border-radius:8px;
    border:1px solid var(--line); color:var(--text);
    background:#f7f8fb; transition:background .12s;
    line-height:1; white-space:nowrap;
}
.bes-card .bes-btn:hover{ background:#eef3ff; }
.bes-card .bes-btn.bes-btn-wa{
    background:#25D366; color:#fff; border-color:#1faa54;
}
.bes-card .bes-btn.bes-btn-wa:hover{ background:#1faa54; }
.bes-card .bes-btn.bes-btn-tel{
    background:var(--accent); color:#fff; border-color:var(--accent-2);
}
.bes-card .bes-btn.bes-btn-tel:hover{ background:var(--accent-2); }

.bes-empty{
    text-align:center; padding:40px 12px; color:var(--muted);
}

/* Çok küçük ekranlar */
@media (max-width: 380px){
    .bes-harita-modal-head{ padding:12px 14px; }
    .bes-harita-modal-toolbar{ padding:10px 14px; }
    .bes-harita-modal-body{ padding:12px 14px; }
    .bes-card{ padding:12px; gap:10px; }
    .bes-card .bes-avatar{ width:46px; height:46px; flex-basis:46px; font-size:15px; }
}
