* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Libre Franklin',sans-serif;
    background-color: #f0f2f5;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: flex-start;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.holiday-banner-container {
    margin: 20px auto 0 auto;
    width: 95%;
    max-width: 1400px;
    text-align: center;
}

.holiday-banner-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

.map-container {
    margin: 20px auto;
    width: 95%;
    max-width: 1400px;
}

#map {
    height: 700px;
    width: 100%;
    border: 3px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Стили для всплывающих окон */
.leaflet-popup-content {
    min-width: 300px;
    max-width: 400px;
    font-family: 'Libre Franklin', sans-serif; /* Основной шрифт */
}

.popup-content {
    padding: 15px;
    font-family: 'Libre Franklin', sans-serif; /* Современный шрифт */
}

.popup-content h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    font-size: 1.3rem;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: bold;
    line-height: 1.2;
}

.popup-image {
    margin: 10px 0;
    text-align: center;
}

.popup-image img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.popup-description {
    margin: 12px 0;
    line-height: 1.5;
    color: #555;
    font-size: 0.95rem;
    font-family: 'Libre Franklin', sans-serif;
}

.popup-coordinates {
    margin: 8px 0;
    color: #888;
    font-size: 0.85rem;
    font-family: 'Libre Franklin', sans-serif; /* Моноширинный для координат */
    font-style: italic;
}

.popup-actions {
    margin-top: 15px;
    text-align: center;
}

.details-btn {
    display: inline-block;
    background: linear-gradient(135deg, #0F52BA 0%, #072554 100%);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.9rem;
}

.details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    color: white;
    text-decoration: none;
}

/* Улучшаем внешний вид popup при наведении */
.leaflet-popup-content-wrapper {
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background-color: rgba(255, 255, 255, 0.7); /* Делаем фон полупрозрачным */
    backdrop-filter: blur(10px);/* Применяем блюр */
    -webkit-backdrop-filter: blur(10px);/* Для Safari */
}

.leaflet-popup-content-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.leaflet-popup-tip {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Анимация для меток */
.custom-marker {
    transition: all 0.3s ease !important;
}

.custom-marker:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Улучшенный внешний вид счетчика */
.filter-info {
    padding: 10px 0;
    font-weight: bold;
    color: #2c3e50;
    border-top: 1px solid #ecf0f1;
    margin-top: 10px;
}

#visibleCount {
    background: linear-gradient(135deg, #0F52BA, #072554);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
}

/* Стили для блока фильтров */
.filters-container {
    margin: 20px auto;
    width: 95%;
    max-width: 1400px;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filters h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.filter-info {
    color: #666;
    font-size: 0.9rem;
}

/* Плавные переходы для фильтрации */
.custom-marker {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* === СТИЛИ ДЛЯ ВСПЛЫВАЮЩЕГО ОКНА (WELCOME POPUP) === */
.welcome-popup {
    position: fixed;
    top: -300px; /* Изначально спрятано сверху */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 0 0 15px 15px; /* Скругление только снизу */
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000; /* Должно быть поверх всего */
    transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Эффект пружинки */
    border: 1px solid #e0e0e0;
    border-top: none;
}

.welcome-popup.show {
    top: 0; /* Показываем */
}

.welcome-content {
    position: relative;
    padding: 25px;
    text-align: center;
}

.welcome-header h3 {
    margin-top: 10px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #0F52BA, #072554);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.welcome-body p {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

.welcome-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.welcome-close:hover {
    color: #072554;
}


/* ========================================= */
/* 7. СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ (CONTACTS PAGE) */
/* ========================================= */

.contacts-page-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.contacts-page-container h1 {
    color: #1e3c72;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contacts-intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.section-title {
    color: #072554;
    font-size: 2rem;
    margin: 50px 0 30px;
    position: relative;
    display: inline-block;
}

/* Декоративная линия под заголовком секции */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3498db;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Карточка общей почты */
.general-contacts-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.contact-card.main-contact {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    max-width: 600px;
    width: 100%;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.contact-card.main-contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: #eef2ff; /* Светло-голубой фон */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #0F52BA; /* Основной синий цвет */
    font-size: 30px;
}

.contact-card h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4rem;
}

.contact-card p {
    color: #666;
    margin-bottom: 15px;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0F52BA;
    transition: color 0.3s;
}

.email-link:hover {
    color: #072554;
    text-decoration: underline;
}

/* Сетка разработчиков */
.developers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Карточка разработчика */
.dev-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid transparent;
}

.dev-card:hover {
    transform: translateY(-5px);
    border-color: #e0e0e0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dev-photo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    position: relative;
}

.dev-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f2f5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dev-info {
    text-align: center;
}

.dev-info h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.3rem;
}

.dev-role {
    display: block;
    color: #3498db;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dev-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 45px; 
}

/* Кнопка Телеграм */
.telegram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #0088cc; /* Цвет Telegram */
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background-color: #0077b5;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
    color: white;
}

