.left-sidebar {
    display: none;
}

.properties-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
}

.properties-list-card:hover {
    transform: scale(1.02);
}

body.dark-theme .properties-list-card {
    background-color: #383a3f;
    color: #fff;
    box-shadow: 0 2px 5px #fff;
}

/* Стили плиток с объявлениями */
.property-image {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(5deg); /* Эффект приподнятого правого края */
}

.property-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Поверх изображения, но под сердечком */
}

.wishlist-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    z-index: 2; /* Сердечко поверх ссылки */
}

.wishlist-heart i {
    -webkit-text-stroke: 1px white; /* Белая обводка по контуру сердечка */
    text-stroke: 1px white;
    cursor: pointer;
    color: #fff;
}

.wishlist-heart i:hover {
    transform: scale(1.2);
}

.wishlist-heart .fa-heart.wishlist-active {
    color: #228B22;
}

.wishlist-off i {
    color: #fff;
}

.property-type {
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 1px 10px #a3a3a3;
    border-radius: 10px;
    padding: 0 5px;
}

.label-1 {
    background-color: #ff264b;
}

.label-2 {
    background-color: #00b370;
}

.label-3 {
    background-color: #ffc141;
}

.label-4 {
    background-color: #00bbd3;
}

.label-5 {
    background-color: #696969;
}

.block-title {
    font-size: 30px;
    font-weight: 400;
}

