﻿/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== МКЭ ФОРМА ===== */
.fem-verification-section {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.fem-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


.step-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border);
}

.step-hint {
    background: rgba(59, 130, 246, 0.08);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.step-hint i {
    color: var(--primary);
    margin-right: 0.4rem;
}

.input-grid {
    display: grid;
    gap: 1rem;
}

.input-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.input-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.matrix-block {
    margin-bottom: 1.2rem;
}

.matrix-block label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.info-panels {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-panels .info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-panels .info-card.warning {
    border-left: 4px solid var(--accent);
}

.info-panels .info-card h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.info-panels .info-card p {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

.info-panels .info-card code {
    background: var(--bg-light);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.88em;
    color: var(--primary);
}

/* Адаптивность */
@media (max-width: 768px) {
    .input-grid.cols-2,
    .input-grid.cols-3 { grid-template-columns: 1fr; }
    
    .fem-verification-section { padding: 1.5rem 1rem; }
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--bg-light);
    color: var(--primary);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pass {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

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

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: var(--bg-light);
    padding: 1.2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.summary-item strong {
    font-size: 1.3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ===== LAYOUT ===== */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 3rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 20px 20px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--white);
}

.breadcrumbs span {
    opacity: 0.6;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.3rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    background: var(--bg-light);
    color: var(--primary);
    transform: translateX(3px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 600;
}

.sidebar-nav i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

/* ===== CONTENT ===== */
.content {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.content h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.content h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    text-align: center;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: var(--transition);
}

.content a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ===== CARDS ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .sidebar {
        position: static;
        max-height: none;
    }
    
    .nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav.active {
        right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

        /* ===== СЕКЦИЯ СКАЧИВАНИЯ ФАЙЛОВ ===== */
.downloads-section {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.downloads-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.downloads-header h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.downloads-subtitle {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 1rem;
}

.downloads-stats {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-light);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.stat-badge i {
    color: var(--primary);
}

.stat-badge strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Фильтры */
.downloads-filters {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-chip:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.filter-chip i {
    font-size: 0.85rem;
}

/* Сетка категорий */
.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.download-category {
    background: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease backwards;
}

.download-category:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.download-category.hidden {
    display: none;
}

.category-header {
    background: var(--white);
    padding: 1.3rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.category-icon.method {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-icon.science {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-icon.program {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-icon.report {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.download-category:hover .category-icon {
    transform: scale(1.1) rotate(-5deg);
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin: 0 0 0.2rem 0;
}

.category-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.download-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.download-all-btn i {
    font-size: 0.8rem;
}

/* Список файлов */
.files-list {
    padding: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
}

.file-item:hover::before {
    transform: scaleY(1);
}

/* Иконка файла */
.file-icon {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.file-item:hover .file-icon {
    transform: scale(1.05);
}

.file-icon i {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.file-ext {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.file-icon.pdf { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.file-icon.doc { background: linear-gradient(135deg, #2563eb, #1e40af); }
.file-icon.ppt { background: linear-gradient(135deg, #f97316, #ea580c); }
.file-icon.zip { background: linear-gradient(135deg, #6b7280, #374151); }
.file-icon.xls { background: linear-gradient(135deg, #10b981, #047857); }
.file-icon.img { background: linear-gradient(135deg, #a855f7, #7e22ce); }

/* Информация о файле */
.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.file-item:hover .file-name {
    color: var(--primary);
}

.file-meta {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-light);
}

.file-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.file-meta i {
    font-size: 0.75rem;
}

/* Кнопка скачивания */
.file-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.file-item:hover .file-action {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    transform: scale(1.1);
}

/* Информационный блок */
.downloads-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 64, 175, 0.05));
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.info-content h4 {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.info-content p {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
}

.info-content a {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 1px dashed var(--primary);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-category:nth-child(1) { animation-delay: 0.1s; }
.download-category:nth-child(2) { animation-delay: 0.2s; }
.download-category:nth-child(3) { animation-delay: 0.3s; }
.download-category:nth-child(4) { animation-delay: 0.4s; }

/* Адаптивность */
@media (max-width: 768px) {
    .downloads-section {
        padding: 1.5rem 1rem;
    }
    
    .downloads-header {
        flex-direction: column;
    }
    
    .downloads-header h2 {
        font-size: 1.4rem;
    }
    
    .downloads-stats {
        width: 100%;
        justify-content: flex-start;
    }
    
    .category-header {
        flex-wrap: wrap;
    }
    
    .download-all-btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .file-info {
        width: calc(100% - 75px);
    }
    
    .file-action {
        margin-left: auto;
    }
    
    .file-meta {
        gap: 0.8rem;
        font-size: 0.8rem;
    }
    
    .downloads-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .filter-chip {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .filter-chip span {
        display: none;
    }
    
    .downloads-stats {
        flex-wrap: wrap;
    }
    
    .stat-badge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }