/* Стили для главной страницы сервиса */
.left-sidebar {
    display: none;
}

.background {
    background-size: cover;
    background-position: center 35%;
    height: 400px;
    width: auto;
    position: relative;
    margin: -30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.search-mainform-container {
    background-color: rgba(255, 255, 255, 1);
    padding: 20px;
    border-radius: 16px;
    height: 65px;
    max-width: 700px;
    /*box-shadow: 0 1px 10px #a3a3a3;*/
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 auto;
}

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;
    /*border-radius: 18px;*/
}

/* Добавляем вертикальные линии через ::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 label {
    margin-bottom: 5px;
    font-size: 16px;
}

.input-mainform-group input {
    width: 100%;
    padding: 10px;
    border: none;
    /*border: 1px solid #ccc;*/
    border-radius: 18px;
    font-size: 16px;
    text-align: center;
}

.input-mainform-group input text {
    color: #383a3f;
}

body.dark-theme .input-mainform-group input {
    background-color: #383a3f;
    color: #fff;
}

.search-btn {
    padding: 10px 20px;
    background-color: #228B22;
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
}

.search-btn:hover {
    background-color: #289926;
}

/* Плейсхолдеры в светлой теме */
.input-mainform-group input::placeholder {
    color: #383a3f; /* Мягкий серый */
    opacity: 1; /* Для Firefox, где opacity может быть меньше */
}

/* Поддержка разных браузеров */
.input-mainform-group input::-webkit-placeholder { /* Chrome, Safari */
    color: #383a3f;
}
.input-mainform-group input:-moz-placeholder { /* Firefox до 18 */
    color: #383a3f;
}
.input-mainform-group input::-moz-placeholder { /* Firefox 19+ */
    color: #383a3f;
}
.input-mainform-group input:-ms-input-placeholder { /* IE */
    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;
}


.promo-text {
    color: #fff;
    font-size: 32px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);
    margin: 0 30px 30px auto;
}

.secondary-text {
    margin-top: 20px;
    font-size: 24px;
}

.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;
}

/* Стили плиток с объявлениями */
.property-image {
    position: relative;
    height: 200px;
    width: 300px;
    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: 24px;
    font-weight: 400;
}

.btn-more {
    background: #228B22;
    border-radius: 10px;
    height: 50px;
    width: 150px;
    color: #fff;
    font-size: 18px;
}

.btn-more:hover {
    background-color: #289926;
    color: #fff;
}

.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;
}

.items-slider-track {
    display: flex;
    flex-wrap: nowrap; /* Подборки в одном ряду, без переноса */
    overflow-x: auto; /* Горизонтальная прокрутка */
    scroll-behavior: smooth; /* Плавная прокрутка */
    gap: 20px; /* Расстояние между подборками */
    margin: 0px 10px;
}

/* Скрытие полосы прокрутки */
.items-slider-track::-webkit-scrollbar {
    display: none;
}
.items-slider-track {
    -ms-overflow-style: none; /* IE и Edge */
    scrollbar-width: none; /* Firefox */
}


/* Стили плиток с подборками */
.slider-track {
    display: flex;
    flex-wrap: nowrap; /* Подборки в одном ряду, без переноса */
    overflow-x: auto; /* Горизонтальная прокрутка */
    scroll-behavior: smooth; /* Плавная прокрутка */
    gap: 50px; /* Расстояние между подборками */
    margin: 0px 10px;
}

.collection-item {
    flex: 0 0 auto; /* Подборки не сжимаются */
    width: 100px; /* Фиксированная ширина подборки */
    text-align: center;
}

.collection-image {
    width: 60px;
    height: 60px;
    object-fit: cover; /* Сохраняем пропорции изображения */
}

.collection-name {
    margin-top: 5px;
    font-size: 16px;
    color: #383a3f;
}

body.dark-theme .collection-name {
    color: #fff;
}

/* Стили для слайдера типов объектов и подборок */
.property-types-slider-container {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    position: relative;
}

.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 {
    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;
}

.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;
}

.slider-arrow.left {
    left: 0px;
}

.slider-arrow.right {
    right: 0px;
}

/* Скрытие полосы прокрутки */
.slider-track::-webkit-scrollbar {
    display: none;
}
.slider-track {
    -ms-overflow-style: none; /* IE и Edge */
    scrollbar-width: none; /* Firefox */
}


/* Общий стиль для контейнеров слайдеров */
.collections-container, .properties-container, .property-types-slider-container {
    position: relative;
    overflow: hidden;
    margin: 10px 0px 20px 0px;
}

/* Левый градиент (по умолчанию скрыт) */
.collections-container::before, .properties-container::before, .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; /* Плавное появление/исчезновение */
}

