/* ====================
   СТРАНИЦА ГОРОДА
   ==================== */

.city-page {
    background: #f8fafc;
    min-height: 60vh;
}

.city-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Хлебные крошки - липкие */
.city-breadcrumbs {
    position: sticky;
    top: 120px;
    z-index: 98;
    background: #f8fafc;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

/* На мобильных устройствах */
@media (max-width: 768px) {
    .city-breadcrumbs {
        top: 115px;
    }
}

.city-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.city-breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.city-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #9ca3af;
}

.city-breadcrumbs a {
    color: #1e293b;
    text-decoration: none;
}

.city-breadcrumbs a:hover {
    text-decoration: underline;
    color: #800020;
}

.city-breadcrumbs span {
    color: #6b7280;
}

/* Заголовок */
.city-header {
    background: white;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.city-header h1 {
    font-size: 38px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.15;
}

/* Тот же брейкпоинт (900px), что и на главной/статьях сайта —
   раньше у страниц городов был только 768px, и в промежутке
   768-900px заголовок оставался десктопным, пока весь остальной
   сайт уже переключался на мобильный размер. */
@media (max-width: 900px) {
    .city-header h1 {
        font-size: 28px;
    }
}

.city-header h1 .city-name {
    color: #800020;
}

.city-header .city-region {
    font-size: 16px;
    color: #6b7280;
}

/* Секции */
.city-section {
    background: white;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    margin-bottom: 30px;
}

.city-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.city-section h2 i {
    color: #800020;
    font-size: 24px;
}

.city-section p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Сетка центров */
.centers-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.center-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.center-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.center-card-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 25px;
}

@media (min-width: 768px) {
    .center-card-inner {
        flex-direction: row;
    }
    .center-info {
        flex: 1;
    }
    .center-map {
        flex: 1;
        min-width: 300px;
    }
}

.center-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.center-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.center-sub {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.center-address, .center-hours {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 14px;
}

.center-address i, .center-hours i {
    color: #800020;
    width: 18px;
    margin-top: 2px;
}

.center-description {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.center-map iframe {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    border: none;
}

/* Кнопка маршрута */
.route-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: #e8f0fe;
    color: #1e293b;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.route-btn:hover {
    background: #800020;
    color: white;
}

/* Документы */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.doc-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-icon i {
    font-size: 18px;
    color: #800020;
}

.doc-text p {
    margin: 0;
}

.doc-text .doc-title {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
}

.doc-text .doc-desc {
    font-size: 12px;
    color: #6b7280;
}

/* Кнопки назад */
.back-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.back-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1e293b;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.back-links a:hover {
    background: #800020;
}

.back-links a:last-child {
    background: #22c55e;
}

.back-links a:last-child:hover {
    background: #16a34a;
}

/* Рекламные блоки */
.ad-main, .ad-sidebar {
    margin: 30px 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Десктоп: контент в один столбец, плавающий сайдбар скрыт (реклама
   на десктопе показывается только через .ad-main). Раньше здесь было
   два одинаковых блока @media (min-width: 992px) подряд, второй
   случайно перебивал display:flex первого на display:block —
   объединил в один. */
@media (min-width: 992px) {
    .city-page .container {
        display: block;
    }

    .ad-sidebar {
        display: none;
    }
}

/* Мобилка: оставляем как обычный блок */
@media (max-width: 991px) {
    .ad-sidebar {
        width: 100%;
        margin: 20px 0;
        display: flex;
    }

}

/* Адаптив */
@media (max-width: 768px) {
    .city-header h1 {
        font-size: 24px;
    }
    
    .city-section {
        padding: 20px;
    }
    
    .center-card-inner {
        padding: 20px;
    }
    
    .center-map iframe {
        height: 200px;
    }
    
    .back-links {
        flex-direction: column;
        align-items: center;
    }
    
    .back-links a {
        width: 100%;
        justify-content: center;
    }
    .ad-between-centers {
    margin: 30px 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}
}
/* FAQ на странице города теперь использует общий паттерн .faq-box/.faq-item
   из style.css (тот же, что на index.html, в статьях и на страницах
   разделов) — здесь отдельных правил больше не нужно. */

/* Ссылки внутри текстовых блоков страницы города — в стиле сайта,
   тот же паттерн, что и в статьях (.about-container p a). */
.city-section p a.city-link,
.city-cta-link {
    color: #800020;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(128, 0, 32, 0.3);
    transition: border-color 0.2s;
}

.city-section p a.city-link:hover,
.city-cta-link:hover {
    border-bottom-color: #800020;
}

/* ============================================
   Блок «центры тестирования рядом»
   ============================================ */
.nearby-cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.nearby-city {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}

.nearby-city:hover {
    border-color: #800020;
    transform: translateY(-2px);
}

.nearby-city i { color: #800020; font-size: 13px; }
.nearby-city-name { font-weight: 700; font-size: 15px; color: #1a1a1a; }
.nearby-city-region { font-size: 12px; color: #777; }

/* ============================================
   Заголовок и вводный текст на address.html
   ============================================ */
.address-hero h1 {
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.address-intro {
    max-width: 780px;
    margin: 0 auto 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

@media (max-width: 600px) {
    .address-hero h1 { font-size: 22px; }
    .address-intro { font-size: 14px; }
    .nearby-cities { grid-template-columns: 1fr 1fr; }
}
