body {
    font-family: 'DM Sans', sans-serif;
    color: #212529;
}

.primary-nav-link {
    font-size: 1.3rem;
    padding: 0.8rem 1rem;
    color: #212529;
    font-weight: 600;
}

    .primary-nav-link:hover {
        color: #2b6f3e;
        text-decoration: none;
    }

.social-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
}

header .nav {
    flex-grow: 1;
    justify-content: center;
    align-items: center;
}

    header .nav .nav-item + .nav-item {
        margin-left: 0.5rem;
    }

header .header-contacts {
    margin-left: auto;
}
/* Filters collapsible */
.filter-heading {
    cursor: pointer;
    border-bottom: 1px solid #2b6f3e;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

    .filter-heading .chevron {
        transition: transform 0.3s ease;
    }

.filter-group.open .filter-heading .chevron {
    transform: rotate(180deg);
}

.filter-content {
    display: none;
}

.filter-group.open .filter-content {
    display: block;
}

.filter-heading {
    border-color: #2b6f3e;
}

/* ----------------------------- */
/* Custom property card and slider styles */

/* Root emerald colour variable */
:root {
    --emerald-color: #2b6f3e;
}

/* Responsive layout for listing columns */
#listingsContainer > div {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    #listingsContainer > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Property card container */
.property-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    border: 1px solid #e8e8e8;
}

    /* Image wrapper with aspect ratio */
    .property-card .image-wrapper {
        position: relative;
        width: 100%;
        padding-top: 56.25%;
        overflow: hidden;
    }

        .property-card .image-wrapper img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Navigation arrows for sliding images */
        .property-card .image-wrapper .image-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.8);
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--emerald-color);
            cursor: pointer;
            transition: background-color 0.2s;
            padding: 0;
        }

            .property-card .image-wrapper .image-nav.prev {
                left: 12px;
            }

            .property-card .image-wrapper .image-nav.next {
                right: 12px;
            }

            .property-card .image-wrapper .image-nav:hover {
                background-color: rgba(255, 255, 255, 1);
            }

        /* Photo counter in bottom-right of image */
        .property-card .image-wrapper .photo-count {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background-color: rgba(255, 255, 255, 0.8);
            color: var(--emerald-color);
            padding: 2px 6px;
            border-radius: 12px;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
        }

            .property-card .image-wrapper .photo-count i {
                margin-right: 4px;
            }

    /* Card body and text */
    .property-card .card-body {
        padding: 1rem;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .property-card .price {
        font-weight: 700;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .property-card .subtitle {
        display: flex;
        align-items: center;
        font-size: 0.875rem;
        color: #666666;
        margin-bottom: 0.25rem;
    }

        .property-card .subtitle i {
            color: var(--emerald-color);
            margin-right: 0.25rem;
        }

    .property-card .description {
        font-size: 0.875rem;
        color: #444444;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0.75rem;
    }

    .property-card .features {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

        .property-card .features span {
            display: flex;
            align-items: center;
            color: #555555;
        }

            .property-card .features span i {
                color: var(--emerald-color);
                margin-right: 0.25rem;
            }

    .property-card .card-footer {
        border-top: 1px solid #efefef;
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

        .property-card .card-footer .date {
            color: #999999;
        }

        .property-card .card-footer .btn-details {
            background-color: var(--emerald-color);
            color: #ffffff;
            border: none;
            border-radius: 4px;
            padding: 0.4rem 0.8rem;
            text-decoration: none;
            font-weight: 600;
            transition: background-color 0.2s;
        }

            .property-card .card-footer .btn-details:hover {
                background-color: #226732;
            }

/* Colour chevron icons in filter headings */
.filter-heading .chevron {
    color: var(--emerald-color);
}

/* Style selects */
#sortSelect,
#typeSelect {
    border-color: var(--emerald-color);
    color: var(--emerald-color);
}

    #sortSelect:focus,
    #typeSelect:focus {
        box-shadow: none;
    }

/* Filter action buttons */
.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

    .filter-actions .btn-reset,
    .filter-actions .btn-apply {
        border-radius: 4px;
        padding: 0.4rem 0.8rem;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .filter-actions .btn-reset {
        background-color: transparent;
        color: var(--emerald-color);
        border: 1px solid var(--emerald-color);
    }

        .filter-actions .btn-reset:hover {
            background-color: var(--emerald-color);
            color: #ffffff;
        }

    .filter-actions .btn-apply {
        background-color: var(--emerald-color);
        color: #ffffff;
        border: none;
    }

        .filter-actions .btn-apply:hover {
            background-color: #226732;
        }
.btn-outline-secondary.active,
.btn-outline-secondary.btn-success.active {
    background-color: #198754 !important; /* зелёный фон */
    border-color: #198754 !important; /* зелёная рамка */
    color: #fff !important; /* белый текст */
}
/* Карточка: контейнер картинки — чтобы бейдж позиционировался */
.image-wrapper {
    position: relative;
    overflow: hidden;
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
}

/* Бейдж счётчика фото */
.photo-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #fff !important;
    background-color: #004d36 !important; /* изумруд */
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

    /* Иконка камеры (встроенный svg), всегда белая */
    .photo-count::before {
        content: "";
        width: 16px;
        height: 16px;
        display: inline-block;
        background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M20 5h-3.2l-1.5-2H8.7L7.2 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm-8 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/></svg>");
    }
.image-wrapper {
    position: relative;
}

.property-img {
    width: 100%;
    display: block;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,77,54,0.8);
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}

    .arrow.prev {
        left: 10px;
    }

    .arrow.next {
        right: 10px;
    }

    .arrow:hover {
        background: #004d36;
    }

.top-type-bar > a:nth-of-type(1),
.top-type-bar > a:nth-of-type(2) {
    display: none !important;
}
:root {
    --emerald: #059669;
    --emerald-dark: #065f46;
    --gray-200: #e5e7eb;
}

/* Заголовки секций фильтров (как в аккордеоне) */
.filter-section {
    margin-bottom: 16px;
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: 600;
    color: var(--emerald-dark);
    border-top: 2px solid var(--emerald);
    border-bottom: 2px solid var(--emerald);
}

    .filter-title.static {
        cursor: default;
    }

.filter-body {
    padding-top: 10px;
}

/* Вертикальный список "Тип" */
.type-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.type-link {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    text-decoration: none;
    color: #111827;
    background: #fff;
}

    .type-link:hover {
        border-color: var(--emerald);
        box-shadow: 0 0 0 2px rgba(5,150,105,.15);
    }

    .type-link.active {
        border-color: var(--emerald);
        background: rgba(5,150,105,.08);
    }
.top-type-bar > a {
    display: none !important;
}

/* Скрыть второй верхний ряд (дом/комерция) */
.type-types-row {
    display: none !important;
}
/* 1) убрать лишнюю верхнюю полоску над первой секцией ("Тип") */
#filters .filter-section:first-child .filter-title {
    border-top: none !important;
    padding-top: 0;
    margin-top: 0;
}

/* 2) кнопки в блоке "Тип" — как у остальных фильтров */
.type-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Кнопки "Тип" — по ширине текста, но каждая с новой строки */
.type-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start; /* чтобы элементы не растягивались */
}

    .type-list-vertical .btn {
        width: auto; /* ключевой момент */
        text-align: left;
    }
