@font-face {
    font-family: 'Book Antiqua';
    src: url('../bkant.woff2') format('woff2');
}
@font-face {
    font-family: 'Book Antiqua Italic';
    src: url('../antquai.woff2') format('woff2');
}
@font-face {
    font-family: 'Book Antiqua Bold Italic';
    src: url('../antquabi.woff2') format('woff2');
}

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

body {
    font-family: 'Book Antiqua', serif;
    background-color: #F9F9F9;
    color: #000005;
    overflow: hidden; /* Чтобы страница не скроллилась, скроллиться будет только сайдбар */
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Сайдбар */
.sidebar {
    width: 320px;
    min-width: 320px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    background-color: #F9F9F9;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar h1 {
    margin-bottom: 12px;
}
.sidebar-logo {
    max-width: 100%;
    height: auto;
    display: block;
}
.mobile-logo {
    max-width: 180px;
    height: auto;
}

.sidebar .subtitle {
    font-family: 'Book Antiqua Italic', serif;
    font-size: 15px;
    color: #333;
    line-height: 1.3;
}
.sidebar-description {
    margin-top: auto;
    width: 100%;
    font-family: 'Book Antiqua Italic', serif;
    font-size: 14px;
    color: #939393;
    line-height: 1.2;
    font-style: italic;
    padding-top: 20px;
}
/* Переключатель языков на карте */
.lang-switcher-map {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}
.lang-btn {
    font-family: 'Book Antiqua Bold Italic', serif;
    font-size: 20px;
    color: #000005;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
}
.lang-btn.active {
    padding: 0 8px;
    border: 1px solid #000005;
    border-radius: 5px;
    min-width: 40px;
}
.lang-btn.inactive {
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0 4px;
}
.lang-btn.inactive:hover {
    color: #FF4200;
}

/* Контейнер карты */
.map-container {
    flex-grow: 1;
    height: 100%;
    background-color: #1a1a2e; /* Цвет-заглушка до загрузки тайлов */
    position: relative;
}/* Обертка для сайдбара и профиля */
.sidebar-wrapper {
    width: 320px;
    min-width: 320px;
    position: relative;
    overflow: hidden;
    background-color: #F9F9F9;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.sidebar {
    height: 100%;
    overflow-y: auto;
    padding: 30px;
}

/* Стилизация скроллбара */
.sidebar::-webkit-scrollbar, .profile-panel::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb, .profile-panel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.separator {
    border: 0; border-top: 1px solid #EAEAEA; margin: 24px 0;
}

/* Кастомные Чекбоксы */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    user-select: none;
}
.custom-checkbox-label:last-child {
    margin-bottom: 0;
}
.custom-checkbox-label input[type="checkbox"] {
    display: none;
}
.label-text {
    font-size: 15px;
}

/* Общий стиль подложки для чекбоксов (Rectangle 56.svg) */
.indicator-all, .indicator-item {
    width: 24px; height: 24px;
    background: #EEEEEE;
    border-radius: 5px;
    margin-right: 16px;
    display: flex; justify-content: center; align-items: center;
    position: relative;
    flex-shrink: 0;
}
/* Состояние наведения для подложки */
.custom-checkbox-label:hover .indicator-all,
.custom-checkbox-label:hover .indicator-item {
    background: #F0F0F0;
}

/* Оранжевая галочка (Vector 11 (Stroke).svg) */
.group-all input:checked + .indicator-all::after,
.indicator-item.is-checked::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 21px;
    /* Галочка чуть смещена вверх и влево относительно бокса, чтобы соответствовать макету */
    top: -2px;
    left: 2px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='27' height='21' viewBox='0 0 27 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26.2402 4.21484L10.3115 20.3477L0 10.1895L4.21094 5.91504L10.2529 11.8672L21.9707 0L26.2402 4.21484Z' fill='%23FF4200'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}
/* Цвет галочки при наведении (#FF7700) */
.custom-checkbox-label:hover input:checked + .indicator-all::after,
.custom-checkbox-label:hover .indicator-item.is-checked::after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='27' height='21' viewBox='0 0 27 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26.2402 4.21484L10.3115 20.3477L0 10.1895L4.21094 5.91504L10.2529 11.8672L21.9707 0L26.2402 4.21484Z' fill='%23FF7700'/%3E%3C/svg%3E");
}

/* Оранжевая точка (Ellipse 3.svg) */
.indicator-item.is-dot::after {
    content: '';
    width: 8px; height: 8px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23FF4200'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}
/* Цвет точки при наведении (#FF7700) */
.custom-checkbox-label:hover .indicator-item.is-dot::after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23FF7700'/%3E%3C/svg%3E");
}


