/* Стили для карты кофеен */

/* Общие стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Карта */
#ymap {
    width: 100%;
    height: 100%;
    margin-top: 0;
    position: relative;
}

.ypreloader {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #fff;
    background: rgba(0,0,0,.6);
    z-index: 10000000000;
    flex-direction: column;
    flex-wrap: nowrap;
}

.ypreloader img {
    margin-bottom: 1rem;
}

.ypreloader span {
    color: #fff;
    font-size: 2rem;
}

/* Слайдер для фотографий */
.photos {
    opacity: 0;
    transition: opacity 1s ease;
}

.photos .photo {
    height: 300px !important;
}

.photo img {
    object-fit: cover;
    height: 300px;
    width: 100%;
}

/* Стили для слайдера Slick */
.slick-slider {
    position: relative;
    display: block;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.slick-list {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.slick-list:focus {
    outline: none;
}

.slick-list.dragging {
    cursor: pointer;
    cursor: hand;
}

.slick-slider .slick-track,
.slick-slider .slick-list {
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.slick-track {
    position: relative;
    top: 0;
    left: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.slick-track:before,
.slick-track:after {
    display: table;
    content: '';
}

.slick-track:after {
    clear: both;
}

.slick-loading .slick-track {
    visibility: hidden;
}

.slick-slide {
    display: none;
    float: left;
    height: 100%;
    min-height: 1px;
}

[dir='rtl'] .slick-slide {
    float: right;
}

.slick-slide img {
    display: block;
}

.slick-slide.slick-loading img {
    display: none;
}

.slick-slide.dragging img {
    pointer-events: none;
}

.slick-initialized .slick-slide {
    display: block;
}

.slick-loading .slick-slide {
    visibility: hidden;
}

.slick-vertical .slick-slide {
    display: block;
    height: auto;
    border: 1px solid transparent;
}

.slick-arrow.slick-hidden {
    display: none;
}

.slick-arrow {
    position: absolute;
    z-index: 10;
    height: 32px;
    width: 32px;
    line-height: 30px;
    top: 50%;
    margin-top: -16px;
    transition: 300ms;
    border: 1px solid #000;
    text-align: center;
}

.slick-arrow svg {
    display: inline-block;
    vertical-align: middle;
}

.slick-next {
    right: 0px;
}

.slick-prev {
    left: 0px;
}

.slick-arrow svg * {
    stroke: #000;
} 

.slick-arrow:hover {
    background: #000;
}

.slick-arrow:hover svg * {
    stroke: #fff;
}

/* Стили для карты */
.ymap ymaps b {
    font-size: 20px;
}

.ymap .button {
    margin-top: 20px;
    height: 40px;
    width: 160px;
}

.ymaps-2-1-79-balloon__content > ymaps {
    height: 450px !important;
}

/* Панель фильтров и поиска (Дизайн Топ-уровня) */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 24px;
    background-color: #ffffff;
    border: none;
    border-radius: 16px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
    font-family: 'Golos Text', -apple-system, sans-serif;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-weight: 700;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.filter-group select,
.filter-group input {
    padding: 12px 18px;
    border: 1.5px solid #eef2f5;
    border-radius: 12px;
    min-width: 180px;
    font-size: 14px;
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.filter-group button,
#search-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    background: #ff5274;
    color: white;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 82, 116, 0.15);
}

.filter-group button:hover,
#search-btn:hover {
    background: #ff3b61;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 82, 116, 0.25);
}

.filter-group button:active,
#search-btn:active {
    transform: translateY(0);
}

.search-group {
    flex: 1;
    min-width: 250px;
}

.search-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input input {
    flex: 1;
    min-width: 0;
}

.search-input button {
    white-space: nowrap;
}

/* Список кофеен (Дизайн Топ-уровня) */
.jobs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
    font-family: 'Golos Text', -apple-system, sans-serif;
}

.job-item {
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.005);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: default !important; /* Убираем курсор-указатель со всей плашки, так как кликабельны только кнопка */
}

.job-item:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    transform: translateY(-4px);
    border-color: #e2e8f0;
}

