/* ============================================
   БАЗОВЫЕ СТИЛИ И СБРОС
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   ТИПОГРАФИЯ
============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #2c3e50;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

/* ============================================
   КАРТОЧКИ (CARDS)
============================================ */

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Специальные типы карточек */
.error-message {
    background: #fff5f5;
    border-color: #fed7d7;
    border-left: 4px solid #e53e3e;
}

.success-message {
    background: #f0fff4;
    border-color: #c6f6d5;
    border-left: 4px solid #38a169;
}

.warning-message {
    background: #fffaf0;
    border-color: #feebc8;
    border-left: 4px solid #dd6b20;
}

.city-search-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.info-card {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left: 4px solid #0ea5e9;
}

.result-card {
    background: white;
}

/* ============================================
   КНОПКИ (BUTTONS)
============================================ */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #1a472a;
    color: white;
    border: 1px solid #1a472a;
}

.btn-primary:hover {
    background: #153a23;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 71, 42, 0.2);
}

.btn-secondary {
    background: white;
    color: #1a472a;
    border: 1px solid #1a472a;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Навигационные кнопки */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #f8f9fa;
    border-color: #1a472a;
    color: #1a472a;
}

.nav-btn.secondary {
    background: #f8f9fa;
}

/* ============================================
   ФОРМЫ И ПОИСК
============================================ */

.search-box {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.search-input.valid {
    border-color: #38a169;
}

.search-input.invalid {
    border-color: #e53e3e;
}

/* ============================================
   СТАТИСТИЧЕСКИЕ КАРТОЧКИ
============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stats-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.compact {
    padding: 15px;
}

.stat-card h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 5px;
}

.stat-card .value.compact {
    font-size: 1.6rem;
}

.stat-card .subtext {
    font-size: 0.9rem;
    color: #888;
}

.stats-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

/* ============================================
   ТАБЛИЦЫ
============================================ */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.analytics-table, .results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px; /* Увеличена минимальная ширина таблицы */
}

.analytics-table th, .results-table th {
    background: #f8f9fa;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.analytics-table td, .results-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.analytics-table tr:hover, .results-table tr:hover {
    background-color: #f8fafc;
}

.analytics-table .text-center, .results-table .text-center {
    text-align: center;
}

/* Стили для таблицы результатов поиска */
.cadastral-num {
    font-family: monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    letter-spacing: 0.5px; /* Добавлено для лучшей читаемости кадастровых номеров */
}

.quarter-cell {
    text-align: center;
    font-family: monospace;
    min-width: 120px; /* Увеличена минимальная ширина для кадастровых кварталов */
}

.area-cell, .price-cell {
    text-align: center;
}

.city-street-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ИЗМЕНЕНИЕ: адаптивная высота строки для ВРИ */
.vri-cell {
    max-width: 200px;
    min-width: 150px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    padding: 8px 12px !important; /* Добавлено для лучшего отображения */
    vertical-align: top; /* Выравнивание по верху */
}

/* Дополнительные стили для выравнивания кадастровых номеров и кварталов */
.cadastral-quarter {
    display: block;
    text-align: center;
    font-family: monospace;
    font-size: 0.95em;
    white-space: nowrap;
}

/* Новые классы для расширенной таблицы */
.address-cell {
    min-width: 200px;
    max-width: 250px;
}

.cadastral-cell {
    min-width: 150px;
    font-family: monospace;
}

/* ============================================
   ГРАФИКИ
============================================ */

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 20px;
}