/* ========================================= */
/* 9. АДАПТИВНОСТЬ (RESPONSIVE) */
/* ========================================= */
@media (max-width: 768px) {
    /* Адаптив Header/Footer */
    .header-container, 
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-menu, 
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* Адаптив карты */
    #map {
        height: 500px;
    }

    /* Адаптив попапов (УМЕНЬШЕНИЕ РАЗМЕРА) */
    .leaflet-popup-content {
        min-width: 180px; /* Уменьшаем минимальную ширину */
        max-width: 220px; /* Уменьшаем максимальную ширину */
    }

    .popup-content {
        padding: 10px; /* Уменьшаем внутренний отступ */
    }

    .popup-content h3 {
        font-size: 1.1rem; /* Уменьшаем заголовок */
        margin-bottom: 8px;
        padding-bottom: 4px;
    }

    .popup-image img {
        height: 120px; /* Уменьшаем высоту изображения */
    }
    
    .popup-description {
        font-size: 0.7rem; /* Уменьшаем основной текст */
        margin: 8px 0;
    }
    
    .popup-coordinates {
        font-size: 0.5rem; /* Уменьшаем координаты */
    }
    
    .details-btn {
        padding: 8px 15px; /* Уменьшаем кнопку */
        font-size: 0.8rem;
    }

    /* Адаптив фильтров */
    .filter-buttons {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Адаптив страницы контактов */
    .contacts-page-container h1 {
        font-size: 2rem;
    }
    
    .email-link {
        font-size: 1.2rem;
    }

    /* Сетка разработчиков в одну колонку на мобильных */
    .developers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}



/* ========================================= */
/* 10. СТИЛИ СТРАНИЦЫ "ВСЕ МЕСТА" (ALL PLACES) */
/* ========================================= */

.places-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.places-page-container h1 {
    color: #072554;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.places-page-container h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- Панель фильтров --- */
.places-filters-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-end; /* Выравниваем по нижнему краю */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #072554;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #f0f2f5;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
    min-width: 250px;
    background-color: #f9fbff;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.places-count {
    text-align: center;
    color: #888;
    margin-bottom: 40px;
    font-size: 1rem;
    font-weight: 500;
}

/* --- Сетка карточек --- */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 80px;
}

.place-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.place-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Изображение карточки */
.card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.place-card:hover .card-image img {
    transform: scale(1.1);
}

/* Бейдж типа */
.card-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #072554;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-transform: uppercase;
    z-index: 2;
}

/* Контент карточки */
.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #3498db;
    font-weight: bold;
}

.card-meta i {
    margin-right: 5px;
}

.card-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #072554;
    line-height: 1.2;
}

.card-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
}

.card-btn {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 1rem;
    border-radius: 12px;
}

.no-results {
    text-align: center;
    font-size: 1.3rem;
    color: #666;
    padding: 60px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 2px dashed #e0e0e0;
}


/* === ОБНОВЛЕННЫЙ ДИЗАЙН КАРТОЧЕК С ГРАДИЕНТОМ И ФИКСИРОВАННЫМ ЗАГОЛОВКОМ === */

/* 1. Задаем высоту карточки */
.place-card {
    position: relative;
    overflow: hidden;
    height: 380px; 
    border: none;
    background: #000; /* Черный фон на случай, если картинка долго грузится */
}

/* 2. Картинка на заднем плане */
.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.card-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* При наведении картинка плавно тускнеет */
.place-card:hover .card-image img {
    transform: scale(1.05);
    filter: brightness(0.35); 
}