.job-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.job-item .address {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.job-item .city {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.job-item .vacancy-rate {
    font-size: 14px;
    color: #10b981;
    font-weight: 700;
    margin-bottom: 20px;
    background: rgba(16, 185, 129, 0.06);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
    align-self: flex-start;
}

.job-item .vacancy-link {
    display: none !important;
}

.job-item .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    margin-top: auto; /* Прижимает теги к низу */
}

.tag {
    padding: 4px 10px;
    background-color: #f1f5f9;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
}

.job-item:hover .tag {
    background-color: #e2e8f0;
    color: #1e293b;
}

.job-item .view-details {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
}

.job-item .view-details:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* Миникарточка на карте */
.job-mini-card {
    max-width: 300px;
}

.job-mini-card .photos {
    margin-bottom: 10px;
}

.job-mini-card .photos img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.job-mini-card .job-info {
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
}

.job-mini-card .job-info h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
    color: #2c3e50;
}

.job-mini-card .job-info .job-address {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 3px;
}

.job-mini-card .job-info .job-city {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.job-mini-card .job-info .job-price {
    font-size: 14px;
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 3px;
}

.job-mini-card .job-info .job-rating {
    font-size: 14px;
    color: #f39c12;
    margin-bottom: 3px;
}

.job-mini-card .job-info .job-reviews {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.job-mini-card .job-details-btn {
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background-color 0.2s;
}

.job-mini-card .job-details-btn:hover {
    background-color: #2980b9;
}

/* Модалка с деталями */
.job-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.job-details-modal.active {
    display: flex;
}

.job-details-content {
    background-color: #fff;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.job-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.job-details-close:hover {
    background-color: #e9ecef;
    color: #333;
}

.job-details-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.job-details-header h2 {
    margin-top: 0;
    color: #2c3e50;
}

.job-details-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.job-details-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-details-info h3 {
    margin-top: 0;
    color: #495057;
}

.job-details-info p {
    margin: 0;
    line-height: 1.6;
}

.job-details-photos {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-details-photos .photo {
    position: relative;
}

.job-details-photos .photo img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.job-details-reviews {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.job-details-reviews h3 {
    margin-top: 0;
    color: #495057;
}

.job-details-reviews .reviews-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-details-reviews .review {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.job-details-reviews .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.job-details-reviews .review-rating {
    color: #f39c12;
    font-weight: 600;
}

.job-details-reviews .review-comment {
    font-size: 14px;
    line-height: 1.6;
}

.job-details-reviews .review-date {
    font-size: 12px;
    color: #7f8c8d;
}

.job-details-form {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.job-details-form h3 {
    margin-top: 0;
    color: #495057;
}

.job-details-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-details-form input,
.job-details-form textarea {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
}

.job-details-form textarea {
    min-height: 100px;
    resize: vertical;
}

.job-details-form button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.job-details-form button:hover {
    background-color: #2980b9;
}

/* Форма добавления кофейни */
.add-job-form {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.add-job-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.add-job-form .form-group {
    margin-bottom: 15px;
}

.add-job-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.add-job-form input[type=text],
.add-job-form textarea,
.add-job-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.add-job-form textarea {
    min-height: 100px;
}

.add-job-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    background-color: #27ae60;
    color: white;
}

.add-job-form button:hover {
    background-color: #219a52;
}

/* Адаптивность */
@media (max-width: 768px) {
    #ymap {
        height: 400px;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .jobs-list {
        grid-template-columns: 1fr;
    }
    
    .job-item {
        padding: 10px;
    }
}


/* Стили для кнопки просмотра вакансии */
.job-item .view-vacancy-btn {
    padding: 8px 15px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    font-size: 14px;
    transition: background-color 0.2s;
    display: inline-block;
}

.job-item .view-vacancy-btn:hover {
    background-color: #219a52;
}

/* Стили для AJAX Fancybox вакансий */
.fancybox-slide--html .fancybox-content {
    max-width: 800px;
    border-radius: 8px;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}


/* Стили для чистой модалки вакансии */
.clean-vacancy-modal {
    max-width: 700px;
    padding: 20px;
    background: #fff;
    font-family: 'Golos Text', sans-serif;
    color: #333;
}

.clean-vacancy-modal h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.3;
}

.clean-vacancy-modal .main-news-img {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.clean-vacancy-modal .main-news-img img {
    width: 100%;
    height: auto;
    display: block;
}

.clean-vacancy-modal .mg-news-full-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #4f5f6f;
}

/* Скрываем кнопки Inline-редактора в модалке */
.clean-vacancy-modal .mg-news-full-desc .editor-btn {
    display: none !important;
}


/* Принудительная фиксация и правильный z-index Fancybox для предотвращения перекрытия оверлеем */
.fancybox-container {
    position: fixed !important;
    z-index: 999999 !important;
}

.fancybox-bg {
    background: rgba(30, 30, 30, 0.6) !important;
    z-index: 999991 !important;
}

.fancybox-inner {
    z-index: 999992 !important;
}

.fancybox-stage {
    z-index: 999993 !important;
}

.fancybox-slide {
    z-index: 999994 !important;
}

.fancybox-content {
    z-index: 999995 !important;
}

.fancybox-close-small {
    z-index: 999996 !important;
}

@media (max-width: 768px) {
    .fancybox-container {
        position: fixed !important;
    }
    
    /* Жесткое центрирование модалки на мобильных через flexbox вместо absolute/before */
    .fancybox-slide {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    .fancybox-slide:before {
        display: none !important;
    }
    
    .fancybox-slide--html {
        padding: 10px !important;
    }
    
    .fancybox-slide--html .fancybox-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        overflow: visible !important; /* Убираем скролл отсюда, чтобы зафиксировать крестик */
        position: relative !important;
    }
    
    /* Позиционируем крестик внутри белой плашки на мобильных, чтобы он не улетал за экран */
    .fancybox-slide--html .fancybox-close-small {
        top: 8px !important;
        right: 8px !important;
        color: #333 !important;
        padding: 5px !important;
        background: rgba(255, 255, 255, 0.8) !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .clean-vacancy-modal {
        padding: 15px !important;
        box-sizing: border-box;
        width: 100% !important;
        /* Переносим скролл и ограничение высоты непосредственно на контент */
        max-height: 78vh !important;
        max-height: 78dvh !important;
        overflow-y: auto !important;
    }
    
    .clean-vacancy-modal h1 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
        padding-right: 38px !important; /* Освобождаем место справа под крестик закрытия */
    }
}

/* Возврат оригинального цвета карты по просьбе пользователя */
.ymap [class*="-ground-pane"] {
    filter: none !important;
}

/* Скрываем лишние промо-кнопки Яндекса */
[class*="-gototech"],
[class*="-gotoyandex"],
[class*="-gototoyandex"],
[class*="-promo-button"] {
    display: none !important;
}

/* Блеклые аккуратные копирайты */
[class*="-copyrights-promo"],
[class*="-copyrights-pane"] {
    opacity: 0.45 !important;
    transition: opacity 0.2s;
}
[class*="-copyrights-promo"]:hover,
[class*="-copyrights-pane"]:hover {
    opacity: 1 !important;
}

/* --- Стили Split-Screen (Coffeemap.ru) --- */
.p4-jobs-main-wrapper {
    display: flex;
    flex-direction: row;
    height: 750px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef2f6;
    font-family: 'Golos Text', -apple-system, sans-serif;
    margin-top: 15px;
    position: relative;
}

.p4-jobs-sidebar {
    width: 380px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
    z-index: 10;
}

.p4-jobs-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p4-jobs-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.p4-jobs-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.p4-jobs-search-container input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1.5px solid #eef2f5;
    border-radius: 12px;
    font-size: 14px;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.p4-jobs-search-container input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.p4-jobs-search-container input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.06);
}

.p4-jobs-quick-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.p4-jobs-quick-filters::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.p4-filter-pill {
    padding: 8px 16px;
    border: 1.5px solid #eef2f5;
    border-radius: 9999px;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.p4-filter-pill:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.p4-filter-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.p4-jobs-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

/* Custom Scrollbar for Sidebar */
.p4-jobs-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.p4-jobs-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.p4-jobs-sidebar-content::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

.p4-jobs-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.p4-jobs-sidebar-content .jobs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
}

.p4-jobs-sidebar-content .job-item {
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.p4-jobs-map-wrapper {
    flex: 1;
    height: 100%;
    position: relative;
}

/* Hide toggle button on desktop */
.p4-jobs-mobile-toggle-btn {
    display: none;
}

/* Mobile Toggle Button */
@media (max-width: 767px) {
    .p4-jobs-main-wrapper {
        flex-direction: column;
        height: 600px;
        border-radius: 16px;
        margin-top: 10px;
    }
    
    .p4-jobs-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .p4-jobs-sidebar-header {
        padding: 15px;
    }
    
    .p4-jobs-sidebar-content {
        display: none;
    }
    
    .p4-jobs-map-wrapper {
        display: block;
        height: 100%;
        position: relative;
    }
    
    /* Toggle states */
    .p4-jobs-main-wrapper.view-list .p4-jobs-sidebar-content {
        display: block;
        height: 100%;
        overflow-y: auto;
    }
    
    .p4-jobs-main-wrapper.view-list .p4-jobs-map-wrapper {
        display: none;
    }
    
    .p4-jobs-main-wrapper.view-map .p4-jobs-sidebar-content {
        display: none;
    }
    
    .p4-jobs-main-wrapper.view-map .p4-jobs-map-wrapper {
        display: block;
        flex: 1;
    }

    .p4-jobs-mobile-toggle-btn {
        display: flex !important;
        position: absolute;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 24px;
        background: #1e293b;
        color: #ffffff;
        border: none;
        border-radius: 9999px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        z-index: 100;
        align-items: center;
        gap: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .p4-jobs-mobile-toggle-btn:hover {
        background: #0f172a;
        transform: translateX(-50%) translateY(-1px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }
    
    .p4-jobs-mobile-toggle-btn:active {
        transform: translateX(-50%) translateY(0);
    }
    
    .p4-jobs-mobile-toggle-btn svg {
        stroke: #ffffff;
    }
}

/* --- Кастомные пины карты в стиле Coffeemap.ru --- */
.p4-map-pin {
    position: absolute;
    pointer-events: auto !important;
    cursor: pointer !important;
    transform: translate(-50%, -100%);
    margin-top: -8px; /* небольшой сдвиг вверх над координатой */
    background: #ffffff;
    border-radius: 9999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Golos Text', -apple-system, sans-serif;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 2px solid #2563eb;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.p4-map-pin-text {
    display: inline-block;
}

/* Треугольная стрелочка внизу пина */
.p4-map-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2563eb;
    transition: border-top-color 0.2s ease;
}

/* Эффект увеличения при наведении */
.p4-map-pin:hover {
    transform: translate(-50%, -100%) scale(1.05);
    z-index: 99999999 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* Цветовые схемы границ и стрелочек */
.p4-map-pin.premium {
    border-color: #2563eb; /* Премиум: Синий */
}
.p4-map-pin.premium::after {
    border-top-color: #2563eb;
}

.p4-map-pin.day-1 {
    border-color: #10b981; /* 1-й день: Ярко-зеленый */
}
.p4-map-pin.day-1::after {
    border-top-color: #10b981;
}

.p4-map-pin.day-2 {
    border-color: #84cc16; /* 2-й день: Оливковый */
}
.p4-map-pin.day-2::after {
    border-top-color: #84cc16;
}

.p4-map-pin.day-3 {
    border-color: #94a3b8; /* 3-й день: Серый/блеклый */
}
.p4-map-pin.day-3::after {
    border-top-color: #94a3b8;
}

/* --- Раскрытое состояние пина ( Coffemap-style ) --- */
.p4-map-pin.expanded {
    padding: 6px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
    max-width: 250px;
    z-index: 10000000 !important;
}

.p4-map-pin.expanded .p4-map-pin-text {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* --- Подсветка активной карточки вакансии в сайдбаре --- */
.job-item.active-card {
    border-color: #2563eb !important;
    background-color: rgba(37, 99, 235, 0.03) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08) !important;
}
