/* Основные стили */
:root {
    --primary-blue: #1e40af;
    --primary-light: #3b82f6;
    --accent-orange: #f97316;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f8fafc;
    --border-light: #e2e8f0;
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --light-gray: #e2e8f0;
    --primary-very-light: #f0f7ff;
    --dark: #1f2937;
}

body {
    background: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.page-header h1 {
    color: var(--primary-blue);
    font-size: 28px;
    margin: 0 0 10px 0;
}

.page-header p {
    color: var(--text-gray);
    font-size: 16px;
    margin: 0;
}

/* Двухколоночный макет с разной шириной */
.two-columns-asymmetric {
    display: grid;
    grid-template-columns: 380px 1fr; /* Левый блок узкий, правый широкий */
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

/* ============================
   ЛЕВЫЙ БЛОК (УЗКИЙ) - РАСПИСАНИЕ
   ============================ */
.schedule-left {
    position: sticky;
    top: 20px;
}

.schedule-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.schedule-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e4a82 100%);
    color: white;
    padding: 20px;
}

.schedule-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-header h2 i {
    font-size: 18px;
}

.schedule-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.schedule-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 0;
    border-bottom: 1px solid var(--border-light);
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--primary-blue);
    background: #e2e8f0;
}

.tab-btn.active {
    color: var(--primary-blue);
    background: var(--white);
    border-bottom-color: var(--primary-blue);
}

.group-content {
    display: none;
    padding: 20px;
}

.group-content.active {
    display: block;
}

.group-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.group-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.group-time {
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 500;
}

