/* =========================
   Блок города
========================= */
.city-block {
    max-width: 1400px;
    margin: 24px auto;
    padding: 20px 20px 30px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
/* =========================
   Header города
========================= */
.city-header {
    margin-bottom: 12px;
}

.city-intro {
    font-size: 14px;
    color: #555;
    margin: 4px 0 6px;
    max-width: 900px;
}

.city-description {
    font-size: 14px;
    color: #666;
    max-width: 900px;
}


/* Заголовок города */
.city-title {
    margin: 0 0 8px;
    font-size: 24px;
    color: #5a2b7a;
}

.city-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 4px;
    background: linear-gradient(90deg, #0057b7, #ffd700);
    border-radius: 2px;
}

/* Описание города */
.city-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    max-width: 900px;
}

/* =========================
   Сетка города
========================= */
.city-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

/* Карточка */
.city-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.city-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Вся карточка — ссылка */
.city-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Картинка */
.city-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Заголовок новости */
.city-title-post {
    font-size: 18px;
    font-weight: 500;
    margin: 8px 12px 0;
    color: #333;
    transition: color .2s, text-decoration .2s;
}

.city-card-link:hover .city-title-post {
    color: #5a2b7a;
    text-decoration: underline;
}

/* Дата */
.city-date {
    font-size: 14px;
    color: #666;
    margin: 4px 12px 12px;
}

/* =========================
   Вертикальные линии
========================= */
.city-card:not(:nth-child(3n))::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: -20px;
    width: 1px;
    background: linear-gradient(
        to bottom,
        rgba(90,43,122,0),
        rgba(90,43,122,0.2) 50%,
        rgba(90,43,122,0)
    );
    pointer-events: none;
}

.city-card:nth-child(n + 4)::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -20px;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(90,43,122,0),
        rgba(90,43,122,0.2) 50%,
        rgba(90,43,122,0)
    );
    pointer-events: none;
}

/* =========================
   Пагинация
========================= */
.city-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.city-pagination ul.page-numbers {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.city-pagination a,
.city-pagination span {
    padding: 8px 14px;
    background: #f0f0f0;
    border-radius: 8px;
    color: #5a2b7a;
    text-decoration: none;
}

.city-pagination span.current {
    background: #5a2b7a;
    color: #fff;
}

/* =========================
   Адаптив
========================= */
@media (max-width: 992px) {
    .city-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .city-posts {
        grid-template-columns: 1fr;
    }

    .city-card::after,
    .city-card::before {
        display: none;
    }
}
