/* ===================================================================
   СТИЛИ СТРАНИЦЫ НОРМАТИВНОГО ДОКУМЕНТА
   =================================================================== */

body { font-family: 'Georgia', serif; background-color: #fafafa; color: #1e293b; }

/* Хлебные крошки */
.page-breadcrumbs {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85rem; font-weight: 500; color: #1e293b;
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    margin-bottom: 12px; padding: 6px 0;
}
.page-breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.page-breadcrumbs a {
    color: #1E3D79; text-decoration: none; font-weight: 600;
    transition: color 0.2s, text-decoration 0.2s;
}
.page-breadcrumbs a:hover { color: #E51A4B; text-decoration: underline; }
.page-breadcrumbs span { color: #0f172a; font-weight: 600; }
.page-breadcrumbs .ic {
    width: 12px; height: 12px; fill: none; stroke: #94a3b8;
    stroke-width: 2; margin: 0 4px; flex-shrink: 0;
}
.page-breadcrumbs .ic.-arrow { stroke: #94a3b8; width: 10px; height: 10px; }

/* Заголовок */
.normativ-header { margin-bottom: 24px; border-bottom: 2px solid #e2e8f0; padding-bottom: 1.5rem; }
.normativ-header__badge {
    display: inline-block; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 3px 10px; border-radius: 12px; margin-bottom: 8px;
}
.normativ-header__badge--fz { background: #dbeafe; color: #1e40af; }
.normativ-header__badge--gost { background: #fef3c7; color: #92400e; }
.normativ-header__badge--prikaz { background: #dcfce7; color: #166534; }
.normativ-header__badge--postanovlenie { background: #f3e8ff; color: #6b21a8; }
.normativ-header__badge--sp { background: #ffe4e6; color: #9f1239; }
.normativ-header__badge--konkurs { background: #e0f2fe; color: #075985; }

.normativ-header__title {
    font-size: 2rem; font-weight: 700; color: #0f172a;
    letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.3;
}
.normativ-header__full-title {
    font-size: 1rem; color: #64748b; margin: 0 0 16px; line-height: 1.5;
}

/* Мета-информация */
.normativ-meta {
    display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px;
    font-family: system-ui, -apple-system, sans-serif; font-size: 14px; color: #475569;
}
.normativ-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.normativ-meta__label { font-weight: 500; color: #0f172a; }
.normativ-meta__value { color: #475569; }

/* Short описание */
.normativ-short {
    font-size: 1.15rem; line-height: 1.7; color: #334155;
    background: #f1f5f9; padding: 1.5rem 2rem;
    border-left: 5px solid #2563eb; border-radius: 0 8px 8px 0;
    margin: 0 0 28px;
}

/* Основной текст */
.normativ-definition { font-size: 1rem; line-height: 1.8; color: #1e293b; }
.normativ-definition p { margin: 0 0 16px; }
.normativ-definition ul, .normativ-definition ol { margin: 0 0 16px; padding-left: 24px; }
.normativ-definition li { margin-bottom: 6px; }
.normativ-definition h2 {
    font-family: system-ui, -apple-system, sans-serif;
    color: #0f172a; margin: 28px 0 14px; font-size: 1.6rem;
    font-weight: 700; padding-top: 1.5rem; border-top: 2px solid #e2e8f0;
}
.normativ-definition h3 {
    font-family: system-ui, -apple-system, sans-serif;
    color: #0f172a; margin: 28px 0 14px; font-size: 1.2rem; font-weight: 600;
}
.normativ-definition h2:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.normativ-definition a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.normativ-definition a:hover { color: #1d4ed8; }
.normativ-definition table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.normativ-definition th, .normativ-definition td {
    border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; font-size: 0.9rem;
}
.normativ-definition th { background: #f1f5f9; color: #0f172a; font-weight: 500; }
.normativ-definition img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; }
.normativ-definition hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }

/* Блоки контента */
.normativ-content-block { margin: 0; padding: 0; background: transparent !important; }
.normativ-content-block:first-of-type { background: transparent !important; }
.normativ-content-block__inner h2 { margin-top: 0 !important; padding-top: 0 !important; border-top: none !important; }
.normativ-content-block--even { background: transparent !important; }
.normativ-content-block--odd { background: transparent !important; }

/* Скачать документ */
.normativ-download {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; background: #2563eb; color: #fff;
    border-radius: 8px; text-decoration: none; font-weight: 600;
    font-size: 14px; transition: background .2s; margin-bottom: 32px;
}
.normativ-download:hover { background: #1d4ed8; color: #fff; }
.normativ-download svg { width: 18px; height: 18px; }

/* Блок изменений */
.normativ-changes {
    margin: 32px 0; padding: 24px; background: #f8fafc;
    border-radius: 8px; border: 1px solid #e2e8f0;
}
.normativ-changes__title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.2rem; font-weight: 700; color: #0f172a;
    margin: 0 0 16px;
}
.normativ-changes__list { list-style: none; padding: 0; margin: 0; }
.normativ-changes__item {
    display: flex; gap: 12px; padding: 8px 0;
    border-bottom: 1px solid #e2e8f0; font-size: 14px;
}
.normativ-changes__item:last-child { border-bottom: none; }
.normativ-changes__date {
    min-width: 100px; font-weight: 600; color: #0f172a;
    font-family: system-ui, -apple-system, sans-serif;
}
.normativ-changes__desc { color: #475569; line-height: 1.5; }

/* Связанные термины */
.normativ-related {
    margin: 32px 0; padding: 24px; background: #f0f7ff;
    border-radius: 8px; border: 1px solid #bfdbfe;
}
.normativ-related__title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0 0 12px;
}
.normativ-related__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.normativ-related__link {
    display: inline-block; padding: 6px 14px; background: #fff;
    border: 1px solid #bfdbfe; border-radius: 20px;
    font-size: 13px; color: #1e40af; text-decoration: none;
    font-weight: 500; transition: all .2s;
}
.normativ-related__link:hover { background: #1e40af; color: #fff; border-color: #1e40af; }

/* Полный текст (сворачиваемый) */
.normativ-fulltext { margin: 32px 0; }
.normativ-fulltext__toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: #f1f5f9; color: #0f172a;
    border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .2s; font-family: inherit; width: 100%;
    text-align: left;
}
.normativ-fulltext__toggle:hover { background: #e2eff5; border-color: #a7c1d2; }
.normativ-fulltext__toggle svg { transition: transform .2s; flex-shrink: 0; }
.normativ-fulltext__toggle.is-open svg { transform: rotate(180deg); }
.normativ-fulltext__content {
    display: none; margin-top: 16px; padding: 24px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; line-height: 1.7; color: #1e293b;
    max-height: 600px; overflow-y: auto;
}
.normativ-fulltext__content.is-open { display: block; }
.normativ-fulltext__content pre {
    white-space: pre-wrap; word-wrap: break-word;
    font-family: 'Courier New', monospace; font-size: 13px;
    line-height: 1.6; margin: 0;
}

/* Мини-навигация */
.normativ-sidebar {
    position: sticky; top: 120px; padding: 20px;
    background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0;
}
.normativ-sidebar__title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px; font-weight: 700; color: #0f172a; margin: 0 0 12px;
}
.normativ-sidebar__list { list-style: none; padding: 0; margin: 0; }
.normativ-sidebar__link {
    display: block; padding: 6px 0; color: #475569; text-decoration: none;
    font-size: 13px; line-height: 1.4; transition: color .2s;
}
.normativ-sidebar__link:hover { color: #e51a4b; }
.normativ-sidebar__link.is-active { color: #2563eb; font-weight: 600; }

/* CTA блок */
.normativ-cta {
    margin: 40px 0; padding: 32px; background: linear-gradient(135deg, #0c2556 0%, #1a3a6e 100%);
    border-radius: 12px; color: #fff;
}
.normativ-cta__title { font-size: 1.4rem; font-weight: 700; margin: 0 0 12px; }
.normativ-cta__text { font-size: 15px; opacity: .9; margin: 0 0 20px; line-height: 1.6; }
.normativ-cta__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; background: #e51a4b; color: #fff;
    border-radius: 8px; text-decoration: none; font-weight: 600;
    font-size: 14px; transition: background .2s;
}
.normativ-cta__btn:hover { background: #c9153e; color: #fff; }

/* Форма в CTA */
.normativy-cta-form { margin-top: 20px; }
.normativy-cta-form__row { display: flex; gap: 12px; margin-bottom: 12px; }
.normativy-cta-form__row input {
    flex: 1; padding: 10px 14px; border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px; background: rgba(255,255,255,.1); color: #fff;
    font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s;
}
.normativy-cta-form__row input::placeholder { color: rgba(255,255,255,.55); }
.normativy-cta-form__row input:focus { border-color: rgba(255,255,255,.6); }
.normativy-cta-form__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.normativy-cta-form__consent { font-size: 12px; opacity: .7; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.normativy-cta-form__consent input { width: auto; accent-color: #e51a4b; }
.normativy-cta-success { display: flex; align-items: center; gap: 10px; padding: 16px; background: rgba(22,163,74,.12); border-radius: 8px; margin-top: 16px; font-size: 14px; }

@media (max-width: 640px) {
    .normativy-cta-form__row { flex-direction: column; gap: 8px; }
    .normativy-cta-form__bottom { flex-direction: column; align-items: flex-start; }
}

/* Адаптив */
@media (max-width: 768px) {
    .normativ-header__title { font-size: 1.5rem; }
    .normativ-short { padding: 1rem 1.5rem; font-size: 1rem; }
    .normativ-meta { flex-direction: column; gap: 8px; }
    .normativ-fulltext__content { max-height: 400px; }
}