/* 3. Контент поверх картинки */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Твой черный градиент снизу вверх для идеального чтения заголовка */
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.4) 40%, 
        rgba(0, 0, 0, 0) 100%
    );
}

/* 4. Блок с описанием и кнопкой сгруппируем для анимации */
.card-desc, 
.card-footer {
    max-height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

/* 5. Настраиваем стили текстов под темный фон */
.card-content h3 {
    color: white !important; 
    margin: 0 0 5px 0[cite: 6];
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6); /* Дополнительная тень для букв */
}

.card-meta {
    color: #64b5f6 !important; 
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-desc {
    color: #e0e0e0;
    -webkit-line-clamp: 4; /* Чуть уменьшим лимит строк, чтобы точно всё влезло */
    font-size: 0.95rem;
}

.card-footer {
    margin-top: 15px;
}

/* 6. МАГИЯ НАВЕДЕНИЯ: Раскрываем описание и кнопку, не двигая заголовок */
.place-card:hover .card-desc {
    max-height: 120px; /* Даем описанию место для раскрытия */
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 15px;
}

.place-card:hover .card-footer {
    max-height: 60px; /* Даем кнопке место */
    opacity: 1;
}

/* Затемняем общий фон контента при наведении для глубины */
.place-card:hover .card-content {
    background: rgba(7, 37, 84, 0.75); /* Синеватый благородный оттенок при ховере */
}

/* Стили для кастомного мультиселектора */
.multi-select {
    position: relative;
    width: 250px; /* Можно настроить под твой дизайн */
    user-select: none;
}

.select-box {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.select-box:hover {
    border-color: var(--primary-blue, #0F52BA);
}

.dropdown-list {
    display: none; /* Скрываем по умолчанию */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto; /* Добавляем скролл, если пунктов слишком много */
    z-index: 100; /* ВАЖНО: чтобы список был ПОВЕРХ карточек */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.dropdown-list.show {
    display: block;
}

.checkbox-label {
    display: flex; /* ВАЖНО: заставляет текст и чекбокс стоять ровно */
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.checkbox-label:last-child {
    border-bottom: none; /* Убираем полоску у последнего пункта */
}

.checkbox-label:hover {
    background: #f4f7f6;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0F52BA; /* Делаем галочку синей */
}

/* ========================================= */
/* УЛУЧШЕННАЯ АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
/* ========================================= */

/* Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    .places-page-container {
        padding: 0 12px;
        margin: 20px auto;
    }

    .places-page-container h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding: 0 10px;
        word-break: break-word;
    }

    .places-page-container h1::after {
        width: 60px;
        height: 3px;
        margin: 12px auto 0;
    }

    /* Панель фильтров для мобильных */
    .places-filters-bar {
        padding: 18px 15px;
        margin: 0 -8px 25px -8px;
        border-radius: 12px;
        gap: 20px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    }

    .filter-group {
        width: 100%;
        gap: 6px;
    }

    .filter-group label {
        font-size: 0.8rem;
        letter-spacing: 0.3px;
        padding-left: 5px;
    }

    .filter-select {
        min-width: 100%;
        padding: 14px 15px;
        font-size: 1rem;
        border-radius: 12px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23072554' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 16px;
        padding-right: 45px;
    }

    /* Счетчик */
    .places-count {
        font-size: 0.95rem;
        margin-bottom: 25px;
        padding: 0 10px;
        background: #f8f9fa;
        border-radius: 10px;
        padding: 12px 15px;
        margin: 0 0 25px 0;
        border-left: 4px solid #667eea;
    }

    /* Сетка карточек для мобильных */
    .places-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 50px;
    }

    /* Карточка для мобильных */
    .place-card {
        border-radius: 16px;
        margin: 0 2px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        border: 1px solid #e8e8e8;
    }

    .place-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    }

    /* Изображение для мобильных */
    .card-image {
        height: 190px;
        max-height: 45vh;
    }

    .card-image img {
        object-position: center;
    }

    /* Бейдж для мобильных */
    .card-type-badge {
        top: 12px;
        right: 12px;
        padding: 5px 12px;
        font-size: 0.7rem;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    }

    /* Контент карточки для мобильных */
    .card-content {
        padding: 20px 18px;
    }

    .card-meta {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .card-content h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .card-desc {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
        -webkit-line-clamp: 4;
    }

    /* Кнопка для мобильных */
    .card-btn {
        padding: 16px;
        font-size: 1rem;
        border-radius: 14px;
        font-weight: 600;
        min-height: 52px; /* Для удобного нажатия пальцем */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Сообщение "нет результатов" */
    .no-results {
        padding: 40px 20px;
        margin: 0 5px;
        font-size: 1.1rem;
        border-radius: 16px;
    }
}

/* Планшеты (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .places-page-container {
        padding: 0 18px;
    }

    .places-page-container h1 {
        font-size: 2.1rem;
        margin-bottom: 25px;
    }

    .places-filters-bar {
        padding: 22px;
        gap: 20px;
        margin-bottom: 25px;
    }

    .filter-group {
        flex: 1;
        min-width: calc(50% - 20px);
    }

    .places-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
        margin-bottom: 60px;
    }

    .card-image {
        height: 200px;
    }

    .card-content {
        padding: 22px;
    }

    .card-content h3 {
        font-size: 1.4rem;
    }

    .card-btn {
        padding: 15px;
    }
}

/* Маленькие телефоны (до 360px) */
@media (max-width: 360px) {
    .places-page-container {
        padding: 0 10px;
    }

    .places-page-container h1 {
        font-size: 1.6rem;
    }

    .places-filters-bar {
        padding: 15px 12px;
        gap: 15px;
    }

    .filter-select {
        padding: 13px 15px;
        font-size: 0.95rem;
    }

    .card-image {
        height: 170px;
    }

    .card-content {
        padding: 16px 14px;
    }

    .card-content h3 {
        font-size: 1.2rem;
    }

    .card-desc {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
}

/* Улучшения для тач-устройств */
@media (hover: none) and (pointer: coarse) {
    .place-card {
        -webkit-tap-highlight-color: transparent;
    }

    .place-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .filter-select,
    .card-btn {
        min-height: 44px; /* Минимальная высота для удобного нажатия */
    }

    .card-btn {
        cursor: pointer;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .places-page-container h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .places-filters-bar {
        padding: 15px;
        margin-bottom: 20px;
    }

    .card-image {
        height: 150px;
    }

    .card-content {
        padding: 15px;
    }

    .card-content h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .card-desc {
        -webkit-line-clamp: 2;
        margin-bottom: 15px;
    }

    .places-grid {
        gap: 20px;
        margin-bottom: 40px;
    }
}

/* Улучшение читаемости на мобильных */
@media (max-width: 768px) {
    .card-desc {
        text-align: justify;
        hyphens: auto;
    }

    .card-content h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Предотвращение увеличения шрифтов в iOS */
@supports (-webkit-touch-callout: none) {
    .filter-select,
    .card-btn {
        font-size: 16px; /* Предотвращает зум в iOS при фокусе */
    }
}

/* Плавные переходы для лучшего UX */
@media (prefers-reduced-motion: no-preference) {
    .place-card,
    .filter-select,
    .card-btn {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}


/* ========================================= */
/* ИСПРАВЛЕНИЯ АДАПТИВНОСТИ ДЛЯ МОБИЛЬНЫХ    */
/* ========================================= */

@media (max-width: 768px) {
    /* 1. ЧИНИМ ВСПЛЫВАЮЩИЕ ОКНА НА КАРТЕ */
    .leaflet-popup-content {
        min-width: 150px !important; /* Делаем попап еще компактнее */
        max-width: 200px !important;
        margin: 10px 12px;
    }

    .popup-content {
        padding: 8px;
    }

    .popup-image img {
        height: 100px; /* Уменьшаем высоту фото в попапе */
        width: 100%;
        object-fit: cover;
    }

    .popup-content h3 {
        font-size: 1rem;
        margin-bottom: 6px;
        padding-bottom: 4px;
        word-wrap: break-word; /* Запрещаем длинным словам (названиям) вылезать за рамки */
        hyphens: auto;
    }

    .popup-description {
        font-size: 0.75rem;
        margin: 6px 0;
        word-wrap: break-word; /* Запрещаем тексту описания вылезать за рамки */
    }

    .popup-coordinates {
        font-size: 0.65rem;
        word-wrap: break-word;
    }

    .details-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        width: 100%; /* Кнопка на всю ширину попапа для удобного нажатия */
        box-sizing: border-box;
    }
}

/* 2. ЧИНИМ КАРТОЧКИ НА СТРАНИЦЕ "ВСЕ МЕСТА" */

/* Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    .place-card {
        height: 300px; /* Уменьшаем общую высоту карточки для мобильных */
    }

    .card-image {
        height: 100%; /* ВАЖНО: заставляем фото заполнять всю высоту, убирая 190px */
        max-height: none;
    }
    
    .card-content {
        padding: 15px; /* Немного уменьшаем внутренние отступы контента */
    }
}

/* Планшеты (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .place-card {
        height: 330px; /* Слегка уменьшаем высоту по сравнению с ПК */
    }

    .card-image {
        height: 100%; /* ВАЖНО: убираем старое ограничение в 200px */
        max-height: none;
    }
}

/* Маленькие телефоны (до 360px) */
@media (max-width: 360px) {
    .place-card {
        height: 280px; /* Делаем карточки еще ниже для старых/маленьких смартфонов */
    }

    .card-image {
        height: 100%; /* ВАЖНО: убираем старое ограничение в 170px */
        max-height: none;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .place-card {
        height: 260px; /* Компактная высота для горизонтального просмотра */
    }
    .card-image {
        height: 100%;
    }
}


/* ========================================= */
/* КОМПЛЕКСНАЯ АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ (ПАТЧ)*/
/* ========================================= */

@media (max-width: 768px) {
    
    /* 1. АДАПТАЦИЯ ШАПКИ И ПОДВАЛА */
    .header-container, 
    .footer-container {
        flex-direction: column !important;
        align-items: center !important;
        padding: 15px 10px !important;
        gap: 15px !important;
    }

    .logo-section, 
    .footer-logo-section {
        flex-direction: column !important; /* Логотип над текстом */
        text-align: center !important;
        gap: 10px !important;
    }

    .site-name, 
    .footer-name {
        font-size: 1.4rem !important; /* Уменьшаем размер названия */
        text-align: center;
        white-space: normal; /* Позволяем тексту переноситься, если нужно */
    }

    .nav-menu, 
    .footer-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100%;
    }

    .nav-menu a, 
    .footer-nav a {
        font-size: 0.9rem !important;
        padding: 8px 12px !important;
        background-color: rgba(255,255,255,0.05); /* Легкий фон для кнопок меню на мобильных */
        border-radius: 8px;
    }


    /* 2. ИСПРАВЛЕНИЕ ПОПАПА НА КАРТЕ (Устраняем вылезание контента) */
    .leaflet-popup-content {
        width: 220px !important; /* Строго фиксируем ширину */
        margin: 12px !important;
    }

    .popup-content {
        width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .popup-image {
        width: 100% !important;
        margin: 0 0 10px 0 !important;
    }

    .popup-image img {
        width: 100% !important; /* ВАЖНО: картинка не может быть шире контейнера */
        max-width: 100% !important;
        height: 120px !important;
        object-fit: cover !important;
        display: block !important;
        border-radius: 6px !important;
    }

    .popup-content h3, 
    .popup-description, 
    .popup-coordinates {
        width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important; /* Жестко переносим длинные слова */
        white-space: normal !important;
    }


    /* 3. АДАПТАЦИЯ БЛОКА ФИЛЬТРОВ НА СТРАНИЦЕ "ВСЕ МЕСТА" */
    .places-filters-bar {
        flex-direction: column !important; /* Выстраиваем фильтры в колонку */
        align-items: stretch !important; /* Растягиваем на всю ширину */
        gap: 15px !important;
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    .filter-group {
        width: 100% !important;
    }

    .filter-select, 
    .multi-select, 
    .select-box {
        width: 100% !important; /* Поля выбора на всю ширину экрана */
        min-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Адаптация выпадающего списка мультиселекта */
    .dropdown-list {
        width: 100% !important;
        max-height: 200px !important; /* Делаем чуть ниже, чтобы удобно скроллить на телефоне */
    }
}