/* Панель профиля (Справа от сайдбара) */
.profile-panel {
    position: absolute; top: 0; left: 320px; width: 460px; height: 100%;
    background: #fff; z-index: 9; transform: translateX(-100%); transition: transform 0.3s ease;
    padding: 24px; overflow-y: auto; box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.profile-panel.active { transform: translateX(0); }

.m-sidebar-header { display: none; }
/* --- Адаптив для мобильных устройств --- */
.mobile-header { display: none; }
.mobile-bottom-bar { display: none; }

@media (max-width: 768px) {
    .app-container { height: 100dvh; }

    .mobile-bottom-bar {
        display: flex; position: fixed; bottom: 20px; right: 20px; left: auto; transform: none;
        width: auto; justify-content: flex-end; gap: 10px; 
        z-index: 30; padding: 0; pointer-events: none;
    }
    .m-filter-group {
        display: flex; background: #EEEEEE; border-radius: 40px;
        pointer-events: auto; overflow: hidden; flex-grow: 0; align-items: center;
    }
    .m-filter-btn {
        flex: none; background: transparent; border: none; padding: 10px 16px;
        display: flex; align-items: center; justify-content: center; gap: 6px;
        font-family: 'Book Antiqua', serif; font-size: 15px; font-weight: bold;
        color: #000005; white-space: nowrap; cursor: pointer;
    }
    .m-divider { width: 1px; height: 24px; background: #DBDBDB; }
    .m-close-btn {
        background: none; border: none; padding: 0; border-radius: 50%;
        pointer-events: auto;
        display: flex; align-items: center; justify-content: center; cursor: pointer;
    }

    .m-count {
        background: #FF4200; color: #fff; width: 18px; height: 18px;
        border-radius: 50%; font-size: 11px; display: flex; align-items: center; justify-content: center;
        font-family: sans-serif;
    }
    .m-arrow { display: flex; align-items: center; transition: transform 0.3s; margin-left: 2px; }
    .m-filter-btn.active .m-arrow { transform: rotate(180deg); }

    .app-container { flex-direction: column; }

    /* Мобильная шапка */
    .mobile-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 15px 20px; background: #fff; z-index: 12; position: relative;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1); height: 60px; box-sizing: border-box;
    }
    .mobile-header h1 { margin: 0; display: flex; align-items: center; }
    .mobile-logo { height: 20px; width: auto; }
    .hamburger { background: none; border: none; font-size: 24px; cursor: pointer; display: block; }
    .desktop-only { display: none !important; }

    /* Сайдбар на мобильном во весь экран */
    .sidebar {
        position: fixed; top: 0; left: 0; width: 100%; min-width: 100%; height: 100dvh;
        transform: translateY(100%); transition: transform 0.3s ease; z-index: 20;
        padding: 0; background-color: #fff;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .sidebar.open { transform: translateY(0); }

    .m-sidebar-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 15px 20px; background: #fff; height: 60px; box-sizing: border-box;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1); margin-bottom: 20px;
    }
    .m-sidebar-header h1 { margin: 0; display: flex; align-items: center; }
    .m-sidebar-close { background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; }

    .sidebar-content { padding: 0 20px 90px 20px; }
    .sidebar-description { margin-top: 20px; }

    /* Профиль на мобильном (под шапкой) */
    .profile-panel {
        position: fixed; top: 60px; left: 0; width: 100%; height: calc(100dvh - 60px);
        transform: translateY(100%); border-radius: 0; z-index: 11;
        padding: 20px; padding-bottom: 90px; background-color: #fff;
        overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: none;
    }
    .profile-panel.active { transform: translateY(0); }
    .profile-panel .close-btn { display: none; }

    .lang-switcher { position: relative; bottom: auto; left: auto; margin-top: 20px; text-align: center; }
}

.close-btn {
    position: absolute; 
    top: 0; 
    right: 0;
    width: 32px; 
    height: 32px; 
    background-color: #F0F0F0; 
    border-radius: 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border: none; 
    font-size: 20px; 
    cursor: pointer;
    color: #333;
}
.close-btn:hover img {
    content: url('../icon_close_gray.svg');
}

.profile-header { margin-bottom: 15px; margin-top: 5px; }
.profile-header h2 {
    font-family: 'Book Antiqua Bold Italic', serif;
    font-size: 20px;
    line-height: 1.0;
    display: inline;
    color: #000005;
}

.p-badges-wrapper { margin-bottom: 20px; }
.p-badges-list { display: flex; flex-wrap: wrap; gap: 10px; }
.reason-badge {
    background-color: #EEEEEE;
    color: #000005;
    padding: 3px 9px 4px 7px;
    font-family: 'Book Antiqua', serif;
    font-size: 14px;
    line-height: 1.2;
    display: inline-block;
}

.p-sanctions-wrapper { display: none !important; }
.p-sanctions-label { margin-right: 10px; margin-top: 2px; }
.p-sanctions-list { display: flex; flex-wrap: wrap; gap: 5px; }

.p-bio { font-size: 15px; line-height: 1.2; margin-bottom: 20px; }

.p-divider { border-top: 1px solid #EAEAEA; margin-bottom: 15px; }
.p-quote-wrapper { display: flex; flex-direction: row; border-bottom: 1px solid #EAEAEA; padding-bottom: 15px; margin-bottom: 20px; }
.p-quote-icon { margin-right: 15px; flex-shrink: 0; margin-top: 2px; }
.p-quote-text { font-family: 'Book Antiqua Bold Italic', serif; font-size: 14px; color: #000005; line-height: 1.4; }

.p-property-card img { width: 100%; display: block; border-radius: 5px; margin-bottom: 15px; }
.p-desc { font-size: 15px; line-height: 1.2; margin-bottom: 15px; }
.p-owner { font-size: 15px; line-height: 1.2; margin-bottom: 20px; }
.p-link {
    color: #FF4200;
    text-decoration: none;
    border-bottom: 1px solid #FF4200;
    transition: color 0.2s, border-color 0.2s;
}
.p-link:hover {
    color: #FF7700;
    border-bottom-color: #FF7700;
}

.btn-investigation {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px; /* Фиксированная высота по макету Frame 393.svg */
    background: #FF4200;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Book Antiqua Bold Italic', serif;
    font-size: 18px;
    transition: background-color 0.2s;
}
.btn-investigation:hover {
    background-color: #FF7700; /* Цвет из Frame 409.svg */
}
.btn-investigation span { font-family: sans-serif; font-weight: 100; margin: 0 5px; }

/* Убираем стандартные кнопки зума карты */
.gmnoprint { display: none !important; }
