/* ===== EuroGuide Map — стили маркеров и попапов ===== */

.eg-marker { position: relative; }

/* ----- Капля (общая) ----- */
.eg-pin {
    width: 48px; height: 48px;
    background: #1d4178;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 14px rgba(29, 65, 120, 0.45);
    border: 3px solid #fff;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transition: transform .2s ease;
}
.eg-pin-sm   { width: 38px; height: 38px; }
.eg-pin-num  { background: #1d4178; }

.eg-pin-inner {
    transform: rotate(45deg);
    font-size: 22px;
    line-height: 1;
    color: #fff;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eg-pin-inner .bi { font-size: 22px; line-height: 1; }
.eg-pin-sm .eg-pin-inner { font-size: 17px; }
.eg-pin-sm .eg-pin-inner .bi { font-size: 18px; }
.eg-pin-num .eg-pin-inner { font-size: 14px; color: #fff; }

/* Hover — лёгкое увеличение */
.eg-marker:hover .eg-pin { transform: rotate(-45deg) scale(1.12); z-index: 1000; }

/* ----- Пульсация под каплей ----- */
.eg-pin-pulse {
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    width: 14px; height: 6px;
    border-radius: 50%;
    background: rgba(29, 65, 120, 0.4);
    animation: eg-pulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes eg-pulse {
    0%   { transform: translateX(-50%) scale(0.5); opacity: 0.9; }
    100% { transform: translateX(-50%) scale(3.5); opacity: 0;   }
}

/* ----- Подпись под флагом страны ----- */
.eg-pin-label {
    position: absolute;
    top: 54px; left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #1d4178;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
    pointer-events: none;
    opacity: 0; transition: opacity .25s;
}
.eg-marker:hover .eg-pin-label,
.eg-marker-flag .eg-pin-label { opacity: 1; }

/* ----- Стильный popup ----- */
.eg-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.25) !important;
    border: none;
}
.eg-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
    width: 260px !important;
    line-height: 1.4;
}
.eg-leaflet-popup .leaflet-popup-tip { background: #fff; }
.eg-leaflet-popup .leaflet-popup-close-button {
    color: #fff !important;
    font-size: 22px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    top: 8px !important;
    right: 10px !important;
}

.eg-popup-img {
    width: 100%; height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.eg-popup-img::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.35), transparent 40%);
}
.eg-popup-body {
    padding: 12px 14px 14px;
    font-family: 'Jost', sans-serif;
    color: #1d2940;
}
.eg-popup-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1d4178 !important;
    text-decoration: none;
    margin-bottom: 4px;
}
.eg-popup-title:hover { color: #5191fa !important; }
.eg-popup-sub {
    font-size: 12.5px;
    color: #6b7889;
    margin-bottom: 8px;
}
.eg-popup-cta {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: #1d4178;
    color: #fff !important;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: transform .15s;
}
.eg-popup-cta:hover { transform: translateY(-1px); }

/* ----- Атмосферный фрейм контейнера карты ----- */
.eg-map-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(29, 65, 120, .18);
    border: 1px solid rgba(81, 145, 250, .12);
}
.eg-map-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 60px rgba(29, 65, 120, .08);
    border-radius: 16px;
    z-index: 500;
}

/* ============= EuroGuide логотип ============= */
.eg-logo { display:inline-flex !important; align-items:center; gap:10px;
           text-decoration:none !important; }
.eg-logo .eg-logo-icon {
    width:38px; height:38px; border-radius:50%;
    background:#1d4178;
    color:#fff; display:flex; align-items:center; justify-content:center;
    font-size:20px; box-shadow:0 4px 10px rgba(81,145,250,.35);
}
.eg-logo .eg-logo-text {
    font-family:'Jost', sans-serif; font-weight:700; font-size:22px;
    color:#fff; letter-spacing:.5px;
}
.is-logo-dark .eg-logo .eg-logo-text,
.bg-white .eg-logo .eg-logo-text,
body:not(.has-light-header) .header.bg-white .eg-logo .eg-logo-text { color:#0d2546; }

/* Leaflet zoom батырмалары - sticky navbar астынан шығу үшін отступ */
.eg-map-frame .leaflet-top.leaflet-left { top: 70px; }
.eg-map-frame .leaflet-control-zoom a {
    background: #fff !important;
    color: #1d4178 !important;
    border: 1px solid rgba(13, 37, 70, .12) !important;
    box-shadow: 0 4px 12px rgba(13, 37, 70, .15);
    width: 38px !important; height: 38px !important;
    line-height: 36px !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}
.eg-map-frame .leaflet-control-zoom a:hover {
    background: #5191fa !important;
    color: #fff !important;
}

/* ====================== БОКОВАЯ ПАНЕЛЬ ====================== */
.eg-map-wrap { position: relative; }

/* Панель появляется ПОВЕРХ карты только при открытии.
   До клика - её визуально нет (visibility:hidden), карту можно свободно двигать. */
.eg-side-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 380px;
    max-width: 92%;
    background: #fff;
    border-radius: 16px;
    box-shadow: -10px 0 30px rgba(13, 37, 70, .15);
    overflow-y: auto;
    z-index: 1000;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s .35s;
    visibility: hidden;
    pointer-events: none;
    display: none;
}
.eg-side-panel.eg-side-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    display: flex;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s 0s;
}

/* Flag-img внутри маркера (родители rotate(-45)+rotate(45) уже компенсируют) */
.eg-flag-img {
    width: 30px; height: 22px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    display: block;
}
.eg-pin-sm .eg-flag-img { width: 24px; height: 18px; }

.eg-side-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(13, 37, 70, .12);
    color: #1d4178;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    backdrop-filter: blur(8px);
    transition: transform .15s, background .15s;
}
.eg-side-close:hover {
    background: #fff;
    transform: scale(1.08);
}

.eg-side-img {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #f3f6fc;
    flex-shrink: 0;
    position: relative;
}
.eg-side-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(13, 37, 70, .35) 100%);
}

.eg-side-body {
    padding: 22px 24px 28px;
}
.eg-side-sub {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: #5191fa;
    font-weight: 600;
    margin-bottom: 6px;
}
.eg-side-title {
    font-size: 22px;
    font-weight: 700;
    color: #0d2546;
    margin: 0 0 14px;
    line-height: 1.25;
}
.eg-side-content {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}
.eg-side-content p { margin: 0 0 10px; }
.eg-side-content strong { color: #0d2546; }
.eg-side-content ul,
.eg-side-content ol { padding-left: 20px; margin: 0 0 10px; }
.eg-side-content li { margin-bottom: 4px; }

.eg-side-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    background: #1d4178;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 6px 18px rgba(81, 145, 250, .35);
}
.eg-side-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(81, 145, 250, .5);
    color: #fff !important;
}

/* Empty state удалён - панель не показывается до клика */
.eg-side-empty { display: none !important; }

/* Mobile - панель снизу */
@media (max-width: 768px) {
    .eg-side-panel {
        top: auto;
        bottom: 0; left: 0; right: 0;
        width: 100%;
        max-width: 100%;
        height: 75%;
        border-radius: 16px 16px 0 0;
        transform: translateY(110%);
        box-shadow: 0 -10px 30px rgba(13, 37, 70, .25);
    }
    .eg-side-panel.eg-side-open { transform: translateY(0); }
    .eg-side-img { height: 160px; }
}