.property-info {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.property-title {
    font-weight: bold;
    font-size: 16px;
}

.property-address {
    font-size: 13px;
}

.property-price {
    font-size: 16px;
    font-weight: 500;
}

.property-rating {
    font-size: 14px;
}

.fa-star {
    margin-right: 5px;
}


/* Стили стикеров фильтров */
.filters-container {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px auto;
    max-width: 1200px;
    width: 100%;
}

.filters-container.empty {
    display: none;
}

.filter-tag {
    background-color: #fff;
    border: 1px solid #C7C7C7;
    border-radius: 8px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    color: #228B22;
}

.filter-tag span {
    margin-right: 5px;
}

.remove-filter {
    color: #228B22;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.remove-filter:hover {
    color: tomato;
}

/* Стили для поисковой формы на странице списка объявлений */
.form-filter-area {
    display: flex; 
    flex-direction: row; 
    justify-content: space-between; 
    gap: 20px; 
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Форма поиска занимает 3/4 ширины */
.form-filter-area #searchForm {
    flex: 1;
    width: auto;
}

/* Кнопка фильтров занимает 1/4 ширины */
.form-filter-area .filters-button {
    flex: 0 0 auto;
    width: auto;
    max-width: 200px;
    min-width: 150px;
}

.search-form-area {
    flex-direction: row;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 1px 10px #a3a3a3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.search-fields {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

body.dark-theme .search-form-area {
    background-color: #383a3f;
    color: #f5f5f5;
}


/* Расширенная форма поиска занимает место кнопки "Фильтры" */
.search-form-area.expanded {
    width: calc(100% - 40px);
    /*transition: all 0.3s ease-in-out;*/
}

.search-input-group {
    background-color: #fff;
    color: #383a3f;
    border-radius: 18px;

}

body.dark-theme .search-input-group {
    background-color: #383a3f;
    color: #fff;
}

.search-input-group label {
    margin-bottom: 5px;
    font-size: 16px;
}

.search-input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 18px;
    font-size: 16px;
}

body.dark-theme .search-input-group input {
    background-color: #383a3f;
    color: #fff;
}

.search-btn {
    padding: 10px 40px;
    background-color: #228B22;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

.search-btn:hover {
    background-color: #289926;
}

.flatpickr-day.selected {
    background: #228B22 !important;
}

body.dark-theme .flatpickr-calendar {
    background-color: #383a3f;
    color: #fff;
}

body.dark-theme .flatpickr-day {
    color: #fff;
}

body.dark-theme .flatpickr-day.flatpickr-disabled{
    color: #333;
}

body.dark-theme .flatpickr-month {
    color: #fff;
}

body.dark-theme .flatpickr-weekday {
    color: #fff;
}

body.dark-theme .flatpickr-day.prevMonthDay {
    color: #5c5c5c;
}

body.dark-theme .flatpickr-next-month {
    fill: #8f8f8f;
}

body.dark-theme .flatpickr-prev-month {
    fill: #8f8f8f;
}

/* Кнопка "Закрыть" */
.close-filters-btn {
    cursor: pointer;
    background-color: #fff;
    color: #383a3f;
    border: none;
    border-radius: 5px;
    font-size: 40px;
}

body.dark-theme .close-filters-btn {
    background-color: #383a3f;
    color: #fff;
}

/* Стили для фильтра на странице списка объявлений */
.filters-button {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 16px;
    box-shadow: 0 1px 10px #a3a3a3;
    cursor: pointer;
    font-size: 18px;
    height: 60px;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.filters-button.hidden {
    display: none !important;
}

body.dark-theme .filters-button {
    background-color: #383a3f;
    color: #fff;
}

.price-range {
    display: flex;
    gap: 10px;
}

.styled-input {
    border: 1px solid #ddd;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    max-width: 120px;
    box-sizing: border-box;
}

body.dark-theme .styled-input {
    background-color: #383a3f;
    color: #fff;
}

/* Грид для плиток */
.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

/* Стили плиток */
.filter-tile {
    flex: 0 1 calc(25% - 10px); /* По 4 плитки в ряд */
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    max-width: 150px;
}

.filter-tile:hover {
    /*border: 2px solid #228B22;*/
    cursor: pointer;
}

.filter-tile input[type="checkbox"] {
    display: none;
}

.filter-tile.selected {
    border: 2px solid #228B22;
    cursor: pointer;
}

.filter-tile label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}


/* Изображения и подписи в плитках */
.tile-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
    cursor: pointer;
}

.tile-label {
    text-align: center;
    font-size: 16px;
    word-wrap: break-word;
    cursor: pointer;
}

.filter-group-label {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0px 5px 0px;
}

.sort-button {
    border: 2px solid #228B22;
    color: #228B22;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    margin: 5px;
    background: fff;
}

.sort-button.active {
    background: #228B22;
    color: white;
    border: none;
    outline: none;
}

body.dark-theme .sort-button {
    background-color: #383a3f;
    color: #fff;
}

body.dark-theme .sort-button.active {
    background: #228B22;
    color: white;
    border: none;
    outline: none;
}

/* Стили для мобильного экрана */
.main-search-mobile.hidden {
    display: none !important;
}

.search-promo-title {
    font-size: 30px;
    margin: 20px 0px;
}

/* Стили формы поиска с главной страницы */
.search-mainform-container {
    background-color: rgba(255, 255, 255, 1);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 1px 10px #a3a3a3;
    height: 65px;
    /*max-width: 700px;*/
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
}

body.dark-theme .search-mainform-container {
    background-color: rgba(56, 58, 63, 1);
    color: #f5f5f5;
}

.input-mainform-group {
    background-color: #fff;
    color: #383a3f;
    position: relative;
}

/* Добавляем вертикальные линии через ::after */
.input-mainform-group:nth-last-child(n+3)::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 5%;
    height: 90%;
    width: 1px;
    background-color: #383a3f;
}

/* Убираем лишние линии у кнопки */
.input-mainform-group:last-child::after {
    display: none;
}

body.dark-theme .input-mainform-group:not(:last-child)::after {
    background-color: #fff;
}

body.dark-theme .input-mainform-group {
    background-color: #383a3f;
    color: #fff;
}

.input-mainform-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    text-align: center;
}

body.dark-theme .input-mainform-group input {
    background-color: #383a3f;
    color: #fff;
}

/* Плейсхолдеры в светлой теме */
.input-mainform-group input::placeholder {
    color: #383a3f;
    opacity: 1;
}

