/* Стили для страницы документов */
.section {
    --bulma-section-padding: 0.5rem 0.5rem;

}

/* Основной контент */
.content.is-size-5 {
    line-height: 1.7;
}

/* Введение */
.has-background-primary-light {
    background-color: rgba(26, 62, 114, 0.05) !important;
    border: 1px solid var(--primary);
    border-radius: 12px;
}

/* Вкладки фильтров */
.tabs {
    margin-bottom: 2rem;
}

.tabs ul {
    border-bottom: 2px solid var(--border);
}

.tabs li.is-active a {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tabs a {
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tabs a:hover {
    border-bottom-color: var(--primary);
    background-color: var(--surface);
}

/* Таблица документов */
.table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

.documents-table {
    background-color: var(--surface);
    color: var(--text);
}

.documents-table thead th {
    background-color: var(--primary) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 1.25rem 0.75rem;
}

.documents-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
}

.documents-table tbody tr:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

.documents-table tbody tr:hover td {
    color: white !important;
    border-color: var(--primary);
}

.documents-table tbody tr:hover .tag {
    background-color: white !important;
    color: var(--primary) !important;
}

/* Теги для типов документов */
.tag {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.tag.is-info {
    background-color: var(--info);
    color: white;
}

.tag.is-success {
    background-color: var(--success);
    color: white;
}

.tag.is-warning {
    background-color: var(--warning);
    color: #333;
}

.tag.is-danger {
    background-color: var(--danger);
    color: white;
}

.tag.is-primary {
    background-color: var(--primary);
    color: white;
}

.tag.is-link {
    background-color: var(--link);
    color: white;
}

/* Уведомления */
.notification.is-info {
    background-color: var(--primary);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
}

.notification.is-info .title {
    color: white;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {


    .title.is-3 {
        font-size: 1.75rem !important;
    }

    .title.is-5 {
        font-size: 1.5rem !important;
    }

    .subtitle.is-4 {
        font-size: 1.2rem !important;
    }

    .content.is-size-5 {
        font-size: 1.1rem !important;
    }

    .tabs {
        font-size: 0.9rem;
        overflow-x: auto;
    }

    .tabs ul {
        flex-wrap: nowrap;
    }

    .table-container {
        overflow-x: auto;
    }



    .documents-table thead th {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }

    .documents-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 480px) {

    .title.is-3 {
        font-size: 1rem !important;
    }
  .title.is-5 {
    font-size: 1rem !important;
  }
    .content.has-text-centered p {
        font-size: 0.8rem !important;
    }

    .content ul {

        margin-inline-start: 0em;
    }

    .tabs.is-medium {
        font-size: 0.8rem !important;
    }

    .tabs .icon {
        display: none;
    }

    .documents-table thead th {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
/* Название документа - занимает больше места */
    .documents-table {
        font-size: 0.7rem;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 0.4rem 0.2rem;
    }
    .documents-table th:first-child {
        width: 55% !important;
        text-align: center;
        vertical-align: middle;
    }
    
    .documents-table th:nth-child(2) {
        width: 20% !important;
        text-align: center;
        vertical-align: middle;
    }
    
    .documents-table th:nth-child(3) {
        width: 25% !important;
        text-align: center;
        vertical-align: middle;
    }
    .documents-table td:first-child {
        width: 55% !important;
        padding: 0.5rem 0 !important;
        vertical-align: middle;
    }
    
    .documents-table td:nth-child(2) {
        width: 20% !important;
        padding: 0 !important;
        vertical-align: middle;
    }
    
    .documents-table td:nth-child(3) {
        width: 25% !important;
        font-size: 0.65rem;
         padding: 0 !important;
        vertical-align: middle;
    }
    
    .documents-table .tag {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }
    .has-background-primary-light {
        padding: 1rem !important;
    }

    .notification.is-info {
        padding: 1rem;
    }
}

/* Гарантии читаемости */
.documents-table td:first-child {
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* Touch-устройства */
@media (hover: none) {
    .documents-table tbody tr:hover {
        transform: none;
    }

    .tabs a:hover {
        background-color: transparent;
    }
}

/* Дополнительные CSS переменные */
:root {
    --info: #17a2b8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --link: #3273dc;
}

[data-theme="dark"] {
    --info: #64d2ff;
    --success: #34c759;
    --warning: #ffd60a;
    --danger: #ff453a;
    --link: #5ac8fa;
}

/* Улучшенная прокрутка для таблицы */
.table-container {
    -webkit-overflow-scrolling: touch;
}

/* Полосы для таблицы */
.table.is-striped tbody tr:nth-child(even) {
    background-color: var(--surface);
}

.table.is-striped tbody tr:nth-child(odd) {
    background-color: var(--background);
}