/* Общая обёртка страницы */
.page-regions {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px 60px;
    box-sizing: border-box;
}

.page-regions * {
    box-sizing: border-box;
}

.page-regions a {
    text-decoration: none !important;
}

.section-title {
    font-size: 32px;
    font-weight: 400;
    margin: 40px 0 24px;
    color: #2b3243;
}

/* ---------- POPULAR SLIDER ---------- */

.popular-slider-wrapper {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    margin-bottom: 48px;
}

/* Контейнер слайдера */
.popular-slider-container {
    width: 100%;
}

/* Слайды: 3 карточки на десктопе */
.popular-swiper .swiper-wrapper {
    align-items: stretch;
}

.popular-swiper .swiper-slide {
    display: flex;
    height: auto;
}

/* Карточка популярного региона */
.popular-region-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    padding: 24px 24px 26px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 185px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* БЕЗ сдвига вверх, чтобы не резало карточку */
.popular-region-card:hover {
    border-color: #e2e2e2;
    box-shadow: none;
}

.pr-title {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 300;
    margin-bottom: 8px;
    color: #2b3243;
}

.pr-count {
    font-size: 14px;
    color: #7c818f;
}

/* Кнопка "Перейти" */
.pr-btn {
    display: inline-block;
    margin-top: 18px;
    background: #a6ce38;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pr-btn:hover {
    background: #98bc33;
    box-shadow: 0 8px 20px rgba(166, 206, 56, 0.35);
}

/* Стрелки */
.popular-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #f3f3f3;
    background: #ffffff;
    cursor: pointer;
    padding: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.popular-arrow:hover {
    background: #f5f9ff;
    border-color: #a6ce38;
    transform: translateY(-1px);
}

.popular-arrow::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #4a4f5f;
    border-right: 2px solid #4a4f5f;
}

.popular-prev::before {
    transform: rotate(-135deg);
}

.popular-next::before {
    transform: rotate(45deg);
}

/* ---------- FILTERS (SEARCH + SORT) ---------- */

.region-filters {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.region-filters input,
.region-filters select {
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #e6e6e6;
    font-size: 16px;
    outline: none;
    background: #ffffff;
}

.region-filters input::placeholder {
    color: #b7bcc8;
}

/* ---------- ALL REGIONS GRID ---------- */

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.region-grid-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #f0f0f0;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.region-grid-card:hover {
    transform: translateY(-4px);
    border-color: #e2e2e2;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.r-title {
    font-size: 18px;
    font-weight: 300;
    color: #2b3243;
}

.r-count {
    margin-top: 8px;
    font-size: 14px;
    color: #7c818f;
}

/* ---------- ADAPTIVE ---------- */

@media (max-width: 1024px) {
    .popular-slider-wrapper {
        column-gap: 16px;
    }

    .popular-arrow {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
        margin: 32px 0 20px;
    }

    .popular-slider-wrapper {
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 10px;
        margin-bottom: 32px;
    }

    .popular-region-card {
        padding: 20px 18px 22px;
        border-radius: 20px;
    }

    .pr-btn {
        border-radius: 14px;
    }

    .region-filters {
        grid-template-columns: 3fr 1.3fr;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .page-regions {
        padding: 0 16px 40px;
    }

    .popular-arrow {
        width: 38px;
        height: 38px;
    }

    .popular-arrow::before {
        width: 10px;
        height: 10px;
    }

    .region-filters {
        grid-template-columns: 2fr 1.1fr;
    }
}