/* Поддержка разных браузеров */
.input-mainform-group input::-webkit-placeholder {
    color: #383a3f;
}
.input-mainform-group input:-moz-placeholder {
    color: #383a3f;
}
.input-mainform-group input::-moz-placeholder {
    color: #383a3f;
}
.input-mainform-group input:-ms-input-placeholder {
    color: #383a3f;
}

/* Плейсхолдеры в темной теме */
body.dark-theme .input-mainform-group input::placeholder {
    color: #fff;
}

/* Поддержка темной темы в разных браузерах */
body.dark-theme .input-mainform-group input::-webkit-placeholder {
    color: #fff;
}
body.dark-theme .input-mainform-group input:-moz-placeholder {
    color: #fff;
}
body.dark-theme .input-mainform-group input::-moz-placeholder {
    color: #fff;
}
body.dark-theme .input-mainform-group input:-ms-input-placeholder {
    color: #fff;
}

/* Слайдер типов объектов */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px; /* Добавляем отступы для контента */
}

.property-types-slider-container {
    width: 100%;
    border-bottom: 1px solid #e0e0e0; /* Тонкая серая полоса */
    margin: 0 0 20px 0;
    position: relative;
    overflow: hidden;
}

/* Стили для стрелок слайдера */
.property-types-slider-container .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #228B22;
    color: #228B22;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    display: none; /* Скрыты по умолчанию */
    z-index: 3;
}

.property-types-slider-container .slider-arrow.left {
    left: 0px;
}

.property-types-slider-container .slider-arrow.right {
    right: 0px;
}

/* Градиентные размытия для слайдера типов объектов */
.property-types-slider-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, #fff, transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-types-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to left, #fff, transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-types-slider-container.has-left-gradient::before {
    opacity: 1;
}

.property-types-slider-container.has-right-gradient::after {
    opacity: 1;
}

