/* === СТИЛИ ДЛЯ ПОИСКА ПО ДОКУМЕНТАМ === */

.documents-search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
}

.search-container {
    max-width: 100%;
}

.search-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e4d72;
    margin-bottom: 20px;
    text-align: center;
}

.search-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.documents-search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.documents-search-input:focus {
    outline: none;
    border-color: #1e4d72;
    box-shadow: 0 0 0 3px rgba(30, 77, 114, 0.1);
    transform: translateY(-1px);
}

.documents-search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.clear-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.clear-search-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.search-results-count {
    background: #1e4d72;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Сообщение о результатах поиска */
.search-results-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin: 30px 0;
}

.no-results-text {
    font-size: 1.1rem;
    color: #856404;
    margin-bottom: 20px;
    font-weight: 500;
}

.show-all-btn {
    background: #1e4d72;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.show-all-btn:hover {
    background: #2c6aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Подсветка найденных документов */
.category-article-card.search-highlight {
    animation: searchHighlight 0.5s ease-in-out;
    border: 2px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

@keyframes searchHighlight {
    0% {
        transform: scale(1);
        border-color: #dee2e6;
    }
    50% {
        transform: scale(1.02);
        border-color: #28a745;
    }
    100% {
        transform: scale(1);
        border-color: #28a745;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .documents-search-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .search-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .documents-search-input {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .search-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .clear-search-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .search-results-count {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .documents-search-section {
        padding: 15px;
    }
    
    .search-title {
        font-size: 1.1rem;
    }
    
    .documents-search-input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .search-form-wrapper {
        gap: 12px;
    }
}

/* Анимации для плавного появления/исчезновения */
.category-article-card {
    transition: all 0.3s ease;
}

.category-article-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

.category-article-card:not([style*="display: none"]) {
    opacity: 1;
    transform: scale(1);
}

/* Улучшенные стили для поля поиска */
.documents-search-input:focus {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Стили для активного состояния кнопок */
.clear-search-btn:active,
.show-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Дополнительные эффекты для найденных документов */
.category-article-card.search-highlight .article-title a {
    color: #28a745;
    font-weight: 600;
}

.category-article-card.search-highlight .read-btn {
    background: #28a745;
    border-color: #28a745;
}

.category-article-card.search-highlight .read-btn:hover {
    background: #218838;
    border-color: #218838;
}
