/* Стилі для сторінок наказів */

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

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

/* Шапка сторінки */
.law-header {
    background: #1a3a5c;
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.law-header h1 {
    font-size: 1rem;
    font-weight: 600;
}

.law-header a {
    color: #b3d4fc;
    text-decoration: none;
    font-size: 0.85rem;
}

.law-header a:hover {
    color: #fff;
    text-decoration: underline;
}

.law-header .nav-links {
    display: flex;
    gap: 1.5rem;
}

/* Контейнер контенту */
.law-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: #fff;
    min-height: 100vh;
}

/* Стилі оригінального HTML з ради */
.law-content p {
    margin: 0.25rem 0;
}

.law-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.law-content td {
    padding: 0.3rem 0.5rem;
    vertical-align: top;
    border: 1px solid #ddd;
}

.law-content tr:hover {
    background: #f8f9fa;
}

/* Підсвічення знайденого рядка */
.highlighted {
    background: #fff3cd !important;
    outline: 3px solid #ffc107;
    outline-offset: -1px;
    transition: background 0.3s ease, outline 0.3s ease;
}

.highlighted td {
    background: #fff3cd !important;
}

/* Плавне зникнення підсвічення */
.highlight-fade {
    background: transparent !important;
    outline: none;
    transition: background 2s ease, outline 2s ease;
}

.highlight-fade td {
    background: transparent !important;
    transition: background 2s ease;
}

/* Адаптивність */
@media (max-width: 600px) {
    .law-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .law-header .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .law-content {
        padding: 1rem 0.5rem;
    }

    .law-content td {
        font-size: 0.85rem;
        padding: 0.2rem 0.3rem;
    }
}