/* Темная тема для градиентов */
body.dark-theme .property-types-slider-container::before {
    background: linear-gradient(to right, #383a3f, transparent);
}

body.dark-theme .property-types-slider-container::after {
    background: linear-gradient(to left, #383a3f, transparent);
}

.property-types-slider-container::-webkit-scrollbar {
    display: none; /* Скрыть скроллбар для чистоты */
}

.property-types-slider-container .slider-track {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* Изменяем с center на flex-start */
    gap: 30px;
    padding: 0 30px; /* Увеличиваем отступы */
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

.property-types-slider-container .slider-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.property-types-slider-container .property-type-item {
    text-align: center;
    padding-bottom: 10px;
    position: relative;
    white-space: nowrap;
}

.property-types-slider-container .property-type-item.active {
    /*color: #28a745;*/
    font-weight: 600;
}

.property-types-slider-container .property-type-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Лежит на серой линии */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #28a745; /* Зеленая линия */
}

.property-types-slider-container .property-type-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.property-types-slider-container .property-type-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.property-types-slider-container .property-type-name {
    font-size: 14px;
}

.properties-list-container {
    margin: 30px 0px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .logo-block {
        margin: -10px 0px 30px 0px;
        z-index: 100;
    }

    .properties-list {
        grid-template-columns: 1fr;
        margin-top: 0px !important;
    }

    /* На мобильных устройствах форма и кнопка фильтров занимают полную ширину */
    .form-filter-area {
        flex-direction: column;
        gap: 10px;
    }

    .form-filter-area #searchForm {
        width: 100%;
        flex: none;
    }

    .form-filter-area .filters-button {
        width: 100%;
        flex: none;
        min-width: auto;
    }

    /* Расширенный фильтр на мобильном экране */
    #search-form-area {
        position: relative;
        top: -80px;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        height: 100%;
        background-color: white;
        overflow-x: hidden;
        overflow-y: auto; /* Скролл только по вертикали */
        z-index: 1001;
        padding: 20px 0px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        margin: 0; /* Центрируем контейнер */
        max-width: 98%; /* Убедимся, что контейнер не выходит за пределы экрана */
    }

    #searchForm {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

     #extended-filters {
        width: 100%; /* Полная ширина */
        padding: 10px; /* Отступы внутри контейнера */
        overflow-x: hidden; /* Скрываем горизонтальную прокрутку */
    }

    .search-fields {
        display: flex;
        flex-direction: column;
        width: 95%;
        margin-bottom: -70px;
    }

    .search-input-group {
        width: 95%;
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        margin: 5px 0;
    }

    .search-input-group input {
        width: 95%; /* Поля ввода занимают всю доступную ширину */
        box-sizing: border-box; /* Учитываем отступы и границы */
        background: #fff;
        border-radius: 10px;
    }

    .flatpickr-input {
        width: 95% !important;
        min-width: 120px; /* Минимальная ширина, чтобы placeholder был виден */
        /*font-size: 16px; /* Удобный размер текста */
    }

    .search-input-group input[type="date"]:before {
      content: attr(placeholder);
      color: grey;
      text-align: left;
      margin-right: 10px;
      /* Дополнительные стили */
    }

    .search-input-group input[type="date"]:focus:before {
      content: none;
    }

    .search-promo-title {
        font-size: 20px;
        margin: 10px 0px;
    }

    .filter-grid {
        flex-wrap: nowrap; /* Убираем перенос элементов на новую строку */
        overflow-x: auto; /* Включаем горизонтальную прокрутку */
        scroll-behavior: smooth; /* Плавная прокрутка */
        gap: 10px; /* Отступы между плитками */
        margin: 0 15px;
    }

    .filter-group {
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .filter-buttons {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .filter-buttons button {
        flex: 1;
    }

    .filter-buttons-fixed .close-filters-btn:hover {
        border: none;
    }

    /* Изображения в плитках */
    .filter-tile img {
        width: 60px; /* Устанавливаем фиксированный размер изображения */
        height: 60px;
        object-fit: contain; /* Сохраняем пропорции изображения */
    }

    /* Текстовые метки в плитках */
    .filter-tile .tile-label {
        font-size: 14px; /* Размер шрифта */
        text-align: center;
        word-wrap: break-word; /* Перенос длинных слов */
    }

    .sort-button {
        flex: 0 0 auto;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
    }

     .close-filters-btn {
        position: absolute; /* Позиционируем кнопку относительно родительского контейнера */
        top: 10px; /* Отступ от верхнего края */
        right: 10px; /* Отступ от правого края */
        z-index: 1050; /* Убедитесь, что кнопка находится поверх других элементов */
        background: none; /* Без фона */
        border: none; /* Убираем рамку */
        font-size: 40px; /* Размер кнопки */
        color: #333; /* Цвет кнопки */
        cursor: pointer; /* Указатель мыши при наведении */
    }

    .close-filters-btn:hover {
        color: #000; /* Более темный цвет при наведении */
    }

    body.dark-theme .search-form-area {
        background-color: #383a3f !important;
        color: #f5f5f5;
    }

    body.dark-theme .filter-tile {
        background-color: #383a3f !important;
        color: #f5f5f5;
    }

    .filter-buttons-fixed {
        position: fixed; /* Фиксация внизу экрана */
        bottom: 0;
        left: 0;
        width: 100%; /* Ширина блока */
        background-color: #fff; /* Белый фон */
        z-index: 1050; /* Поверх всего */
        display: flex;
        justify-content: start;
        align-items: center;
        padding: 10px; /* Отступы внутри блока */
        border-top: 1px solid #ddd; /* Линия сверху */
    }

    body.dark-theme .filter-buttons-fixed {
        background-color: #383a3f; /* Темный фон */
        color: #fff; /* Светлый текст */
    }

    .filter-buttons-fixed button {
        flex: 1;
        margin: 0 5px; /* Промежуток между кнопками */
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        text-align: center;
    }

    .filter-buttons-fixed .close-filters-btn {
        color: #383a3f;
        background: none;
        border: none;
        font-size: 24px;
    }

    .filter-buttons-fixed .close-filters-btn:hover {
        color: #000;
    }

    .horizontal-scroll-container {
        display: flex;
        flex-wrap: nowrap; /* Элементы выстраиваются в один ряд */
        overflow-x: auto; /* Включаем горизонтальную прокрутку */
        scroll-behavior: smooth; /* Плавная прокрутка */
        gap: 10px; /* Расстояние между элементами */
    }

    .horizontal-scroll-container::-webkit-scrollbar {
        display: none; /* Убираем полосу прокрутки */
    }

    /* Элементы внутри контейнера */
    .horizontal-scroll-container > * {
        flex-shrink: 0; /* Запрещаем сжатие элементов */
        flex-grow: 0; /* Элементы не растягиваются */
    }

    /* Кнопки сортировки */
    #sorting-buttons {
        display: flex; /* Горизонтальное выравнивание элементов */
        overflow-x: hidden; /* Скрываем горизонтальную прокрутку внутри контейнера */
        -webkit-overflow-scrolling: touch; /* Поддержка плавного свайпа на iOS */
        scroll-behavior: smooth; /* Плавная прокрутка */
        gap: 10px; /* Расстояние между кнопками */
        padding: 10px 10px; /* Отступы для удобства свайпа */
        position: relative;
        max-width: calc(100% - 100px); /* Ограничиваем ширину контейнера */
        margin: 10px auto; /* Центрируем контейнер */
        /* mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);  /* Градиентные края */
        /*-webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); /* Градиентные края для Safari */
    }

    #sorting-buttons .sort-button {
        flex: 0 0 auto; /* Устанавливаем фиксированную ширину для кнопок */
        min-width: 100px; /* Минимальная ширина кнопки */
        text-align: center;
        white-space: nowrap; /* Предотвращаем перенос текста */
        padding: 10px 15px;
        border-radius: 10px;
        border: 2px solid #228B22;
        color: #228B22;
        background: #383a3f;
        cursor: pointer;
        transition: background 0.3s, color 0.3s;
    }

    #sorting-buttons .sort-button.active {
        background: #228B22;
        color: white;
    }

    #sorting-buttons .sort-button:hover {
        background: #289926;
        color: white;
    }

    /* Скрываем стандартные полосы прокрутки */
    #sorting-buttons::-webkit-scrollbar {
        display: none; /* Для Chrome и Safari */
    }

    #sorting-buttons {
        -ms-overflow-style: none; /* Для IE и Edge */
        scrollbar-width: none; /* Для Firefox */
    }

    #sorting-buttons.horizontal-scroll-container {
        max-width: 420px;
        overflow-x: auto;
    }

    #amenities, #beds {
        width: calc(95% - 40px); /* Ограничиваем ширину контейнера */
        margin: 10px auto;
    }

   .filter-tile {
        flex: 0 0 auto; /* Запрещаем сжатие и расширение плиток */
        min-width: 120px; /* Минимальная ширина плитки */
        max-width: 150px; /* Максимальная ширина плитки */
        padding: 10px 15px; /* Внутренний отступ */
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #fff;
        cursor: pointer;
        display: flex;
        flex-direction: column; /* Плитки содержат изображение сверху и текст ниже */
        align-items: center;
        gap: 5px; /* Пространство между изображением и текстом */
        box-sizing: border-box;
    }

   /* Горизонтальная прокрутка для плиток удобств и кроватей */
    #amenities.horizontal-scroll-container,
    #beds.horizontal-scroll-container {
        display: flex;
        flex-wrap: nowrap; /* Запрещаем перенос элементов на новую строку */
        overflow-x: hidden; /* Скрываем горизонтальную полосу прокрутки */
        position: relative; /* Для применения градиента */
        -webkit-overflow-scrolling: touch; /* Плавный свайп для iOS */
        scroll-behavior: smooth; /* Плавная прокрутка */
        gap: 10px; /* Расстояние между плитками */
        padding-bottom: 10px;
        /*mask-image: linear-gradient(to right, transparent, black 10%, black 50%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 50%, transparent);*/
        width: auto; /* Ограничиваем ширину контейнера */
        max-width: 100%;
        margin: 10px auto; /* Центрируем контейнер */
    }
}

