/* ═══════════════════════════════════════════════════════════
   pages.css — единый CSS для всех внутренних контентных страниц
   ═══════════════════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.breadcrumb {
    max-width: 960px;
    margin: 24px auto 0;
    padding: 0 24px;
    font-size: .875rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color .15s;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--text-muted); opacity: .6; }
.breadcrumb span:last-child { color: var(--text-secondary); font-weight: 500; }

/* ── Page Hero ── */
.page-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    text-align: center;
}
.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.page-hero-lead,
.page-hero p.page-hero-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Definition Box ── */
.definition-box {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 24px 32px;
    background: var(--primary-light, #eff6ff);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius, 8px);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}
.definition-box p { margin: 0; }
.definition-box p + p { margin-top: 12px; }
.definition-box strong { color: var(--primary); font-weight: 700; }

/* ── Content Block ── */
.content-block {
    max-width: 960px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.content-block h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -.01em;
}
.content-block h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
}
.content-block h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 10px;
}
.content-block p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.content-block p:last-child { margin-bottom: 0; }

/* Lists inside content-block */
.content-block ul,
.content-block ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.content-block ul {
    list-style: none;
    padding-left: 0;
}
.content-block ul > li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.content-block ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .7em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}
.content-block ol > li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 4px;
}
.content-block li strong {
    color: var(--text);
    font-weight: 600;
}
.content-block strong {
    color: var(--text);
    font-weight: 600;
}
.content-block a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: border-color .15s, color .15s;
}
.content-block a:hover {
    border-bottom-style: solid;
    color: var(--primary-hover, #1d4ed8);
}

/* ── Highlight Box ── */
.highlight-box {
    background: var(--bg-secondary, #f7f8fa);
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    padding: 24px 28px;
    margin: 24px 0 28px;
}
.highlight-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.highlight-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.highlight-box ul > li {
    position: relative;
    padding-left: 20px;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.highlight-box ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}
.highlight-box ul > li:last-child { margin-bottom: 0; }
.highlight-box li strong {
    color: var(--text);
    font-weight: 600;
}
.highlight-box p {
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.highlight-box p:last-child { margin-bottom: 0; }

/* ── Content Table ── */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
    font-size: .95rem;
    border-radius: var(--radius, 8px);
    overflow: hidden;
    border: 1px solid var(--border);
}
.content-table th {
    background: var(--bg-secondary, #f7f8fa);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.content-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.65;
    vertical-align: top;
}
.content-table tr:last-child td { border-bottom: none; }
.content-table tr:hover td {
    background: var(--bg-hover, #f8fafc);
}
.content-table td strong {
    color: var(--text);
    font-weight: 600;
}
.content-table td a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}
.content-table td a:hover { border-bottom-style: solid; }

/* ── Case Block ── */
.case-block {
    background: var(--success-light, #f0fdf4);
    border-left: 4px solid var(--success);
    border-radius: var(--radius, 8px);
    padding: 20px 24px;
    margin: 24px 0 28px;
}
.case-block.case-warning {
    background: var(--warning-light, #fffbeb);
    border-left-color: var(--warning);
}
.case-block.case-danger {
    background: var(--danger-light, #fef2f2);
    border-left-color: var(--danger);
}
.case-block-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    font-size: .95rem;
}
.case-block p {
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}
.case-block p + p { margin-top: 8px; }
.case-block ul {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 0;
}
.case-block ul > li {
    position: relative;
    padding-left: 16px;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.case-block ul > li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ── Steps (ol/ul variant) ── */
.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step;
    margin: 20px 0 28px;
}
.steps-list li {
    position: relative;
    padding-left: 56px !important;
    padding-top: 4px;
    margin-bottom: 28px;
    min-height: 40px;
    counter-increment: step;
    overflow: visible;
    list-style: none !important;
}
.steps-list li:last-child { margin-bottom: 0; }
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .2);
    z-index: 1;
}
.steps-list li strong {
    display: block;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.steps-list li p,
.steps-list li span {
    font-size: .95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Steps (div-based variant) ── */
.step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}
.step-item:last-child { margin-bottom: 0; }
.step-item .step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .2);
}
.step-item > div,
.step-item .step-content {
    flex: 1;
    min-width: 0;
}
.step-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 1.05rem;
    font-weight: 600;
}
.step-item p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Wrapper for div-based steps list */
.steps-list .step-item {
    padding-left: 0;
    margin-bottom: 28px;
    min-height: auto;
}
.steps-list .step-item::before { display: none; }

/* ── FAQ (details/summary accordion) ── */
.faq-section {
    max-width: 960px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.faq-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
details.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--bg-panel, #fff);
    transition: box-shadow .15s;
}
details.faq-item[open] {
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
}
details.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text);
    transition: background .15s;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary:hover {
    background: var(--bg-secondary, #f7f8fa);
}
details.faq-item summary::before {
    content: '\25B8';
    transition: transform .2s;
    flex-shrink: 0;
    color: var(--primary);
    font-size: .85rem;
}
details.faq-item[open] summary::before {
    transform: rotate(90deg);
}
details.faq-item .faq-answer {
    padding: 0 20px 20px 44px;
    font-size: .95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* ── FAQ (div-based with button.faq-q / div.faq-a) ── */
div.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    padding: 20px 24px;
    margin-bottom: 8px;
    overflow: hidden;
    background: var(--bg-panel, #fff);
    transition: box-shadow .15s;
}
div.faq-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}
div.faq-item > p {
    font-size: .95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* faq-q: clickable question button */
.faq-q {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.faq-q:hover {
    background: var(--bg-secondary, #f7f8fa);
}
.faq-q::before {
    content: '\25B8';
    flex-shrink: 0;
    color: var(--primary);
    font-size: .85rem;
    transition: transform .2s;
}
.faq-q.open::before,
.faq-item.open .faq-q::before {
    transform: rotate(90deg);
}

/* faq-a: answer container */
.faq-a {
    padding: 0 20px 20px 44px;
    font-size: .95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    display: none;
}
.faq-a.open,
.faq-item.open .faq-a,
div.faq-item .faq-a {
    display: block;
}
.faq-a p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.faq-a p + p { margin-top: 10px; }
.faq-a ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 0;
}
.faq-a ul > li {
    position: relative;
    padding-left: 16px;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.faq-a ul > li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ── Related Section ── */
.related-section {
    max-width: 960px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.related-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}

/* ── Related Grid ── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.related-card {
    display: block;
    padding: 18px 20px;
    background: var(--bg-panel, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    color: var(--text);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.5;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.related-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.08));
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--primary);
}
.related-card strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 6px;
    line-height: 1.4;
}
.related-card span {
    display: block;
    font-size: .85rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}
.related-card:hover strong {
    color: var(--primary);
}
.related-card .related-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}
.related-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.related-card p {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ── Page CTA (gradient variant) ── */
.page-cta {
    max-width: 960px;
    margin: 0 auto 64px;
    padding: 48px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover, #1d4ed8));
    border-radius: var(--radius-lg, 12px);
    text-align: center;
    color: #fff;
}
.page-cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}
.page-cta p {
    font-size: 1.05rem;
    opacity: .9;
    margin-bottom: 24px;
    color: #fff;
}
.page-cta .btn-cta {
    display: inline-block;
    padding: 14px 32px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    border-radius: var(--radius, 8px);
    text-decoration: none;
    font-size: 1rem;
    transition: transform .15s, box-shadow .15s;
}
.page-cta .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    text-decoration: none;
}

/* ── CTA Section (unified dark block) ── */
.cta-section {
    max-width: 960px;
    margin: 0 auto 64px;
    padding: 56px 32px;
    background: var(--text, #1a202c);
    border-radius: var(--radius-lg, 12px);
    text-align: center;
}
.cta-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.cta-section p {
    color: #94a3b8;
    font-size: 1.05rem;
    margin-bottom: 28px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}
.cta-section .hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.cta-section .btn-primary {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
}
.cta-section .btn-primary:hover {
    background: #f1f5f9;
}
.cta-section .btn-outline {
    border-color: #475569;
    color: #94a3b8;
}
.cta-section .btn-outline:hover {
    background: #1e293b;
    color: #fff;
}

/* cta-btn: standalone CTA button inside cta-section */
.cta-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius, 8px);
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, background .15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    text-decoration: none;
    background: #f1f5f9;
}

/* ── CTA Box (mid-page link blocks) ── */
.cta-box {
    text-align: center;
    margin: 24px 0 32px;
}
.cta-box a:not(.btn):not(.cta-btn) {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius, 8px);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: all .15s;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    background: transparent;
}
.cta-box a:not(.btn):not(.cta-btn):hover {
    background: var(--primary-light, #eff6ff);
    text-decoration: none;
}

/* ── Two-Column Layout ── */
.two-cols,
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 20px 0 28px;
}
.two-cols h4,
.two-col h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}
.two-cols .col,
.two-col .col {
    min-width: 0;
}
.two-cols ul,
.two-col ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.two-cols ul > li,
.two-col ul > li {
    position: relative;
    padding-left: 18px;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.two-cols ul > li::before,
.two-col ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
}
.two-cols li strong,
.two-col li strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Highlight Numbers ── */
.stats-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 0 24px;
}
.stat-item {
    text-align: center;
    padding: 20px 24px;
    background: var(--bg-panel, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    min-width: 140px;
    flex: 1;
    max-width: 220px;
    transition: box-shadow .15s;
}
.stat-item:hover {
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
}
.stat-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.stat-label {
    font-size: .82rem;
    color: var(--text-muted, #718096);
    margin-top: 6px;
    line-height: 1.3;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .page-hero { padding: 32px 16px 24px; }
    .page-hero h1 { font-size: 1.4rem; letter-spacing: -.01em; }
    .page-hero-lead { font-size: 1rem; }
    .definition-box { margin-left: 16px; margin-right: 16px; padding: 20px 20px; font-size: 1rem; }
    .content-block { padding: 0 16px; margin-bottom: 36px; }
    .content-block h2 { font-size: 1.25rem; }
    .breadcrumb { padding: 0 16px; margin-top: 16px; font-size: .8rem; }
    .two-cols, .two-col { grid-template-columns: 1fr; gap: 16px; }
    .related-grid { grid-template-columns: 1fr; }
    .stats-row { padding: 0 16px; gap: 10px; }
    .stat-item { min-width: 0; padding: 14px 16px; }
    .stat-num { font-size: 1.4rem; }
    .content-table { font-size: .85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .content-table th, .content-table td { padding: 10px 12px; }
    .content-table th { font-size: .78rem; }
    .faq-section { padding: 0 16px; }
    .related-section { padding: 0 16px; }
    .cta-section { margin-left: 16px; margin-right: 16px; padding: 40px 20px; }
    .page-cta { margin-left: 16px; margin-right: 16px; padding: 36px 20px; }
    .highlight-box { padding: 20px; margin-left: 0; margin-right: 0; }
    .case-block { padding: 16px 20px; }
    .step-item { gap: 12px; }
    .step-item .step-num { width: 34px; height: 34px; font-size: .8rem; }
    .steps-list li { padding-left: 48px; }
    .steps-list li::before { width: 34px; height: 34px; }
    .faq-q { padding: 14px 16px; font-size: .95rem; }
    .faq-a { padding: 0 16px 16px 36px; }
}

@media (max-width: 480px) {
    .page-hero h1 { font-size: 1.25rem; }
    .stats-row { flex-direction: column; align-items: stretch; }
    .stat-item { max-width: none; }
    .related-grid { grid-template-columns: 1fr; }
    .content-block ul > li { padding-left: 16px; }
}

/* ── Print ── */
@media print {
    .breadcrumb, .cta-section, .page-cta, .cta-box { display: none; }
    .page-hero { padding: 24px 0 16px; }
    .content-block, .faq-section, .related-section { max-width: 100%; padding: 0; }
    .content-block ul > li::before { background: #000; }
    .highlight-box { border-color: #ccc; break-inside: avoid; }
    .content-table { break-inside: avoid; }
}