/* Additional Menu - Filters & Archive */

/* Menu Button */
.additional-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a90e2 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(26, 63, 103, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 120px;
    justify-content: center;
}

.additional-menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.additional-menu-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(26, 63, 103, 0.3);
}

.additional-menu-btn:hover::before {
    left: 100%;
}

.additional-menu-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.additional-menu-btn:hover svg {
    transform: scale(1.1);
}

.additional-menu-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

/* Menu Overlay */
.additional-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.additional-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Container - Переработанный дизайн */
.additional-menu {
    position: fixed;
    top: 50%;
    right: -450px;
    transform: translateY(-50%);
    width: 400px;
    max-height: 560px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.additional-menu-overlay.active .additional-menu {
    right: 20px;
}

/* Menu Header - Переработанный дизайн */
.additional-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(26, 63, 103, 0.08);
    position: relative;
}


.additional-menu-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.additional-menu-header h3::before {
    content: '⚙️';
    font-size: 1.2rem;
}

.additional-menu-close {
    background: rgba(26, 63, 103, 0.1);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.additional-menu-close:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Menu Content */
.additional-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.menu-section {
    border-bottom: 1px solid rgba(26, 63, 103, 0.06);
    padding-bottom: 2rem;
}

.menu-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.menu-section h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a90e2 100%);
    border-radius: 2px;
}

/* Advanced Filters */
.advanced-filters {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Date Range Filters */
.date-range-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.date-filter-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.date-filter-btn:hover,
.date-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 63, 103, 0.2);
}

/* Sort Filters */
.sort-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sort-filter-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.sort-filter-btn:hover,
.sort-filter-btn.active {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(26, 63, 103, 0.1);
}

.sort-filter-btn.active::before {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
}

/* Per Page Filters */
.per-page-filters {
    display: flex;
    gap: 0.75rem;
}

.per-page-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.per-page-btn:hover,
.per-page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(26, 63, 103, 0.2);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.category-filters::-webkit-scrollbar {
    width: 4px;
}

.category-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.category-filters::-webkit-scrollbar-thumb {
    background: rgba(26, 63, 103, 0.3);
    border-radius: 2px;
}

.category-filters::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 63, 103, 0.5);
}

.category-filter-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.category-filter-btn:hover,
.category-filter-btn.active {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(26, 63, 103, 0.1);
}

.category-filter-btn.active::before {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
}

/* Archive Container - Переработанный дизайн */
.archive-container {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.archive-container::-webkit-scrollbar {
    width: 6px;
}

.archive-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.archive-container::-webkit-scrollbar-thumb {
    background: rgba(26, 63, 103, 0.3);
    border-radius: 3px;
}

.archive-container::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 63, 103, 0.5);
}

.archive-navigation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Archive Year Group */
.archive-year-group {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(26, 63, 103, 0.08);
}

.archive-year {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.archive-year::before {
    content: '📅';
    font-size: 1rem;
}

.archive-months {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Archive Month Item */
.archive-month-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.archive-month-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 63, 103, 0.1);
}

.archive-month-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.archive-month-link:hover {
    background: rgba(26, 63, 103, 0.05);
    color: var(--primary-color);
}

.archive-month-name {
    font-size: 0.95rem;
}

.archive-month-count {
    background: rgba(26, 63, 103, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Menu Stats - Переработанный дизайн */
.menu-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.menu-stats .stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid rgba(26, 63, 103, 0.08);
    transition: all 0.3s ease;
}

.menu-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 63, 103, 0.1);
}

.menu-stats .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.menu-stats .stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .additional-menu {
        width: calc(100% - 2rem);
        right: -100%;
        top: 20px;
        transform: none;
        max-height: calc(100vh - 40px);
        border-radius: 20px;
    }
    
    .additional-menu-overlay.active .additional-menu {
        right: 1rem;
    }
    
    .additional-menu-content {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .additional-menu-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .menu-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .additional-menu-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
    
    .additional-menu-btn span {
        display: inline;
    }
    
    .date-range-filters {
        flex-direction: column;
    }
    
    .per-page-filters {
        flex-wrap: wrap;
    }
    
    .archive-year-group {
        padding: 1rem;
    }
}

/* FHD Screen Optimization */
@media (min-width: 1920px) {
    .additional-menu {
        width: 500px;
        right: -500px;
        max-height: 1050px;
    }
    
    .additional-menu-overlay.active .additional-menu {
        right: 20px;
    }
    
    .additional-menu-content {
        padding: 2.5rem;
        gap: 3rem;
    }
    
    .additional-menu-header {
        padding: 2rem 2rem 2rem 2rem;
    }
    
    .additional-menu-header h3 {
        font-size: 1.4rem;
    }
    
    .menu-section h4 {
        font-size: 1.2rem;
    }
    
    .filter-label {
        font-size: 1rem;
    }
    
    .date-filter-btn,
    .sort-filter-btn,
    .per-page-btn {
        font-size: 1rem;
    }
    
    .menu-stats .stat-number {
        font-size: 2rem;
    }
    
    .menu-stats .stat-label {
        font-size: 0.9rem;
    }
    
    .archive-year {
        font-size: 1.2rem;
    }
    
    .archive-month-name {
        font-size: 1rem;
    }
}

/* QHD Screen Optimization */
@media (min-width: 2560px) {
    .additional-menu {
        width: 700px;
        right: -500px;
        max-height: 1400px;
    }
    
    .additional-menu-overlay.active .additional-menu {
        right: 20px;
    }
    
    .additional-menu-content {
        padding: 2.5rem;
        gap: 3rem;
    }
    
    .additional-menu-header {
        padding: 2rem 2rem 2rem 2rem;
    }
    
    .additional-menu-header h3 {
        font-size: 1.5rem;
    }
    
    .menu-section h4 {
        font-size: 1.3rem;
    }
    
    .filter-label {
        font-size: 1.1rem;
    }
    
    .date-filter-btn,
    .sort-filter-btn,
    .per-page-btn {
        font-size: 1.1rem;
        border-radius: 20px;
    }
    
    .menu-stats .stat-number {
        font-size: 2.25rem;
    }
    
    .menu-stats .stat-label {
        font-size: 1rem;
    }
    
    .archive-year {
        font-size: 1.3rem;
    }
    
    .archive-month-name {
        font-size: 1.1rem;
    }
} 