/* Сортировка объявлений */
.sorting-area {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: start;
    flex: 1;
}
    
.sort-dropdown-btn {
    background: #fff;
    /*border: 1px solid #e0e0e0;*/
    border: none;
    border-radius: 12px;
    padding: 10px 24px 10px 16px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    /*box-shadow: 0 1px 6px rgba(0,0,0,0.04);*/
    transition: border 0.2s;
    color: #228B22;
}

.sort-dropdown-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    min-width: 180px;
    padding: 8px 0;
    margin-top: 4px;
    z-index: 100;
    display: none;
}
.sort-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.15s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.sort-dropdown-item {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    color: #222;
    transition: background 0.15s;
}
.sort-dropdown-item:hover, .sort-dropdown-item.active {
    background: #f2f8f2;
    color: #228B22;
}
@media (max-width: 768px) {
    .filters-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .sort-dropdown { width: 100%; }
    .sort-dropdown-btn { width: 100%; }
    .sort-dropdown-menu { min-width: 100%; }
}

/* Стили для модального окна фильтров в соответствии с дизайном */
.modal-filters {
    max-width: 520px;
    margin: 30px auto;
}

.filters-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

.filters-header {
    border-bottom: none;
    padding: 24px 24px 0 24px;
    text-align: center;
}

.filters-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.filters-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #717171;
    opacity: 1;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}