.compact-schedule {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.day-block {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

.day-title {
    background: #f1f5f9;
    padding: 10px;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

.time-slots {
    padding: 10px;
}

.time-row {
    display: grid;
    grid-template-columns: 50px 1fr 40px;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    align-items: center;
}

.time-row:last-child {
    border-bottom: none;
}

.time {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 13px;
}

.activity {
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.room {
    background: #e2e8f0;
    color: var(--text-gray);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.schedule-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    background: #f8fafc;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================
   ПРАВЫЙ БЛОК (ШИРОКИЙ) - НОВОСТИ
   ============================ */
.news-right {
    height: 100%;
}

.news-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.news-header-section h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-header-section h2 i {
    font-size: 22px;
}

.all-news-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.all-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.news {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.news-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-img.placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 48px;
    color: #94a3b8;
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-read-btn {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.news-card:hover .news-read-btn {
    color: var(--accent-orange);
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.no-news-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.no-news h3 {
    margin: 0 0 10px 0;
    color: var(--text-dark);
    font-size: 20px;
}

.no-news p {
    margin: 0;
    color: var(--text-gray);
}

/* ============================
   БЛОК ФАЙЛОВ С КАТЕГОРИЯМИ
   ============================ */

/* Контейнер категорий */
.files-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

/* Каждая категория */
.file-category {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.file-category:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Заголовок категории */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.category-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 20px;
    color: white;
}

/* Цвета иконок для категорий */
.category-program .category-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.category-plan .category-icon {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.category-report .category-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.category-order .category-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.category-title-text h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.category-title-text p {
    margin: 5px 0 0 0;
    color: #64748b;
    font-size: 14px;
}

.category-count {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

/* Сетка файлов внутри категории (2 колонки) */
.category-files-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Карточка файла */
.file-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    height: 100%;
    min-height: 110px;
}

.file-card:hover {
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #3b82f6;
}

/* Иконка файла */
.file-icon {
    font-size: 22px;
    background: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 2px;
}

/* Цвет иконок по категориям */
.category-program .file-icon {
    color: #3b82f6;
}

.category-plan .file-icon {
    color: #10b981;
}

.category-report .file-icon {
    color: #f59e0b;
}

.category-order .file-icon {
    color: #8b5cf6;
}

/* Содержимое файла */
.file-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Заголовок файла */
.file-title h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Бейдж категории (меньше и в заголовке) */
.file-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
    align-self: flex-start;
}

/* Детали файла */
.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #64748b;
    font-size: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.file-type, .file-size, .file-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-type i, .file-size i, .file-date i {
    font-size: 11px;
}

/* Кнопка скачивания */
.file-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.file-download {
    color: #94a3b8;
    font-size: 18px;
    transition: all 0.3s ease;
    background: white;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin-top: 2px;
}

.file-card:hover .file-download {
    color: #3b82f6;
    background: #eff6ff;
    border-color: #3b82f6;
    transform: scale(1.1);
}

/* Прогресс-бар */
.file-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    width: 0%;
    transition: width 0.5s ease;
}

.file-card:hover .file-progress {
    width: 100%;
    animation: progressAnimation 1.5s ease-in-out;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

/* Анимация появления */
.file-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.file-card:nth-child(1) { animation-delay: 0.1s; }
.file-card:nth-child(2) { animation-delay: 0.2s; }
.file-card:nth-child(3) { animation-delay: 0.3s; }
.file-card:nth-child(4) { animation-delay: 0.4s; }

/* Адаптивность */
@media (max-width: 1200px) {
    .category-files-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .category-files-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .file-card {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .files-categories {
        gap: 20px;
    }
    
    .file-category {
        padding: 20px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .category-files-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-title-text h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .file-category {
        padding: 16px;
    }
    
    .category-title {
        gap: 10px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .category-title-text h3 {
        font-size: 18px;
    }
    
    .file-card {
        padding: 14px;
        gap: 12px;
    }
    
    .file-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .file-title h3 {
        font-size: 13px;
    }
}
/* Адаптивность */
@media (max-width: 1200px) {
    .files-grid {
        grid-template-columns: 1fr; /* На больших экранах одна колонка */
    }
}

@media (max-width: 992px) {
    .files-grid {
        grid-template-columns: repeat(2, 1fr); /* Две колонки */
    }
}

@media (max-width: 768px) {
    .files-header-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .files-search {
        max-width: 100%;
        min-width: 100%;
    }
    
    .file-filters {
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .files-grid {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
    }
    
    .file-card {
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .file-content {
        order: 1;
        flex: 1;
    }
    
    .file-actions {
        order: 2;
        margin-left: 0;
    }
    
    .file-details {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .files-section {
        padding: 18px; /* Уменьшен */
    }
    
    .files-header-section h2 {
        font-size: 20px; /* Уменьшен */
    }
    
    .files-subtitle {
        font-size: 12px; /* Уменьшен */
    }
    
    .file-filters {
        gap: 4px;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .file-card {
        padding: 12px; /* Уменьшен */
    }
    
    .file-icon {
        width: 36px; /* Уменьшен */
        height: 36px; /* Уменьшен */
        font-size: 16px; /* Уменьшен */
    }
    
    .file-title h3 {
        font-size: 12px; /* Уменьшен */
    }
    
    .file-details {
        font-size: 10px; /* Уменьшен */
        gap: 8px;
    }
}

/* Выравнивание элементов в карточке */
.file-card {
    display: flex;
    align-items: stretch; /* Растягиваем элементы по высоте */
}

.file-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.file-details {
    margin-top: auto; /* Прижимаем детали к низу */
}
/* Адаптивность */
@media (max-width: 1200px) {
    .two-columns-asymmetric {
        grid-template-columns: 350px 1fr;
        gap: 25px;
    }
    
    .news {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .two-columns-asymmetric {
        grid-template-columns: 1fr;
    }
    
    .schedule-left {
        position: static;
        margin-bottom: 30px;
    }
    
    .news {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .news-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .all-news-btn {
        align-self: flex-start;
    }
    
    .news {
        grid-template-columns: 1fr;
    }
    
    .time-row {
        grid-template-columns: 45px 1fr 35px;
        gap: 8px;
        padding: 6px 0;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-card {
        padding: 15px;
    }
    
    .file-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .schedule-header h2 {
        font-size: 18px;
    }
    
    .news-header-section h2 {
        font-size: 20px;
    }
    
    .files-header-section h2 {
        font-size: 20px;
    }
    
    .news-img {
        height: 160px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .news-excerpt {
        font-size: 13px;
    }
    
    .file-info h3 {
        font-size: 14px;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }

.file-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.file-card:nth-child(1) { animation-delay: 0.1s; }
.file-card:nth-child(2) { animation-delay: 0.2s; }
.file-card:nth-child(3) { animation-delay: 0.3s; }
.file-card:nth-child(4) { animation-delay: 0.4s; }
.file-card:nth-child(5) { animation-delay: 0.5s; }
.file-card:nth-child(6) { animation-delay: 0.6s; }
.file-card:nth-child(7) { animation-delay: 0.7s; }
.file-card:nth-child(8) { animation-delay: 0.8s; }
.file-card:nth-child(9) { animation-delay: 0.9s; }
.file-card:nth-child(10) { animation-delay: 1.0s; }