:root {
    --emerald: #059669; /* изумрудный акцент */
    --emerald-dark: #065f46; /* тёмный изумруд - заголовок */
}

/* Аккордеоны фильтров */
.filter-section {
    margin-bottom: 16px;
}

.filter-title {
    position: relative;
    padding: 10px 0;
    font-weight: 600;
    color: var(--emerald-dark);
    border-top: 2px solid var(--emerald);
    border-bottom: 2px solid var(--emerald);
    cursor: pointer;
    user-select: none;
}

    /* стрелка-галочка справа */
    .filter-title::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--emerald-dark);
        border-bottom: 2px solid var(--emerald-dark);
        transform: translateY(-50%) rotate(-45deg); /* закрыто */
        transition: transform .18s ease;
    }

/* открыто */
.filter-section.open .filter-title::after {
    transform: translateY(-50%) rotate(135deg);
}

/* тело секции скрыто по умолчанию */
.filter-body {
    display: none;
    padding-top: 10px;
}

.filter-section.open .filter-body {
    display: block;
}

/* убрать верхнюю линию у самой первой секции ("Тип") */
#filters .filter-section:first-child .filter-title {
    border-top: none !important;
    padding-top: 0;
    margin-top: 0;
}

/* Всегда открытые фильтры на десктопе */
@media (min-width: 992px) {
    #filters .filter-section .filter-body {
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    /* Если иконка/стрелка завязана на .open — зафиксируем её */
    #filters .filter-section .filter-title::after {
        transform: none !important;
    }
}