.chart-placeholder {
    text-align: center;
    padding: 50px;
    color: #666;
    font-style: italic;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Легенда для графиков */
.chart-legend {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.chart-legend div {
    display: inline-block;
    margin-right: 20px;
}

.chart-legend span {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    vertical-align: middle;
}

.chart-legend .line-indicator {
    width: 15px;
    height: 2px;
    background: rgba(231, 76, 60, 1);
    margin-right: 5px;
    vertical-align: middle;
}

/* ============================================
   ЗАГОЛОВКИ СЕКЦИЙ
============================================ */

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 0;
}

.page-header h1 {
    color: #1a472a;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 20px;
}

.page-header-with-analytics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.analytics-link {
    background: #1a472a;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.analytics-link:hover {
    background: #153a23;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    color: #1a472a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header p {
    color: #666;
    max-width: 800px;
}

.stats-title {
    color: #1a472a;
    margin-bottom: 20px;
}

/* ============================================
   ГОРОДА И РЕГИОНЫ
============================================ */

.city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.city-tag {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.city-tag:hover {
    background: #1a472a;
    color: white;
    border-color: #1a472a;
    transform: translateY(-2px);
}

.city-title {
    color: #1a472a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.city-region {
    font-size: 0.7em;
    color: #666;
    font-weight: normal;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
}

/* ============================================
   РЕЗУЛЬТАТЫ ПОИСКА ГОРОДОВ И РЕГИОНОВ
============================================ */

.city-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.city-result-card {
    display: block;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.city-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #1a472a;
}

.city-result-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a472a;
    margin-bottom: 8px;
}

.city-result-region {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
}

.city-result-count {
    font-size: 0.85rem;
    color: #888;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

/* ============================================
   ВРИ (ВИДЫ РАЗРЕШЕННОГО ИСПОЛЬЗОВАНИЯ)
============================================ */

.top-vri-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vri-name {
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.3;
}

.vri-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.vri-count-badge {
    display: inline-block;
    background: #1a472a;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.total-vri-count {
    color: #666;
    font-size: 0.9rem;
}

/* Стили для типов ВРИ в таблице */
.vri-cell-ihs {
    background-color: rgba(26, 71, 42, 0.05) !important;
    border-left: 4px solid rgba(26, 71, 42, 0.7) !important;
}

.vri-cell-lph {
    background-color: rgba(52, 152, 219, 0.05) !important;
    border-left: 4px solid rgba(52, 152, 219, 0.7) !important;
}

.vri-cell-gardening {
    background-color: rgba(241, 196, 15, 0.05) !important;
    border-left: 4px solid rgba(241, 196, 15, 0.7) !important;
}

.vri-cell-other {
    background-color: rgba(149, 165, 166, 0.05) !important;
    border-left: 4px solid rgba(149, 165, 166, 0.7) !important;
}

.vri-name-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   НАВИГАЦИЯ И ФУТЕР
============================================ */

.nav-back {
    margin-bottom: 30px;
}

.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.site-footer a {
    color: #1a472a;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   ЛОАДЕР И СПИННЕРЫ
============================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.page-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a472a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a472a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* ============================================
   ПРИМЕРЫ ДЛЯ ТЕСТИРОВАНИЯ
============================================ */

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.example-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #333;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-tag:hover {
    background: #1a472a;
    color: white;
    border-color: #1a472a;
    transform: translateY(-2px);
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
============================================ */

.mobile-hint {
    display: none;
    text-align: center;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #0ea5e9;
    font-size: 0.9rem;
}

/* ============================================
   АНИМАЦИИ
============================================ */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   УТИЛИТЫ
============================================ */

.text-center {
    text-align: center;
}

.mt-15 {
    margin-top: 15px;
}

.mt-30 {
    margin-top: 30px;
}

.search-suggestions {
    margin-left: 20px;
    color: #666;
}

.search-suggestions li {
    margin-bottom: 5px;
}

.success-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* ============================================
   МЕДИА-ЗАПРОСЫ (АДАПТИВНОСТЬ)
============================================ */

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid.compact {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .city-results-grid {
        grid-template-columns: 1fr;
    }
    
    .city-tags {
        justify-content: center;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .analytics-table, .results-table {
        font-size: 0.9rem;
        min-width: 600px; /* Уменьшена минимальная ширина для мобильных */
    }
    
    .analytics-table th, .analytics-table td,
    .results-table th, .results-table td {
        padding: 10px 8px;
    }
    
    /* ИЗМЕНЕНИЕ: адаптивные стили для ВРИ на мобильных */
    .vri-cell {
        max-width: 180px;
        min-width: 120px;
        font-size: 0.85rem;
        line-height: 1.3;
        padding: 6px 8px !important;
    }
    
    .vri-name {
        font-size: 0.9rem;
    }
    
    .vri-stats {
        font-size: 0.8rem;
        gap: 5px;
    }
    
    .vri-count-badge {
        padding: 1px 6px;
        font-size: 0.85rem;
    }
    
    .btn-small {
        padding: 4px 10px;
        font-size: 0.85rem;
    }
    
    .page-header-with-analytics {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mobile-hint {
        display: block;
    }
    
    .vri-name-cell {
        max-width: 150px;
    }
    
    .quarter-cell {
        min-width: 100px; /* Уменьшена для мобильных */
    }
    
    .cadastral-cell {
        min-width: 120px; /* Уменьшена для мобильных */
    }
    
    .address-cell {
        min-width: 150px; /* Уменьшена для мобильных */
        max-width: 180px;
    }
    
    /* Легенда для графиков на мобильных */
    .chart-legend {
        font-size: 0.8rem;
    }
    
    .chart-legend div {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card .value {
        font-size: 1.8rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 10px;
    }
    
    .city-result-card {
        padding: 15px;
    }
    
    .example-tag {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .analytics-table, .results-table {
        min-width: 500px; /* Еще меньше для очень маленьких экранов */
    }
    
    /* ИЗМЕНЕНИЕ: адаптивные стили для ВРИ на очень маленьких экранах */
    .vri-cell {
        max-width: 150px;
        min-width: 100px;
        font-size: 0.8rem;
        line-height: 1.2;
        padding: 4px 6px !important;
    }
    
    .quarter-cell {
        min-width: 80px;
    }
}
/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ DISTRICT_ANALYTICS
============================================ */

.region-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.district-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.district-breadcrumbs {
    font-size: 0.95rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.district-breadcrumbs a {
    color: #1a472a;
    text-decoration: none;
}

.district-breadcrumbs a:hover {
    text-decoration: underline;
}

.district-breadcrumbs span {
    color: #999;
}

.district-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* Стили для карточек районов в результатах поиска */
.district-result-card {
    display: block;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.district-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #1a472a;
}

.district-result-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1a472a;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.district-result-card:hover:before {
    opacity: 1;
}

.district-result-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a472a;
    margin-bottom: 8px;
}

.district-result-region {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.district-result-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.district-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.district-stat-value {
    font-weight: 700;
    color: #1a472a;
    font-size: 1.2rem;
}

.district-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

/* Специальная карточка для показа региона в шапке */
.region-info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-left: 4px solid #1a472a;
    margin-bottom: 20px;
}

.region-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.region-info-title {
    font-size: 1.3rem;
    color: #1a472a;
    font-weight: 600;
}

.region-info-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.region-info-stat {
    display: flex;
    flex-direction: column;
}

.region-info-stat-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.region-info-stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* Адаптивность для district_analytics */
@media (max-width: 768px) {
    .district-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .district-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    
    .district-result-stats {
        gap: 10px;
    }
    
    .district-stat-value {
        font-size: 1rem;
    }
    
    .region-info-stats {
        gap: 10px;
    }
    
    .region-info-stat {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .district-result-card {
        padding: 15px;
    }
    
    .region-info-stat {
        min-width: 100%;
    }
}
/* ============================================
   SEO БЛОКИ И ДОПОЛНИТЕЛЬНЫЕ СТИЛИ
============================================ */

/* Стили для SEO-контента */
.seo-content-block {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #1a472a;
}

.seo-content-block h2 {
    color: #1a472a;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.seo-content-block h3 {
    color: #2c3e50;
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
}

/* Подсветка цен */
.price-highlight {
    background: #fffaf0;
    border: 1px solid #feebc8;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.price-highlight h4 {
    color: #dd6b20;
    margin-bottom: 10px;
}

/* Таблица регионов */
.region-price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.region-price-table th {
    background: #1a472a;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.region-price-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
}

.region-price-table tr:hover {
    background-color: #f8fafc;
}

/* Бейджи цен */
.price-tag {
    display: inline-block;
    background: #38a169;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Список ключевых слов */
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.keyword-item {
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #2d3748;
}

/* Особенности сервиса */
.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.features-list li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: #4a5568;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #38a169;
    font-weight: bold;
}

/* FAQ стили */
.faq-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
}

/* Сетка регионов */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.region-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.region-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #1a472a;
}

/* Подсказки для поиска */
.search-tips {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.search-tips p {
    margin-bottom: 8px;
    font-weight: 500;
    color: #1a472a;
}

.search-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #555;
    font-size: 0.9rem;
}

.search-tips li {
    margin-bottom: 5px;
}

/* Breadcrumb навигация */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: #1a472a;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #666;
}

/* Хиты для мобильных */
.mobile-hint {
    display: none;
}

/* Адаптивность для SEO блоков */
@media (max-width: 768px) {
    .seo-content-block {
        padding: 20px;
        margin: 20px 0;
    }
    
    .region-price-table {
        font-size: 0.9rem;
    }
    
    .region-price-table th,
    .region-price-table td {
        padding: 8px 10px;
    }
    
    .regions-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-hint {
        display: block;
        background: #f0f9ff;
        padding: 10px;
        border-radius: 8px;
        margin: 10px 0;
        font-size: 0.9rem;
        color: #0ea5e9;
        text-align: center;
    }
    
    .keyword-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .seo-content-block {
        padding: 15px;
    }
    
    .seo-content-block h2 {
        font-size: 1.2rem;
    }
    
    .region-price-table {
        font-size: 0.8rem;
    }
    
    .price-tag {
        font-size: 0.8rem;
        padding: 2px 8px;
    }
}
/* ============================================
   ОПТИМИЗИРОВАННАЯ ТАБЛИЦА ДЛЯ МОБИЛЬНЫХ
============================================ */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    -webkit-overflow-scrolling: touch; /* Для плавного скролла на iOS */
    position: relative;
    min-height: 300px;
}

/* Стили для мобильной подсказки */
.mobile-table-hint {
    margin-top: 20px;
    padding: 15px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    text-align: center;
}

.zoom-hint {
    text-align: left;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #0369a1;
}

.zoom-hint ul {
    margin: 10px 0 0 20px;
}

.zoom-hint li {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

/* Оптимизированные ячейки таблицы */
.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Оптимальная минимальная ширина */
}

.results-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.85rem;
    white-space: nowrap;
}

.results-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

/* Узкие ячейки */
.cadastral-cell {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.quarter-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    font-size: 0.85rem;
}

.address-cell {
    min-width: 180px;
    max-width: 220px;
    text-align: left;
    padding: 10px 12px !important;
}

.area-cell {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    font-weight: 600;
    color: #1a472a;
}

.price-cell {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    font-weight: 700;
    color: #1a472a;
    font-size: 0.95rem;
}

.doc-cell {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    font-size: 0.85rem;
    color: #666;
}

.vri-cell {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    font-size: 0.85rem;
    text-align: left;
    padding: 10px 8px !important;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

/* Кадастровый номер в компактном виде */
.cadastral-num {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* Эффекты при наведении */
.results-table tr:hover {
    background-color: #f8fafc;
}

.results-table tr:hover .cadastral-num {
    background: #e2e8f0;
}

/* ============================================
   БЛОК ОБРАТНОЙ СВЯЗИ
============================================ */

.feedback-section {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 2px solid #cbd5e1;
}

.feedback-content h2 {
    color: #1a472a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.feedback-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feedback-list {
    margin: 15px 0;
    padding-left: 20px;
    color: #4a5568;
}

.feedback-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}

.contact-info {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.contact-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.email-btn {
    background: #1a472a;
    color: white;
}

.email-btn:hover {
    background: #153a23;
    transform: translateY(-2px);
}

.form-btn {
    background: white;
    color: #1a472a;
    border: 1px solid #1a472a;
}

.form-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Статистика в блоке обратной связи */
.feedback-stats h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-mini {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.stat-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-mini .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 5px;
}

.stat-mini .label {
    font-size: 0.8rem;
    color: #718096;
}

.feedback-note {
    padding: 15px;
    background: #f0fff4;
    border-radius: 8px;
    border: 1px solid #c6f6d5;
}

.feedback-note p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #2f855a;
}

.feedback-note ul {
    margin: 10px 0 0 20px;
    color: #4a5568;
    font-size: 0.9rem;
}

.feedback-note li {
    margin-bottom: 5px;
}

/* Форма обратной связи */
.feedback-form-container {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.feedback-form-container h3 {
    color: #1a472a;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

/* ============================================
   АДАПТИВНОСТЬ
============================================ */

@media (max-width: 992px) {
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .table-container {
        border-radius: 6px;
        font-size: 0.85rem;
    }
    
    .results-table {
        min-width: 700px;
    }
    
    .results-table th {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .results-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .cadastral-cell {
        width: 130px;
        min-width: 130px;
        max-width: 130px;
    }
    
    .cadastral-num {
        font-size: 0.75rem;
        padding: 2px 4px;
    }
    
    .quarter-cell {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
        font-size: 0.75rem;
    }
    
    .address-cell {
        min-width: 150px;
        max-width: 180px;
        padding: 8px 10px !important;
        font-size: 0.8rem;
    }
    
    .area-cell, .price-cell {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        font-size: 0.85rem;
    }
    
    .doc-cell {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }
    
    .vri-cell {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        font-size: 0.75rem;
        padding: 8px 6px !important;
    }
    
    /* Обратная связь на мобильных */
    .contact-options {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-mini {
        grid-template-columns: 1fr;
    }
    
    .feedback-form-container {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .results-table {
        min-width: 650px;
    }
    
    .cadastral-cell {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .quarter-cell {
        width: 65px;
        min-width: 65px;
        max-width: 65px;
    }
    
    .address-cell {
        min-width: 140px;
        max-width: 160px;
        padding: 6px 8px !important;
    }
    
    .price-cell {
        font-size: 0.8rem;
    }
    
    .feedback-section {
        padding: 20px 15px;
    }
    
    .feedback-form-container {
        padding: 15px;
    }
}
/* ============================================
   ОПТИМИЗИРОВАННАЯ ТАБЛИЦА С АВТО-ВЫСОТОЙ
============================================ */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    -webkit-overflow-scrolling: touch;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px; /* Минимальная ширина для всех столбцов */
}

.results-table th {
    background: #f8f9fa;
    padding: 14px 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.9rem;
    white-space: nowrap;
    vertical-align: top;
}

.results-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: top;
}

/* Автоматическая высота строки для ВРИ */
.results-table tr {
    min-height: 40px;
}

.results-table tr:hover {
    background-color: #f8fafc;
}

/* Узкие фиксированные ячейки */
.cadastral-cell {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

.cadastral-num {
    display: inline-block;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    word-break: break-all;
}

.quarter-cell {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    font-size: 0.85rem;
    font-weight: 500;
}

.address-cell {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.area-cell {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    font-weight: 600;
    color: #1a472a;
    font-size: 0.95rem;
}

.price-cell {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    font-weight: 700;
    color: #1a472a;
    font-size: 0.95rem;
    white-space: nowrap;
}

.doc-cell {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    font-size: 0.85rem;
    color: #666;
}

/* Ячейка ВРИ с автоматической высотой и прокруткой */
.vri-cell {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
    padding: 10px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.vri-cell::-webkit-scrollbar {
    width: 4px;
}

.vri-cell::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.vri-cell::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.vri-cell::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.table-touch-hint {
    background: linear-gradient(90deg, #f0f9ff, #e6f7ff);
    border: 1px solid #91d5ff;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 0.85rem;
    color: #096dd9;
    /* display: none; */ /* УБИРАЕМ эту строку */
}

/* Добавляем медиа-запрос для отображения только на мобильных */
@media (min-width: 769px) {
    .table-touch-hint {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .table-touch-hint {
        display: block !important;
    }
}

/* ============================================
   БЛОК ОБРАТНОЙ СВЯЗИ БЕЗ EMAIL
============================================ */

.feedback-section {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 2px solid #cbd5e1;
}

.feedback-content h2 {
    color: #1a472a;
    margin-bottom: 20px;
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.feedback-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feedback-list {
    margin: 15px 0;
    padding-left: 20px;
    color: #4a5568;
}

.feedback-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}

.contact-info {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.contact-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.form-btn {
    background: #1a472a;
    color: white;
    border: 1px solid #1a472a;
}

.form-btn:hover {
    background: #153a23;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 71, 42, 0.2);
}

/* Статистика в блоке обратной связи */
.feedback-stats h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-mini {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.stat-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-mini .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 5px;
}

.stat-mini .label {
    font-size: 0.8rem;
    color: #718096;
}

.feedback-note {
    padding: 15px;
    background: #f0fff4;
    border-radius: 8px;
    border: 1px solid #c6f6d5;
}

.feedback-note p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #2f855a;
}

.feedback-note ul {
    margin: 10px 0 0 20px;
    color: #4a5568;
    font-size: 0.9rem;
}

.feedback-note li {
    margin-bottom: 5px;
}

/* Форма обратной связи */
.feedback-form-container {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.feedback-form-container h3 {
    color: #1a472a;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ
============================================ */

@media (max-width: 768px) {
    .table-container {
        border-radius: 6px;
        font-size: 0.85rem;
    }
    
    .results-table {
        min-width: 800px;
    }
    
    .results-table th {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .results-table td {
        padding: 10px 6px;
        font-size: 0.85rem;
    }
    
    .cadastral-cell {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    .cadastral-num {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .quarter-cell {
        width: 85px;
        min-width: 85px;
        max-width: 85px;
        font-size: 0.8rem;
    }
    
    .address-cell {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        font-size: 0.85rem;
    }
    
    .area-cell, .price-cell {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        font-size: 0.9rem;
    }
    
    .doc-cell {
        width: 65px;
        min-width: 65px;
        max-width: 65px;
    }
    
    .vri-cell {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
        font-size: 0.85rem;
        max-height: 80px;
        padding: 8px !important;
    }
    
    .table-touch-hint {
        font-size: 0.8rem;
        padding: 10px 12px;
        margin: 10px 0;
    }
    
    /* Обратная связь на мобильных */
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .contact-options {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feedback-form-container {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .results-table {
        min-width: 750px;
    }
    
    .cadastral-cell {
        width: 130px;
        min-width: 130px;
        max-width: 130px;
    }
    
    .quarter-cell {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    .address-cell {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
        font-size: 0.8rem;
    }
    
    .vri-cell {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        font-size: 0.8rem;
    }
    
    .stats-mini {
        grid-template-columns: 1fr;
    }
    
    .feedback-section {
        padding: 20px 15px;
    }
    
    .feedback-form-container {
        padding: 15px;
    }
    
    .table-touch-hint ul {
        margin-left: 15px;
    }
    
    .table-touch-hint li:before {
        left: -15px;
    }
}
/* Стили для чисел с пробелами в статистике */
.stat-number {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

/* Стили для кликабельных ссылок на города */
.city-link {
    color: #1a472a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}

.city-link:hover {
    color: #153a23;
    border-bottom-color: #1a472a;
}

/* Стили для адресных ячеек в таблице результатов */
.results-table .address-cell a {
    color: #1a472a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}

.results-table .address-cell a:hover {
    color: #153a23;
    border-bottom-color: #1a472a;
}
/* style.css - Общие стили для всех страниц */

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Карточки */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: #1a472a;
    color: white;
    border: 1px solid #1a472a;
}

.btn-primary:hover {
    background: #143a21;
    border-color: #143a21;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

/* Навигация */
.nav-back {
    margin-bottom: 20px;
}

/* Формы поиска */
.search-box {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

/* Сообщения */
.error-message {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.warning-message {
    border-left: 4px solid #ffc107;
    background: #fffdf5;
}

.success-message {
    border-left: 4px solid #28a745;
    background: #f5fff7;
}

/* Лоадер */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.page-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a472a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сетка для статистики */
.stats-grid {
    display: grid;
    gap: 20px;
}

/* Футер */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #666;
}

.site-footer a {
    color: #2c5282;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-15 {
    margin-top: 15px;
}

.mt-30 {
    margin-top: 30px;
}

/* Контейнеры для таблиц */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

/* Подсказки для поиска */
.search-suggestions {
    list-style: none;
    margin-top: 10px;
    padding-left: 20px;
}

.search-suggestions li {
    margin-bottom: 5px;
    color: #666;
    position: relative;
}

.search-suggestions li:before {
    content: "•";
    position: absolute;
    left: -15px;
    color: #1a472a;
}
/* ============================================
   ПЕРЕКЛЮЧАТЕЛЬ ТИПА СДЕЛОК
============================================ */

.deal-type-selector {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.deal-type-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.deal-type-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.deal-type-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.deal-type-radio:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.deal-type-radio input[type="radio"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.deal-type-label {
    font-size: 0.95rem;
    color: #333;
    user-select: none;
}

/* Стили для активного состояния радиокнопки */
.deal-type-radio input[type="radio"]:checked + .deal-type-label {
    color: #1a472a;
    font-weight: 600;
}

.deal-type-radio input[type="radio"]:checked {
    accent-color: #1a472a;
}

/* Стили для выбранного типа сделок */
.deal-type-radio.selected {
    background: #1a472a;
    border-color: #1a472a;
}

.deal-type-radio.selected .deal-type-label {
    color: white;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .deal-type-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .deal-type-radio {
        padding: 10px 12px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .deal-type-selector {
        padding: 12px;
    }
    
    .deal-type-selector h3 {
        font-size: 1rem;
    }
    
    .deal-type-label {
        font-size: 0.9rem;
    }
}
/* ============================================
   ПЕРИОД СДЕЛОК (как у «Тип сделок»)
============================================ */

.period-selector {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.period-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.period-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.period-row .period-label {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.period-row select.period-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a472a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    min-width: 118px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.period-row select.period-select:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.period-row select.period-select:focus {
    outline: none;
    border-color: #1a472a;
    background-color: #fff;
}

.period-sep {
    color: #6c757d;
    font-weight: 600;
    user-select: none;
}

@media (max-width: 480px) {
    .period-selector {
        padding: 12px;
    }

    .period-selector h3 {
        font-size: 1rem;
    }

    .period-row select.period-select {
        flex: 1;
        min-width: 0;
        font-size: 0.9rem;
    }
}

/* ============================================
   КНОПКИ БЫСТРОГО ПЕРЕКЛЮЧЕНИЯ
============================================ */

.quick-switch-buttons {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.quick-switch-buttons p {
    margin-bottom: 12px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.switch-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.switch-buttons .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 140px;
}

.switch-buttons .btn-primary {
    background: #1a472a;
    color: white;
    border: 1px solid #1a472a;
    box-shadow: 0 2px 4px rgba(26, 71, 42, 0.2);
}

.switch-buttons .btn-secondary {
    background: white;
    color: #1a472a;
    border: 1px solid #1a472a;
}

.switch-buttons .btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Анимация переключения */
@keyframes switchFade {
    from { opacity: 0.7; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.quick-switch-buttons {
    animation: switchFade 0.3s ease;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .switch-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .switch-buttons .btn {
        width: 100%;
        max-width: 250px;
        padding: 10px 16px;
    }
    
    .quick-switch-buttons {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .switch-buttons .btn {
        min-width: unset;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Стили для вертикального стека кнопок */
.analytics-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Увеличил отступ между кнопками */
    margin-top: 15px;
}

.analytics-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1a472a, #2c5282);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.2);
    min-width: 300px;
    justify-content: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.analytics-link:hover {
    background: linear-gradient(135deg, #0f2f1b, #1a365d);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 71, 42, 0.3);
    color: white;
}

/* Адаптивность для мобильных - УЛУЧШЕННАЯ ВЕРСИЯ */
@media (max-width: 992px) {
    .page-header-with-analytics {
        flex-direction: column;
        align-items: stretch;
        gap: 25px; /* Увеличил отступ между заголовком и кнопками */
    }
    
    .analytics-buttons-stack {
        width: 100%;
        gap: 20px; /* Еще больше отступ на мобильных */
        margin-top: 20px;
        padding: 20px;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }
    
    .analytics-link {
        width: 100%;
        min-width: auto;
        padding: 16px 24px; /* Увеличил padding на мобильных */
        margin-bottom: 5px; /* Дополнительный отступ снизу */
        font-size: 1rem;
    }
    
    .analytics-link:last-child {
        margin-bottom: 0;
    }
    
    /* Добавляем разделитель между кнопками на очень маленьких экранах */
    @media (max-width: 480px) {
        .analytics-buttons-stack {
            gap: 15px;
            padding: 15px;
        }
        
        .analytics-link {
            padding: 18px 20px; /* Еще больше padding */
            font-size: 0.95rem;
            position: relative;
        }
        
        /* Добавляем тонкую линию между кнопками */
        .analytics-link:not(:last-child)::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 20%;
            width: 60%;
            height: 1px;
            background: rgba(0, 0, 0, 0.1);
        }
    }
}

/* Для планшетов (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
    .analytics-buttons-stack {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 15px;
    }
    
    .analytics-link {
        flex: 1;
        min-width: 250px;
        max-width: 300px;
        justify-content: center;
    }
}

/* ===== from index.php (inline <style> moved here) ===== */
.critical-css {
            opacity: 0;
            animation: fadeIn 0.5s ease forwards;
        }
        @keyframes fadeIn {
            to { opacity: 1; }
        }

/* ============================================
   ТИП ДОГОВОРА (как «Тип сделок»)
============================================ */
.deal-subtype-selector {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}
.deal-subtype-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

/* ============================================
   ФИЛЬТР ВРИ (мультивыбор)
============================================ */
.vri-filter-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
    overflow: visible;
    position: relative;
    z-index: 5;
}
.vri-filter-block h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}
.vri-selector {
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 6;
}
.vri-selected {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    min-height: 42px;
    line-height: 1.4;
    word-break: break-word;
    box-sizing: border-box;
}
.vri-selected:hover {
    border-color: #1a472a;
}
.vri-selected.is-placeholder {
    color: #6c757d;
}
.vri-search {
    display: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.92rem;
}
.vri-search:focus {
    outline: none;
    border-color: #1a472a;
}
.vri-options {
    display: none;
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    box-sizing: border-box;
}
.vri-selector.open .vri-options,
.vri-selector.open .vri-search {
    display: block;
}
.vri-group-label {
    padding: 8px 12px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #1a472a;
    background: #eef5f0;
    border-bottom: 1px solid #e0ebe4;
    position: sticky;
    top: 0;
    z-index: 1;
}
.vri-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.35;
    border-bottom: 1px solid #f1f3f5;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
.vri-option.vri-priority {
    background: #f7fbf8;
    font-weight: 500;
}
.vri-option:hover {
    background: #e9ecef;
}
.vri-option input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #1a472a;
}
.vri-option.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .vri-filter-block {
        padding: 12px;
        z-index: 20;
    }
    .vri-filter-block h3 {
        font-size: 1rem;
    }
    .vri-selector {
        max-width: 100%;
    }
    .vri-selected {
        font-size: 0.9rem;
        padding: 12px;
    }
    /* На мобилке выпадающий список — на всю ширину блока, скролл внутри */
    .vri-options {
        position: absolute;
        left: 0;
        right: 0;
        max-height: min(55vh, 360px);
        z-index: 100;
        border-radius: 8px;
    }
    .vri-option {
        font-size: 0.88rem;
        padding: 12px 14px;
        gap: 12px;
    }
    .vri-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .vri-options {
        max-height: min(50vh, 320px);
    }
    .vri-group-label {
        font-size: 0.7rem;
        padding: 10px 12px 6px;
    }
}
