/* ============================================================
   services.css - все стили для страницы социальных услуг
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== ЦВЕТОВЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --polu-accent:   #00897b;
    --polu-dark:     #004d40;
    --polu-bg:       #e8f5e9;
    --polu-bg-hover: #c8e6c9;

    --stac-accent:   #1a5fb0;
    --stac-dark:     #0a2a4a;
    --stac-bg:       #eef4fb;
    --stac-bg-hover: #d0dce8;

    --blue:          #1a56db;
    --blue-dark:     #1e429f;
    --green:         #047857;
    --green-dark:    #065f46;
    --orange:        #e65100;
    --red:           #c62828;
}

/* ===== ЗАГОЛОВОК САЙТА (компактный) ===== */
.site-header {
    background: #ffffff;
    color: #1f2937;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    /*border-bottom: 4px solid var(--blue);*/
    border-radius: 16px;
}

/*.site-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), #8b5cf6, var(--blue));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}*/

@keyframes gradientMove {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    color: var(--blue);
    letter-spacing: -0.5px;
}

.site-title i {
    color: var(--blue);
    margin-right: 10px;
}

.site-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.4;
}

.site-subtitle i {
    color: var(--blue);
    margin-right: 8px;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.page-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
    align-items: flex-start;
    padding-top: 5px;
}

/* ============================================================
   ЛЕВЫЙ БЛОК С НАВИГАЦИЕЙ — единый стиль (поднят вверх)
   ============================================================ */
.left-block {
    width: 320px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
    position: sticky;
    top: 10px;
    border-top: 4px solid var(--blue);
    margin-top: 0;
}

.block-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}
.block-title i { color: var(--blue); margin-right: 10px; }

/* ===== ЗАГОЛОВОК РАЗДЕЛА (Бесплатные / Платные) ===== */
.section-title-left,
.free-services-title,
.paid-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 12px 12px;
    margin: 24px 0 12px 0;
    border: none;
    border-radius: 0;
    border-top: 2px solid var(--blue);
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    color: var(--blue-dark);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    line-height: 1.2;
}