/* Правый градиент (по умолчанию скрыт) */
.collections-container::after, .properties-container::after, .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;
}

/* Показываем градиенты при наличии классов */
.collections-container.has-left-gradient::before,
.properties-container.has-left-gradient::before,
.property-types-slider-container.has-left-gradient::before {
    opacity: 1; /* Показываем левый градиент */
}

.collections-container.has-right-gradient::after,
.properties-container.has-right-gradient::after,
.property-types-slider-container.has-right-gradient::after {
    opacity: 1; /* Показываем правый градиент */
}

/* Темная тема */
body.dark-theme .collections-container::before,
body.dark-theme .properties-container::before,
body.dark-theme .property-types-slider-container::before {
    background: linear-gradient(to right, #383a3f, transparent);
}

body.dark-theme .collections-container::after,
body.dark-theme .properties-container::after,
body.dark-theme .property-types-slider-container::after {
    background: linear-gradient(to left, #383a3f, transparent);
}

.news_info {
    font-size:  13px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
}

/* Кружочки с изображениями в левом нижнем углу */
.bottom-left-circles {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.circle-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

/* .circle-image:hover {
    transform: scale(1.1);
} */

.circle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Стили для мобильной версии */
@media (max-width: 768px) {
    .mobile-tile {
        flex: 0 0 auto;
        width: calc(50% - 5px); /* Две плитки в ширину с отступом */
        max-width: none;
        margin-right: 10px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Стиль заголовков для групп плиток */
    .mobile-grids-title {
        margin: 5px 0;
        font-size: 22px;
        font-weight: 600;
        align-self: start;
    }

    /* Cтили мобильного слайдера */
    .collections-slider {
        overflow: hidden;
        width: 100%;
        position: relative;
        padding: 0 0 10px 0;
        margin-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Трек, который перемещается */
    .collections-track {
        display: flex;
        gap: 10px;
        will-change: transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        padding-right: 20px; /* Показываем часть третьей плитки */
        /* Убираем transition для лучшего контроля через JavaScript */
    }

    /* Состояние активного слайдера */
    .collections-slider.active .collections-track {
        /* Убираем transition для точного контроля */
    }

    /* Плитки подборок в слайдере */
    .collection-track-tile {
        flex: 0 0 auto;
        width: auto; /* Ширина подстраивается под содержимое */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        position: relative;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Изображение подборки */
    .collection-image {
        width: 40px;
        height: 40px;
        object-fit: cover;
    }


    /* Название подборки */
    .collection-track-name {
        margin-top: 10px;
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        color: #383a3f;
    }

    /* Ссылка покрывает всю плитку */
    .collection-track-link {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* Стили слайдера объявлений */
    .properties-track-tile {
        flex: 0 0 auto;
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Делаем квадратную плитку */
        background-size: cover;
        background-position: center;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: relative;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    .properties-track-name {
        position: absolute;
        top: 10px;
        left: 10px;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        padding: 5px 10px;
        font-size: 16px;
        font-weight: bold;
        border-radius: 5px;
    }

    /* Цена */
    .properties-track-price {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        padding: 5px 10px;
        font-size: 14px;
        font-weight: bold;
        border-radius: 5px;
    }

    /* Ссылка покрывает всю плитку */
    .properties-track-link {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* Стили для информации о свойствах под плитками */
    .property-info {
        margin-top: 8px;
        padding: 0 5px;
    }

    .property-title {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .property-address {
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .property-price {
        font-size: 12px;
        font-weight: 600;
        color: #228B22;
        margin-bottom: 4px;
    }

    .property-rating {
        font-size: 12px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .property-rating i {
        color: #ffc141;
    }

    /* Стили для новостей */
    .news_info {
        font-size: 12px;
        color: #666;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .news_info div {
        margin-bottom: 2px;
    }

    .mobile-mode-button {
        padding: 10px 20px;
        margin: 0 10px;
        font-size: 16px;
        border: 2px solid #4CAF50;
        background-color: #fff;
        color: #4CAF50;
        cursor: pointer;
        border-radius: 5px;
        transition: background-color 0.3s, color 0.3s;
    }

    .mobile-mode-button.active {
        background-color: #4CAF50;
        color: white;
    }

    body.dark-theme .mobile-mode-button {
        background-color: #383a3f;
        color: #fff;
    }

    body.dark-theme .mobile-mode-button.active {
        background-color: #4CAF50;
        color: white;
    }

    body.dark-theme .collection-track-name {
        color: #fff;
    }

    .bottom-left-circles {
        bottom: 20px;
        left: 20px;
        gap: 10px;
    }
    
    .circle-image {
        width: 60px;
        height: 60px;
    }

    .module {
        margin: -12px 0 20px 0;
    }
}
