/* =================================
   CSS для страницы правил
   /assets/css/pages/info-rules.css
   ================================= */

/* Hero Section */
.rules-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    min-height: 70vh;
}

.rules-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="docs" width="20" height="20" patternUnits="userSpaceOnUse"><rect width="20" height="20" fill="none"/><path d="M5 5h10v12H5z" fill="rgba(255,255,255,0.05)"/><path d="M7 7h6v1H7zM7 9h6v1H7zM7 11h4v1H7z" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23docs)"/></svg>');
    opacity: 0.3;
}

.rules-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    animation: float 3s ease-in-out infinite;
}

.rules-badge i {
    margin-right: 8px;
    font-size: 16px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.quick-link {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quick-link i {
    font-size: 20px;
    margin-right: 12px;
    opacity: 0.8;
}

.quick-link span {
    font-weight: 500;
    font-size: 14px;
}

/* Documents Preview */
.hero-visual {
    position: relative;
    z-index: 2;
}

.documents-preview {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    animation: float 4s ease-in-out infinite;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header h6 {
    color: white;
    margin: 0;
    font-weight: 600;
}

.doc-status {
    display: flex;
    align-items: center;
    color: #4ade80;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.doc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px 10px;
}

.stat-number {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recent-updates {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.update-title {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.update-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.update-date {
    color: rgba(255, 255, 255, 0.6);
    width: 60px;
    flex-shrink: 0;
}

.update-text {
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    margin: 0 10px;
}

.update-type {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: #f8f9fa;
}

/* Category Navigation */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-btn {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 25px;
    color: #6c757d;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.category-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.category-btn.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.category-btn i {
    font-size: 18px;
    margin-right: 10px;
}

/* Category Sections */
.category-section {
    animation: fadeIn 0.5s ease-in-out;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.category-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.category-info h3 i {
    color: #4f46e5;
    margin-right: 10px;
}

.category-info p {
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

.category-actions .btn {
    font-weight: 500;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.document-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.document-card:hover {
    border-color: #4f46e5;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
}

.document-card:hover::before {
    transform: scaleX(1);
}

.doc-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 24px;
}

.doc-info h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.doc-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.doc-size,
.doc-date {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 13px;
}

.doc-size i,
.doc-date i {
    margin-right: 6px;
    font-size: 12px;
}

.doc-actions {
    display: flex;
    gap: 10px;
}

.doc-actions .btn {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

/* PDF Viewer Modal */
.modal-xl .modal-content {
    height: 90vh;
}

.pdf-viewer-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-level {
    min-width: 50px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

.pdf-info {
    flex: 1;
    text-align: center;
}

#pdfFileName {
    font-weight: 500;
    color: #2c3e50;
}

.pdf-actions {
    display: flex;
    gap: 10px;
}

#pdfViewer {
    flex: 1;
    width: 100%;
    min-height: 600px;
}

/* Management Section */
.management-section {
    padding: 60px 0;
}

.admin-documents-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.admin-documents-table .table {
    margin: 0;
}

.admin-documents-table .table th {
    background: #f8f9fa;
    border: none;
    padding: 15px 20px;
    font-weight: 600;
    color: #2c3e50;
}

.admin-documents-table .table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

/* Upload Modal */
.upload-progress {
    margin-top: 15px;
}

.upload-progress .progress {
    height: 8px;
    border-radius: 4px;
    background: #f0f0f0;
}

.upload-progress .progress-bar {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Contact CTA */
.contact-cta {
    padding: 60px 0;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Document Type Icons */
.doc-icon.pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.doc-icon.doc {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.doc-icon.general {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-badge.pending {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rules-hero {
        padding: 80px 0 60px;
        min-height: 50vh;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .doc-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .category-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .category-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .pdf-toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .pdf-controls,
    .pdf-actions {
        justify-content: center;
    }
    
    .doc-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .doc-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .rules-hero,
    .categories-section,
    .management-section {
        padding: 60px 0;
    }
    
    .document-card,
    .category-header {
        padding: 20px;
    }
    
    .doc-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .modal-xl .modal-content {
        height: 95vh;
        margin: 10px;
    }
}

/* Print Styles */
@media print {
    .rules-hero,
    .category-nav,
    .doc-actions,
    .contact-cta,
    .management-section {
        display: none !important;
    }
    
    .document-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}