/**
 * Archive & Category Pages Styles
 * 
 * @package Tam_An_Clinic
 * @author ptnghia.dev@gmail.com
 */

/* Posts Pagination Styles */
.posts-pagination {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 2px solid #e2e8f0;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4fd1c7;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(79, 209, 199, 0.2);
}

.pagination-btn:hover {
    background: #38b2ac;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 209, 199, 0.3);
    color: white;
}

.pagination-btn i {
    font-size: 0.875rem;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: white;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.pagination-number:hover {
    background: #4fd1c7;
    color: white;
    border-color: #4fd1c7;
    transform: translateY(-1px);
}

.pagination-number.current {
    background: #2d3748;
    color: white;
    border-color: #2d3748;
    cursor: default;
}

.pagination-dots {
    color: #a0aec0;
    font-weight: bold;
    padding: 0 0.5rem;
}

/* Loading States */
.loading-posts .post-card {
    opacity: 0.5;
    pointer-events: none;
}

.loading-posts .posts-pagination {
    opacity: 0.5;
}

/* Archive Info Box */
.archive-info-box {
    background: linear-gradient(135deg, rgba(79, 209, 199, 0.1) 0%, rgba(44, 82, 130, 0.1) 100%);
    border: 2px solid rgba(79, 209, 199, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.archive-info-box h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.archive-info-box p {
    color: #4a5568;
    line-height: 1.6;
}

/* Archive Filters */
.archive-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.archive-filters h4 {
    margin: 0 0 1rem;
    color: #2d3748;
    font-size: 1.1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4fd1c7;
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.filter-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #4fd1c7;
    border-color: #4fd1c7;
    color: white;
}

/* Archive Stats */
.archive-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4fd1c7;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #718096;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.view-toggle-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #718096;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-toggle-btn.active,
.view-toggle-btn:hover {
    background: #4fd1c7;
    color: white;
}

.view-toggle-btn i {
    font-size: 1rem;
}

/* Breadcrumb Enhancements for Archive Pages */
.archive-page .breadcrumbs,
.category-archive .breadcrumbs {
    backdrop-filter: blur(10px);
}

/* Related Categories */
.related-categories {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.related-categories h4 {
    margin: 0 0 1.5rem;
    color: #2d3748;
    font-size: 1.2rem;
}

.related-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.related-category-item {
    display: block;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s ease;
    text-align: center;
}

.related-category-item:hover {
    background: #4fd1c7;
    color: white;
    transform: translateY(-2px);
}

.related-category-count {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Archive Search */
.archive-search {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.archive-search form {
    display: flex;
    gap: 0.5rem;
}

.archive-search input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.archive-search input[type="search"]:focus {
    outline: none;
    border-color: #4fd1c7;
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.1);
}

.archive-search button {
    padding: 0.75rem 1.5rem;
    background: #4fd1c7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.archive-search button:hover {
    background: #38b2ac;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pagination-container {
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .pagination-numbers {
        order: 2;
        margin: 1rem 0;
    }
    
    .pagination-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .pagination-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    
    .archive-stats {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .view-toggle {
        margin-bottom: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .related-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .archive-search form {
        flex-direction: column;
    }
    
    .archive-search input[type="search"] {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .pagination-numbers {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .pagination-btn span {
        display: none;
    }
    
    .related-categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}
