/* ==========================================================
   pravila.css — стили для раздела ПДД
   Подключается на страницах: pravila-pdd.php, shtrafy-pdd.php, znaki-pdd.php
   Путь: /assets/css/pravila.css
   ========================================================== */


/* ──────────────────────────────────────────────────────────
   ПРАВИЛА ПДД (pravila-pdd.php)
   ────────────────────────────────────────────────────────── */

/* Анкорное меню разделов */
.pdd-toc {
    background: var(--bg-light, #f7faf7);
    border: 1px solid var(--border, #e0e8e0);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.pdd-toc h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    margin: 0 0 14px;
}

.pdd-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 24px;
}

.pdd-toc-list li {
    margin-bottom: 6px;
    break-inside: avoid;
}

.pdd-toc-list a {
    font-size: 13px;
    color: var(--green, #2a6b2a);
    text-decoration: none;
    line-height: 1.4;
}

.pdd-toc-list a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .pdd-toc-list {
        columns: 1;
    }
}

/* Раздел ПДД */
.pdd-section {
    border: 1px solid var(--border, #e0e8e0);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.pdd-section-header {
    background: var(--bg-light, #f7faf7);
    border-bottom: 1px solid var(--border, #e0e8e0);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdd-section-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green, #3d8a3d);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdd-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.pdd-section-body {
    padding: 0 20px 16px;
}

/* Пункт */
.pdd-punkt {
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #f0f4f0);
}

.pdd-punkt:last-child {
    border-bottom: none;
}

.pdd-punkt-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--green, #2a6b2a);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.pdd-punkt-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text, #1a1a1a);
}

.pdd-punkt-text p {
    margin: 0 0 8px;
}

.pdd-punkt-text p:last-child {
    margin-bottom: 0;
}

.pdd-punkt-text ul {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.pdd-punkt-text li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.pdd-footnote-line {
    font-size: 12px;
    color: var(--text-muted, #888);
    margin: 4px 0;
}

.pdd-change-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.pdd-back {
    font-size: 12px;
    color: var(--green, #2a6b2a);
    text-decoration: none;
    float: right;
    margin-top: 2px;
}

.pdd-back:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .pdd-section-body {
        padding: 0 14px 14px;
    }

    .pdd-section-header {
        padding: 12px 14px;
    }
}


/* ──────────────────────────────────────────────────────────
   ШТРАФЫ ГИБДД (shtrafy-pdd.php)
   ────────────────────────────────────────────────────────── */

/* Оглавление штрафов */
.fine-toc {
    background: var(--bg-light, #f7faf7);
    border: 1px solid var(--border, #e0e8e0);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.fine-toc h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    margin: 0 0 14px;
}

.fine-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 24px;
}

.fine-toc-list li {
    margin-bottom: 6px;
    break-inside: avoid;
}

.fine-toc-list a {
    font-size: 13px;
    color: var(--green, #2a6b2a);
    text-decoration: none;
    line-height: 1.4;
}

.fine-toc-list a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .fine-toc-list {
        columns: 1;
    }
}

/* Блок группы штрафов */
.fine-section {
    border: 1px solid var(--border, #e0e8e0);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.fine-section-header {
    background: var(--bg-light, #f7faf7);
    border-bottom: 1px solid var(--border, #e0e8e0);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fine-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green, #3d8a3d);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fine-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #1a1a1a);
}

.fine-section-body {
    padding: 0 20px 16px;
}

/* Строка штрафа */
.fine-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #f0f4f0);
}

.fine-item:last-child {
    border-bottom: none;
}

.fine-item-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--green, #2a6b2a);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.fine-item-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text, #1a1a1a);
    margin-bottom: 8px;
}

.fine-item-penalty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0f7f0;
    border-left: 3px solid var(--green, #3d8a3d);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text, #1a1a1a);
    line-height: 1.5;
}

.fine-item-penalty strong {
    color: var(--green, #2a6b2a);
    white-space: nowrap;
    flex-shrink: 0;
}

.fine-amount {
    font-size: 14px;
    font-weight: 700;
    color: #c0392b;
}

.fine-amount-lish {
    font-size: 14px;
    font-weight: 700;
    color: #8e44ad;
}

.fine-change-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.fine-back {
    font-size: 12px;
    color: var(--green, #2a6b2a);
    text-decoration: none;
    float: right;
    margin-top: 2px;
}

.fine-back:hover {
    text-decoration: underline;
}

/* Блок скидки */
.fine-discount-box {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.fine-discount-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.fine-discount-text {
    font-size: 14px;
    color: #1b5e20;
    line-height: 1.6;
}

.fine-discount-text strong {
    font-weight: 700;
}

@media (max-width: 480px) {
    .fine-section-body {
        padding: 0 14px 14px;
    }

    .fine-section-header {
        padding: 12px 14px;
    }

    .fine-item-penalty {
        flex-direction: column;
        gap: 4px;
    }
}


/* ──────────────────────────────────────────────────────────
   ДОРОЖНЫЕ ЗНАКИ (znaki-pdd.php)
   ────────────────────────────────────────────────────────── */

/* Навигация по категориям знаков */
.signs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.signs-nav a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--green-light, #e8f5e9);
    color: var(--green, #2a6b2a);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--green, #2a6b2a);
    transition: background .2s, color .2s;
}

.signs-nav a:hover {
    background: var(--green, #2a6b2a);
    color: #fff;
}

/* Раздел знаков */
.signs-section {
    margin-bottom: 40px;
}

.signs-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--green, #2a6b2a);
    border-bottom: 2px solid var(--green, #2a6b2a);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* Карточка знака */
.sign-card {
    display: flex;
    gap: 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.sign-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .09);
}

.sign-img {
    flex: 0 0 80px;
    text-align: center;
}

.sign-img img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.sign-body {
    flex: 1;
    min-width: 0;
}

.sign-body h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #222;
}

.sign-body p {
    font-size: 13.5px;
    color: #444;
    margin: 0 0 6px;
    line-height: 1.55;
}

.sign-fine {
    font-size: 12px;
    color: #b71c1c;
    font-weight: 600;
    margin-top: 4px;
}

.sign-note {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 520px) {
    .sign-card {
        flex-direction: column;
    }

    .sign-img {
        flex: none;
    }
}