/* regulations.css - Стили для раздела регламентов */
:root {
    --regulations-color: #2d6a4f;
    --regulations-light: #40916c;
    --regulations-dark: #1b4332;
}

/* Модальное окно регламентов */
#modalRegulations .modal-content {
    max-width: 900px;
    max-height: 85vh;
    padding: 0;
    overflow: hidden;
}

/* Заголовок регламентов */
.regulations-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--regulations-color), var(--regulations-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.regulations-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.regulations-header .close-regulations {
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 300;
}

.regulations-header .close-regulations:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Контент регламентов */
.regulations-content {
    padding: 20px 30px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

/* Поиск по регламентам */
.regulations-search {
    margin-bottom: 25px;
    position: relative;
}

.regulations-search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 15px center;
    background-size: 18px;
}

.regulations-search-input:focus {
    outline: none;
    border-color: var(--regulations-color);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

/* Сетка регламентов */
.regulations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Карточка регламента */
.regulation-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.regulation-card:hover {
    border-color: var(--regulations-light);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.15);
}

.regulation-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--regulations-color), var(--regulations-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 24px;
}

.regulation-card h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
    flex-grow: 1;
}

.regulation-details {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.regulation-details i {
    color: var(--regulations-color);
}

.regulation-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-download {
    flex: 1;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--regulations-color), var(--regulations-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-download:hover {
    background: linear-gradient(135deg, var(--regulations-dark), #1b4332);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.btn-preview {
    padding: 10px;
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
}

.btn-preview:hover {
    background: #e9ecef;
    color: var(--regulations-color);
    border-color: var(--regulations-light);
}

/* Категории регламентов */
.regulation-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.category-btn.active {
    background: linear-gradient(135deg, var(--regulations-color), var(--regulations-light));
    color: white;
    border-color: var(--regulations-color);
    box-shadow: 0 2px 10px rgba(45, 106, 79, 0.2);
}

/* Сообщение о пустом результате поиска */
.no-results {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

/* Скроллбар */
.regulations-content::-webkit-scrollbar {
    width: 8px;
}

.regulations-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.regulations-content::-webkit-scrollbar-thumb {
    background: var(--regulations-light);
    border-radius: 4px;
}

.regulations-content::-webkit-scrollbar-thumb:hover {
    background: var(--regulations-color);
}

/* Адаптивность */
@media (max-width: 992px) {
    .regulations-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    #modalRegulations .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .regulations-content {
        padding: 15px;
        max-height: calc(85vh - 70px);
    }
    
    .regulations-header {
        padding: 15px 20px;
    }
    
    .regulations-header h2 {
        font-size: 1.3rem;
    }
    
    .regulations-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .regulation-card {
        padding: 15px;
    }
    
    .regulation-actions {
        flex-direction: column;
    }
    
    .btn-preview {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .regulations-content {
        padding: 10px;
    }
    
    .regulations-search-input {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
    }
    
    .regulation-categories {
        flex-direction: column;
    }
    
    .category-btn {
        width: 100%;
        text-align: center;
    }
}

.regulation-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    height: 80px;
}

.regulation-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

.regulation-card h3 {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Скрытие элементов на мобильных */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
    }
    
    /* Увеличиваем кнопку скачивания на мобильных */
    .regulation-card .btn-download {
        width: 100% !important;
        justify-content: center !important;
    }
}