.filters-close:hover {
    background: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}

.filters-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 139, 34, 0.5);
}

/* Стили для темной темы */
body.dark-theme .filters-close {
    background: #444;
    color: #fff;
}

body.dark-theme .filters-close:hover {
    background: #555;
    color: #fff;
}

body.dark-theme .filters-close:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Увеличиваем размер кнопки на мобильных устройствах */
@media (max-width: 768px) {
    .filters-close {
        width: 48px;
        height: 48px;
        font-size: 28px;
        top: 8px;
        right: 8px;
        color: #555;
        z-index: 1050;
    }

    /* Стили мобильного слайдера типов объектов и подборок */
    .collections-slider {
        overflow-x: auto;
        overflow-y: hidden;
        width: 100vw;
        max-width: 100%;
        position: relative;
        padding: 15px 0 10px 0;
        margin-top: 30px;
        margin-bottom: 0px;
        -webkit-overflow-scrolling: touch;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        border-bottom: 1px solid #ebebeb;
        scroll-behavior: smooth;
    }

    /* Скрываем полосу прокрутки */
    .collections-slider::-webkit-scrollbar {
        display: none;
    }

    .collections-slider {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Трек, который перемещается */
    .collections-track {
        display: flex;
        transition: transform 0.3s ease;
        gap: 25px;
        padding: 0 15px;
        width: max-content;
    }

    /* Плитки подборок в слайдере */
    .collection-track-tile {
        flex: 0 0 auto;
        width: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px;
        position: relative;
        transition: all 0.3s ease;
        min-height: 70px;
    }

    /* Активное состояние для выбранного элемента */
    .collection-track-tile.active {
        font-weight: 600;
    }

    .collection-track-tile.active::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #28a745;
    }

    .collection-track-tile.active .collection-track-name {
        font-weight: 600;
        color: #383a3f;
    }

    body.dark-theme .collection-track-tile.active .collection-track-name {
        color: #fff;
    }

    /* Контейнер изображения подборки */
    .collection-image {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    /* Название подборки */
    .collection-track-name {
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        color: #383a3f;
        line-height: 1.2;
        word-wrap: break-word;
        max-width: 60px;
    }

    /* Ссылка покрывает всю плитку */
    .collection-track-link {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* Стили для темной темы */
    body.dark-theme .collection-track-name {
        color: #fff;
    }

    body.dark-theme .collections-slider {
        border-bottom: 1px solid #444;
    }

    /* Отступы для контейнера фильтров на мобильных */
    .filters-container {
        margin: 0px auto !important;
        padding: 0;
    }

    .module {
        margin: 10px;
        padding: 0;
    }
}

.filters-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Секции фильтров */
.filter-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ebebeb;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

.filter-section-subtitle {
    font-size: 14px;
    color: #717171;
    margin: 0 0 16px 0;
}

/* Секция цены */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-range-inputs.with-rental-types {
    margin-top: 16px;
}

.price-input {
    flex: 1;
    height: 48px;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    background: #fff;
}

.price-input:focus {
    outline: none;
    border-color: #222;
    border-width: 2px;
}

.price-separator {
    font-size: 16px;
    color: #717171;
    font-weight: 500;
}

/* Плитки типов оплаты */
.rental-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.rental-type-tile {
    position: relative;
    border: 1px solid #dddddd;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-align: center;
}

.rental-type-tile:hover {
    border-color: #228B22;
}

.rental-type-tile.selected {
    border-color: #228B22;
    background: #f7f7f7;
}

.rental-type-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rental-type-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.rental-type-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.rental-type-name {
    font-size: 12px;
    font-weight: 400;
    color: #222;
    line-height: 1.3;
}

/* Секция комнат и кроватей */
.room-bed-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-label {
    font-size: 16px;
    color: #222;
    font-weight: 400;
}

.counter-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #b0b0b0;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    color: #717171;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-btn:hover {
    border-color: #222;
    color: #222;
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.counter-input {
    width: 60px;
    text-align: center;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    font-weight: 400;
    color: #222;
    padding: 8px 4px;
}

.counter-input:focus {
    outline: none;
    border-color: #222;
    border-width: 2px;
}

/* Секция удобств */
.amenities-grid,
.dynamic-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.amenity-tile {
    position: relative;
    border: 1px solid #dddddd;
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.amenity-tile:hover {
    border-color: #228B22;
}

.amenity-tile.selected {
    border-color: #228B22;
    background: #f7f7f7;
}

.amenity-tile input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.amenity-tile-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.amenity-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.amenity-name {
    font-size: 12px;
    font-weight: 400;
    color: #222;
    line-height: 1.3;
}

/* Динамические поля */
.text-filter-input,
.number-filter-input {
    width: 100%;
    height: 48px;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    background: #fff;
    margin-top: 8px;
}

.text-filter-input:focus,
.number-filter-input:focus {
    outline: none;
    border-color: #222;
    border-width: 2px;
}

.choice-filter-select {
    width: 100%;
    height: 48px;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    background: #fff;
    margin-top: 8px;
}

.choice-filter-select:focus {
    outline: none;
    border-color: #222;
    border-width: 2px;
}

.boolean-filter {
    margin-top: 8px;
}

.boolean-filter-input {
    margin-right: 12px;
}

.boolean-filter-label {
    font-size: 16px;
    color: #222;
    cursor: pointer;
}

/* Футер модального окна */
.filters-footer {
    border-top: none;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-btn-clear {
    background: none;
    border: none;
    color: #222;
    font-size: 16px;
    font-weight: 400;
    /*text-decoration: underline;*/
    cursor: pointer;
    padding: 0;
}

.filters-btn-clear:hover {
    color: #717171;
}

.filters-btn-apply {
    background: #228B22;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.filters-btn-apply:hover {
    background: #484848;
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-filters {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }

    .filters-content {
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .filters-body {
        flex: 1;
        max-height: none;
    }

    .amenities-grid,
    .dynamic-amenities-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .rental-types-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .rental-type-name {
        font-size: 11px;
    }

    .price-range-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .filters-footer {
        flex-direction: column;
        gap: 16px;
    }

    .filters-btn-apply {
        width: 100%;
        order: 1;
    }

    .filters-btn-clear {
        order: 2;
    }
}
