.archive-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}


.archive-sidebar {
    flex: 0 0 280px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 20px; 
    z-index: 10;
}

.archive-filter-group {
    margin-bottom: 30px;
}

.archive-filter-group:last-child {
    margin-bottom: 0;
}

.archive-filter-group h3 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-search-box {
    display: flex;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.2s;
}

.archive-search-box:focus-within {
    border-color: var(--accent-color);
}

.archive-search-box input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px;
    outline: none;
    font-size: 0.95rem;
}

.archive-search-box button {
    background: transparent;
    border: none;
    padding: 0 15px;
    color: var(--accent-color);
    cursor: pointer;
    transition: transform 0.2s;
}
.archive-search-box button:hover { transform: scale(1.1); }

/* Кастомні чекбокси */
.archive-years-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.archive-years-list::-webkit-scrollbar { width: 4px; }
.archive-years-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.archive-checkbox-label {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    user-select: none;
}

.archive-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Квадратик чекбоксу */
.archive-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--bg-light);
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.archive-checkbox-label:hover input ~ .archive-checkmark {
    background-color: #e2e6ea;
}

.archive-checkbox-label input:checked ~ .archive-checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.archive-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.archive-checkbox-label input:checked ~ .archive-checkmark:after {
    display: block;
}

.archive-checkbox-label .archive-checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Кнопки фільтру */
.archive-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.archive-btn-apply {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.archive-btn-apply:hover { background-color: var(--accent-hover); }

.archive-btn-reset {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.archive-btn-reset:hover { color: var(--accent-color); }


/* --- ОСНОВНИЙ КОНТЕНТ --- */
.archive-content {
    flex: 1;
}

/* Сітка карток */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Стиль картки */
.archive-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.archive-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Зображення */
.archive-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background-color: #eee;
}

.archive-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.archive-card:hover .archive-card-image img {
    transform: scale(1.05);
}

/* Бейдж */
.archive-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(40, 75, 89, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.archive-no-banner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #cbd3da;
    background: #f0f2f5;
}

/* Тіло картки */
.archive-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.archive-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-card-meta {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Кнопки картки */
.archive-card-actions {
    margin-top: auto;
}

.archive-btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 95%;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    background-color: var(--bg-light);
    color: var(--accent-hover);
    border: 1px solid #dce0e5;
}

.archive-btn-action:hover {
    background-color: var(--accent-hover);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- ПАГІНАЦІЯ --- */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.archive-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.archive-page-link:hover {
    border-color: var(--primary-color);
    color: var(--accent-hover);
}

.archive-page-link.active {
    background-color: var(--accent-hover);
    color: #fff;
    border-color: var(--primary-color);
}

.archive-page-dots {
    color: var(--text-muted);
    font-weight: bold;
}

.archive-no-results {
    text-align: center;
    padding: 60px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px dashed #ccc;
}

/* --- АДАПТИВНІСТЬ --- */
@media (max-width: 900px) {
    .archive-layout {
        flex-direction: column;
    }
    
    .archive-sidebar {
        width: 100%;
        position: static;
        box-sizing: border-box;
    }
    
    .archive-years-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: none;
    }
}