.section-title-left i,
.free-services-title i,
.paid-section-title i {
    color: var(--blue);
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* «Платные услуги» — зелёный акцент */
.paid-section-title {
    border-top-color: var(--green);
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    color: var(--green-dark);
}
.paid-section-title i { color: var(--green); }

/* ===== ЕДИНАЯ КНОПКА-ССЫЛКА ===== */
.link-item,
.extra-btn,
.form-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid transparent;
    border-radius: 8px;
    color: #1f2937;
    font-family: inherit;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease,
                color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

.link-item i,
.extra-btn i,
.form-toggle i {
    color: var(--blue);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

/* Hover — одинаковый для всех */
.link-item:hover,
.extra-btn:hover,
.form-toggle:hover {
    background: #e0f2fe;
    border-color: var(--blue);
    border-left-color: var(--blue);
    color: var(--blue-dark);
    transform: translateX(3px);
}

/* Active — одинаковый для всех */
.link-item.active,
.extra-btn.active,
.form-toggle.active {
    background: #dbeafe;
    border-color: var(--blue);
    border-left-color: var(--blue);
    color: var(--blue-dark);
    font-weight: 600;
}

/* ===== КОНТЕЙНЕРЫ СПИСКОВ ===== */
.links-list,
.paid-services-extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

/* ===== СПЕЦИАЛЬНЫЕ АКЦЕНТЫ ДЛЯ ОТДЕЛЬНЫХ КНОПОК ===== */
/* Форма обслуживания: polu — зелёный, stac — синий */
.form-toggle[data-tab="polu"] {
    border-left-color: var(--polu-accent);
    background: var(--polu-bg);
    color: var(--polu-dark);
}
.form-toggle[data-tab="polu"] i { color: var(--polu-accent); }
.form-toggle[data-tab="polu"]:hover {
    background: var(--polu-bg-hover);
    border-color: var(--polu-accent);
    border-left-color: var(--polu-accent);
    color: var(--polu-dark);
}
.form-toggle[data-tab="polu"].active {
    background: var(--polu-accent);
    border-color: var(--polu-accent);
    border-left-color: var(--polu-accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 137, 123, 0.25);
}
.form-toggle[data-tab="polu"].active i { color: #fff; }

.form-toggle[data-tab="stac"] {
    border-left-color: var(--stac-accent);
    background: var(--stac-bg);
    color: var(--stac-dark);
}
.form-toggle[data-tab="stac"] i { color: var(--stac-accent); }
.form-toggle[data-tab="stac"]:hover {
    background: var(--stac-bg-hover);
    border-color: var(--stac-accent);
    border-left-color: var(--stac-accent);
    color: var(--stac-dark);
}
.form-toggle[data-tab="stac"].active {
    background: var(--stac-accent);
    border-color: var(--stac-accent);
    border-left-color: var(--stac-accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 95, 176, 0.25);
}
.form-toggle[data-tab="stac"].active i { color: #fff; }

/* Оценка качества — жёлтый акцент */
.extra-btn--quality {
    border-left-color: #f59e0b;
    color: #92400e;
}
.extra-btn--quality i { color: #f59e0b; }
.extra-btn--quality:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    border-left-color: #f59e0b;
    color: #78350f;
}
.extra-btn--quality.active {
    background: #fef3c7;
    border-color: #f59e0b;
    border-left-color: #f59e0b;
    color: #78350f;
}

/* Образцы документов — зелёный акцент */
.extra-btn--docs {
    border-left-color: var(--green);
    color: var(--green-dark);
}
.extra-btn--docs i { color: var(--green); }
.extra-btn--docs:hover {
    background: #dcfce7;
    border-color: var(--green);
    border-left-color: var(--green);
    color: var(--green-dark);
}
.extra-btn--docs.active {
    background: #dcfce7;
    border-color: var(--green);
    border-left-color: var(--green);
    color: var(--green-dark);
}

/* Разделители */
.left-block hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 14px 0;
}

/* Информационная подпись внизу */
.left-block .left-block-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-container {
    flex: 1;
    min-width: 0;
}

.menu {
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 16px 30px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
    border-bottom: 3px solid #e6edf5;
    align-items: center;
}

.menu .menu-title {
    font-weight: 700;
    color: #2a3a4a;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
}

.menu a {
    text-decoration: none;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.menu a.menu-polu { color: var(--polu-dark); background: var(--polu-bg); }
.menu a.menu-polu:hover { background: var(--polu-bg-hover); }
.menu a.menu-polu.active {
    background: var(--polu-accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 137, 123, 0.3);
}

.menu a.menu-stac { color: var(--stac-dark); background: var(--stac-bg); }
.menu a.menu-stac:hover { background: var(--stac-bg-hover); }
.menu a.menu-stac.active {
    background: var(--stac-accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 95, 176, 0.3);
}

.menu .menu-spacer { flex: 1; }
.menu .menu-info { font-size: 13px; color: #6a7a8a; }

.content-wrapper {
    background: #ffffff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== ПРЕЙСКУРАНТ (вкладка) ===== */
.price-list-note {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

.price-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.price-table thead {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.price-table th {
    padding: 12px 16px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    border: 1px solid #1e3c72;
}

.price-table td {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    vertical-align: top;
    color: #1f2937;
    line-height: 1.5;
}

.price-table tbody tr:hover td { background: #f8fafc; }

.price-table tr.group-row td {
    background: #eef4fb;
    color: #1e3c72;
    font-weight: 700;
    border: 1px solid #c0d4e8;
    line-height: 1.5;
}

.price-table tr.group-row:hover td { background: #e3edf8; }

.price-table .col-num { width: 50px; text-align: center; }
.price-table .col-time { width: 110px; text-align: center; white-space: nowrap; }
.price-table .col-price {
    width: 130px;
    text-align: right;
    font-weight: 600;
    color: #1e3c72;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .price-table { font-size: 12px; }
    .price-table th, .price-table td { padding: 8px 10px; }
    .price-table .col-num { width: 36px; }
    .price-table .col-time { width: 80px; }
    .price-table .col-price { width: 100px; }
}

/* ===== СТАТИСТИКА ===== */
.compact-stats { margin-top: 10px; }

.stats-section {
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.section-places {
    background: #fefce8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #f59e0b;
}

.section-volume {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #10b981;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i { color: var(--blue); font-size: 1.3rem; }
.section-places .section-title i { color: #f59e0b; }
.section-volume .section-title i { color: #10b981; }

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stats-table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.stats-table td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.stats-table tr:hover td { background: #f8fafc; }

.stats-table .subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    display: block;
    margin-top: 2px;
}

.service-name { font-weight: 500; color: #1f2937; }

.budget-value {
    color: var(--blue);
    font-weight: 600;
    background: #f0f9ff;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.private-value {
    color: var(--green);
    font-weight: 600;
    background: #f0fdf4;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.note-box {
    margin-top: 25px;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #6b7280;
}

.content-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

/* ===== ПОЛУСТАЦИОНАР ===== */
.header-polu {
    border-bottom: 3px solid var(--polu-accent);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header-polu h1 {
    font-size: 28px;
    color: var(--polu-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-polu h1 span {
    background: var(--polu-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 30px;
}

.header-polu .subtitle {
    margin-top: 10px;
    font-size: 15px;
    color: #4a5a6a;
    background: var(--polu-bg);
    padding: 12px 20px;
    border-radius: 10px;
    border-left: 5px solid var(--polu-accent);
    line-height: 1.6;
}

.header-polu .subtitle strong { color: var(--polu-dark); }
.header-polu .subtitle .law-link { color: var(--polu-accent); text-decoration: none; font-weight: 600; }

.header-polu .subtitle .badge-urgent {
    display: inline-block;
    background: #fff3e0;
    color: var(--orange);
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #ffb74d;
}

.header-polu .subtitle .badge-free {
    display: inline-block;
    background: var(--polu-bg);
    color: #2e7d32;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #66bb6a;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.stat-item {
    background: #f7faff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e6edf5;
    text-align: center;
}

.stat-item .number { font-size: 26px; font-weight: 700; color: var(--polu-accent); }
.stat-item .label { font-size: 13px; color: #5a6a7a; margin-top: 4px; }
.stat-item .label .law-ref { font-size: 11px; color: var(--polu-accent); }

.stat-item.highlight { background: var(--polu-bg); border-color: #a5d6a7; }
.stat-item.highlight .number { color: #2e7d32; }
.stat-item.urgent-stat { background: #fff3e0; border-color: #ffb74d; }
.stat-item.urgent-stat .number { color: var(--orange); }
.stat-item.free-stat { background: var(--polu-bg); border-color: #66bb6a; }
.stat-item.free-stat .number { color: #2e7d32; }

.scheme-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--polu-dark);
    margin: 30px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.scheme-title .badge {
    background: var(--polu-bg);
    color: var(--polu-accent);
    font-size: 13px;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 20px;
}

.scheme-title .badge-blue {
    background: #e3f2fd;
    color: #0d47a1;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 20px;
}

.scheme-title .badge-orange {
    background: #fff3e0;
    color: var(--orange);
    font-size: 13px;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 20px;
}

.scheme-title .badge-free {
    background: var(--polu-bg);
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 20px;
}

/* ===== СТИЛИ ДЛЯ ТАБЛИЦЫ ОЦЕНКИ КАЧЕСТВА ===== */
.quality-table tbody tr:hover td {
    background: #f8fafc;
}

.quality-link {
    display: inline-block;
    padding: 6px 12px;
    background: #eef2ff;
    color: #1a56db;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quality-link i {
    margin-right: 4px;
    color: #e74c3c;
}

.quality-link:hover {
    background: #1a56db;
    color: #ffffff;
    border-color: #1a56db;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

.quality-link:hover i {
    color: #ffffff;
}

/* ===== FLOW ===== */
.flow {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 30px;
    --flow-accent: var(--polu-accent);
    --flow-bg: #fafffe;
    --flow-bg-hover: #f0faf7;
    --flow-border: #e0f0ec;
    --flow-border-hover: #80cbc4;
    --flow-line: #b2dfdb;
}

.flow::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 30px;
    bottom: 30px;
    width: 3px;
    background: var(--flow-line);
    border-radius: 4px;
}

.step {
    position: relative;
    padding: 18px 22px 18px 30px;
    background: var(--flow-bg);
    border-radius: 12px;
    border: 1px solid var(--flow-border);
    margin-bottom: 12px;
    transition: 0.15s;
}

.step:hover {
    background: var(--flow-bg-hover);
    border-color: var(--flow-border-hover);
}

.step::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 24px;
    width: 14px;
    height: 14px;
    background: var(--flow-accent);
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px var(--flow-accent);
    z-index: 1;
}

.step .step-number {
    display: inline-block;
    background: var(--flow-accent);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 0 12px;
    border-radius: 20px;
    line-height: 26px;
    margin-right: 10px;
}

.step .step-title { font-weight: 700; font-size: 17px; color: var(--polu-dark); }
.step .step-law { font-size: 13px; color: var(--flow-accent); font-weight: 500; margin-left: 8px; }
.step .step-desc { margin-top: 8px; padding-left: 4px; font-size: 14px; color: #2a3a4a; line-height: 1.6; }

.step .step-desc ul { list-style: none; padding: 0; margin: 6px 0 0 0; }

.step .step-desc ul li {
    padding: 4px 0 4px 26px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2300897b" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') left center no-repeat;
    background-size: 16px;
}

.step .step-desc ul li .law-ref { color: var(--flow-accent); font-size: 12px; font-weight: 500; }

.step .step-desc .highlight-box {
    background: var(--polu-bg);
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 8px;
    border-left: 4px solid var(--flow-accent);
    font-size: 14px;
}

.step .step-desc .highlight-box strong { color: var(--polu-dark); }

.step .step-desc .highlight-box-pay {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 8px;
    border-left: 4px solid #0d47a1;
    font-size: 14px;
}

.step .step-desc .highlight-box-urgent {
    background: #fff3e0;
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 8px;
    border-left: 4px solid var(--orange);
    font-size: 14px;
}

.step .step-desc .highlight-box-free {
    background: var(--polu-bg);
    border-radius: 8px;
    padding: 10px 16px;
    margin-top: 8px;
    border-left: 4px solid #2e7d32;
    font-size: 14px;
}

.step.reject { background: #fef6f5; border-color: #f5d0cc; }
.step.reject::before { background: var(--red); box-shadow: 0 0 0 3px var(--red); }
.step.reject .step-number { background: var(--red); }
.step.reject .highlight-box { background: #fde8e5; border-color: var(--red); }

.step.success { background: #f0f9f0; border-color: #b8d9b8; }
.step.success::before { background: #2e7d32; box-shadow: 0 0 0 3px #2e7d32; }
.step.success .step-number { background: #2e7d32; }

.step.pay-step { background: #e3f2fd; border-color: #90caf9; }
.step.pay-step::before { background: #0d47a1; box-shadow: 0 0 0 3px #0d47a1; }
.step.pay-step .step-number { background: #0d47a1; }

.step.urgent-step { background: #fff8e1; border-color: #ffd54f; }
.step.urgent-step::before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange); }
.step.urgent-step .step-number { background: var(--orange); }

/* ===== СТАЦИОНАР ===== */
.header-stac {
    border-bottom: 3px solid var(--stac-accent);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header-stac h1 {
    font-size: 28px;
    color: var(--stac-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-stac h1 span {
    background: var(--stac-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 30px;
}

.header-stac .subtitle {
    margin-top: 10px;
    font-size: 15px;
    color: #4a5a6a;
    background: var(--stac-bg);
    padding: 12px 20px;
    border-radius: 10px;
    border-left: 5px solid var(--stac-accent);
    line-height: 1.6;
}

.header-stac .subtitle strong { color: var(--stac-dark); }
.header-stac .subtitle .law-link { color: var(--stac-accent); text-decoration: none; font-weight: 600; }

.stats-stac .stat-item .number { color: var(--stac-accent); }
.stats-stac .stat-item .label .law-ref { color: var(--stac-accent); }
.stats-stac .stat-item.urgent-stat { background: #fff8e1; border-color: #ffd54f; }
.stats-stac .stat-item.urgent-stat .number { color: var(--orange); }

.scheme-stac .scheme-title { color: var(--stac-dark); }
.scheme-stac .scheme-title .badge { background: #e8edf5; color: var(--stac-accent); }
.scheme-stac .scheme-title .badge-orange { background: #fff3e0; color: var(--orange); }

.flow-stac {
    --flow-accent: var(--stac-accent);
    --flow-bg: #fafcff;
    --flow-bg-hover: #f5f9ff;
    --flow-border: #e6edf5;
    --flow-border-hover: #b0cce5;
    --flow-line: #c0d4e8;
}

.flow-stac .step .step-title { color: var(--stac-dark); }
.flow-stac .step .step-law { color: var(--stac-accent); }
.flow-stac .step .step-desc ul li {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%231a5fb0" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>');
}
.flow-stac .step .step-desc ul li .law-ref { color: var(--stac-accent); }
.flow-stac .step .step-desc .highlight-box { background: var(--stac-bg); border-left-color: var(--stac-accent); }
.flow-stac .step .step-desc .highlight-box strong { color: var(--stac-dark); }
.flow-stac .step .step-desc .highlight-box-urgent { background: #fff8e1; border-left-color: var(--orange); }

.flow-stac .step.urgent { background: #fff8e1; border-color: #ffd54f; }
.flow-stac .step.urgent::before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange); }
.flow-stac .step.urgent .step-number { background: var(--orange); }

.flow-stac .step.reject { background: #fef6f5; border-color: #f5d0cc; }
.flow-stac .step.reject::before { background: var(--red); box-shadow: 0 0 0 3px var(--red); }
.flow-stac .step.reject .step-number { background: var(--red); }

.flow-stac .step.success { background: #f0f9f0; border-color: #b8d9b8; }
.flow-stac .step.success::before { background: #2e7d32; box-shadow: 0 0 0 3px #2e7d32; }
.flow-stac .step.success .step-number { background: #2e7d32; }

/* ===== TOOLTIPS ===== */
.tooltip-trigger {
    position: relative;
    cursor: help;
    display: inline-block;
    border-bottom: 1px dashed #b0b0b0;
    outline: none;
}

.tooltip-trigger .fa-question-circle {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tooltip-trigger:hover .fa-question-circle,
.tooltip-trigger:focus .fa-question-circle { opacity: 1; }

.tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #ffffff;
    color: #1f2937;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: pre-wrap;
    min-width: 240px;
    max-width: 480px;
    width: max-content;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: scale(0.95);
    transform-origin: bottom right;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    right: 16px;
    border: 8px solid transparent;
    border-top-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before,
.tooltip-trigger:focus::after,
.tooltip-trigger:focus::before {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.tariff-table tbody tr td { position: relative; }

@media (max-width: 768px) {
    .tooltip-trigger::after {
        min-width: 200px;
        max-width: 300px;
        font-size: 12px;
        padding: 10px 12px;
        right: -8px;
    }
    .tooltip-trigger::before { right: 8px; }
}

/* ===== ОСНОВАНИЯ ===== */
.ground-item { transition: all 0.2s ease; }
.ground-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}
.ground-item h3 { font-size: 17px; font-weight: 600; }
.ground-item ul li {
    padding: 3px 0;
    font-size: 13px;
    color: #4a5568;
    list-style: none;
}
.ground-item ul li::before {
    content: "• ";
    color: var(--blue);
    font-weight: 700;
}

/* ===== ТАБЛИЦА ТАРИФОВ ===== */
.tariff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.tariff-table th,
.tariff-table td {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    vertical-align: top;
    text-align: left;
}

.tariff-table td.cell-center { text-align: center; }
.tariff-table td.cell-note   { font-size: 12px; color: #4a5568; line-height: 1.6; }
.tariff-table tbody tr:hover td { background: #f8fafc; }

/* Наименование услуги (3-й столбец) и Примечание (последний) — по левому краю */
.tariff-table th:nth-child(3),
.tariff-table td:nth-child(3),
.tariff-table th:last-child,
.tariff-table td:last-child {
    text-align: left;
}

.tariff-table td.cell-note,
.tariff-table td.cell-note ul,
.tariff-table td.cell-note li {
    text-align: left;
}

/* ===== СТОЛБЕЦ "ПРИМЕЧАНИЕ" С ПРОКРУТКОЙ ===== */
.tariff-table td .note-scroll {
    display: block;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #c0d4e8 #f0f4f8;
}

.tariff-table td .note-scroll::-webkit-scrollbar { width: 6px; }
.tariff-table td .note-scroll::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 4px;
}
.tariff-table td .note-scroll::-webkit-scrollbar-thumb {
    background: #c0d4e8;
    border-radius: 4px;
    transition: background 0.2s ease;
}
.tariff-table td .note-scroll::-webkit-scrollbar-thumb:hover { background: var(--stac-accent); }

#tabTariffsPolu .tariff-table td .note-scroll::-webkit-scrollbar-thumb { background: #a8d5c4; }
#tabTariffsPolu .tariff-table td .note-scroll::-webkit-scrollbar-thumb:hover { background: var(--polu-accent); }
#tabTariffsPolu .tariff-table td .note-scroll::-webkit-scrollbar-track { background: var(--polu-bg); }

@media (max-width: 768px) {
    .tariff-table td .note-scroll { max-height: 120px; font-size: 11px; }
    .tariff-table td .note-scroll ul { padding-left: 12px !important; }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .page-wrapper { flex-direction: column; gap: 20px; }
    .left-block { width: 100%; position: static; }
    .menu { padding: 12px 20px; }
    .site-title { font-size: 1.6rem; }
    .docs-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-header { padding: 10px 0; margin-bottom: 15px; border-radius: 12px; }
    .site-title { font-size: 1.4rem; }
    .site-subtitle { font-size: 0.85rem; }
    .menu { padding: 12px 16px; flex-direction: column; align-items: stretch; }
    .menu .menu-spacer { display: none; }
    .menu .menu-title { padding-bottom: 8px; }
    .menu a { justify-content: center; }
    .content-wrapper { padding: 20px 16px; }
    .left-block { padding: 20px; }
    .stats-table,
    .paid-services-table { display: block; overflow-x: auto; white-space: nowrap; }
    .paid-stats-number { font-size: 40px; }
    .docs-grid { grid-template-columns: 1fr; }
    .ground-item { padding: 15px !important; }
    .ground-item h3 { font-size: 15px; }
    .ground-item ul li { font-size: 12px; }
}

@media (max-width: 480px) {
    .site-title { font-size: 1.2rem; }
    .site-subtitle { font-size: 0.8rem; }
    .section-title { font-size: 1rem; }
    .budget-value,
    .private-value { min-width: 50px; padding: 3px 8px; font-size: 0.85rem; }
    .paid-stats-number { font-size: 32px; }
    .paid-total { font-size: 18px; }
    .paid-total span { font-size: 20px; padding: 8px 16px; }
    .doc-title { font-size: 15px; }
    .header-polu h1 { font-size: 20px; }
    .header-polu h1 span { font-size: 13px; padding: 2px 12px; }
    .step { padding: 14px 16px 14px 22px; }
    .step .step-title { font-size: 15px; }
    .flow { padding-left: 18px; }
    .flow::before { left: 4px; }
    .step::before { left: -18px; width: 12px; height: 12px; top: 20px; }
    .features { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .doc-table { font-size: 13px; }
    .doc-table th,
    .doc-table td { padding: 6px 10px; }
}

/* ===== ПЕЧАТЬ ===== */
@media print {
    body { background: #fff; padding: 10px; }
    .site-header { box-shadow: none; border: 1px solid #ddd; }
    .left-block,
    .menu { display: none !important; }
    .content-wrapper { box-shadow: none; border: 1px solid #ddd; }
    .step:hover { background: var(--flow-bg); border-color: var(--flow-border); }
    .tab-content { display: block !important; }
}

/* ===== УМЕНЬШЕНИЕ АНИМАЦИЙ ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .site-header:before { animation: none; }
}