/* Extracted from PHP template; preserve original cascade position. */
/* Строгий компактный дизайн архива */
.archive-section {
    padding: 60px 0;
    background: #ffffff;
}

.archive-header {
    margin-bottom: 40px;
    position: relative;
}

.archive-header:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: #2a9d8f;
}

.section-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.archive-subtitle {
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Фильтры */
.archive-filters {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: #ffffff;
    border: 2px solid #1a4b8c;
    color: #1a4b8c;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 90px;
}

.filter-btn:hover {
    background: #1a4b8c;
    color: white;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #1a4b8c;
    border-color: #1a4b8c;
    color: white;
    font-weight: 700;
}

/* Сетка архива - компактная */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.archive-item {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s ease forwards;
}

/* Карточка выпуска - компактная */
.issue-card-archive {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.issue-card-archive:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #1a4b8c;
}

/* Вертикальная обложка - компактная */
.issue-cover-vertical {
    height: 300px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.issue-card-archive:hover .cover-image {
    transform: scale(1.02);
}

/* Индикатор номера в правом верхнем углу */
.issue-number-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(26, 75, 140, 0.9);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    font-weight: 700;
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Год выпуска в левом нижнем углу */
.cover-year {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 2px;
    z-index: 2;
}

/* Оверлей с описанием */
.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 75, 140, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.issue-cover-vertical:hover .cover-overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    font-size: 0.85rem;
    line-height: 1.4;
    max-height: 100%;
    overflow-y: auto;
}

/* Информация о выпуске - компактная */
.issue-info-archive {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.issue-title {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Мета информация - обновленная */
.issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #555;
}

.meta-item i {
    color: #1a4b8c;
    font-size: 0.8rem;
    width: 14px;
}

/* Кнопки действий - компактные */
.issue-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-read,
.btn-download {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.btn-read {
    background: #1a4b8c;
    color: white;
    border: 1px solid #1a4b8c;
}

.btn-read:hover {
    background: #153a6d;
    border-color: #153a6d;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26, 75, 140, 0.3);
}

.btn-download {
    background: #2a9d8f;
    color: white;
    border: 1px solid #2a9d8f;
}

.btn-download:hover {
    background: #21867a;
    border-color: #21867a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(42, 157, 143, 0.3);
}

/* Сообщение об отсутствии PDF */
.btn-no-pdf {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-no-pdf:hover {
    background: #6c757d;
    border-color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Градиентный фон для карточек без обложки */
.no-cover-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a4b8c 0%, #2a9d8f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.no-cover-gradient .issue-text {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.no-cover-gradient .year-text {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Сообщение об отсутствии результатов */
.no-results-container {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    max-width: 500px;
    margin: 0 auto;
}

.no-results-container i {
    font-size: 2rem;
    color: #adb5bd;
    margin-bottom: 15px;
}

.no-results-container h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.no-results-container p {
    color: #6c757d;
    font-size: 0.9rem;
}

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

@media (max-width: 992px) {
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .issue-cover-vertical {
        height: 270px;
    }
    
    .issue-number-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .archive-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
        gap: 20px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
        padding: 7px 15px;
    }
    
    .archive-filters {
        padding: 12px;
        margin-bottom: 30px;
    }
    
    .issue-cover-vertical {
        height: 250px;
    }
    
    .issue-number-badge {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .no-cover-gradient .issue-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .issue-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .issue-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-read,
    .btn-download {
        width: 100%;
        padding: 12px 0;
    }
    
    .cover-year {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    .issue-info-archive {
        padding: 15px;
    }
    
    .issue-number-badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 10px;
        right: 10px;
    }
}
