/* ================================
   ARCHIVE PAGE STYLES
   ================================ */

/* Archive Header */
.archive-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
}

.archive-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.archive-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* Archive Filters */
.archive-filters {
    background: #f8fafc;
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.archive-search-box {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.archive-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.archive-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Alphabetical Filter */
.archive-alpha-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.alpha-btn {
    min-width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #475569;
}

.alpha-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
}

.alpha-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.alpha-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Archive Main Layout */
.archive-main {
    padding: 3rem 0;
    background: #ffffff;
}

.archive-main .container {
    display: flex;
    gap: 2rem;
}

/* Sidebar */
.archive-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.archive-sidebar.sidebar-left {
    order: -1;
}

/* Content Area */
.archive-content {
    flex: 1;
}

.archive-content.with-sidebar {
    max-width: calc(100% - 332px);
}

/* Layout Types */
.archive-layout-fullwidth .container {
    max-width: 1400px;
}

.archive-layout-boxed .container {
    max-width: 1200px;
}

.archive-layout-no-sidebar .archive-sidebar {
    display: none;
}

/* Archive Grid */
.archive-grid {
    display: grid;
    gap: 2rem;
}

/* Column Variants */
.archive-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.archive-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.archive-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.archive-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .archive-columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .archive-columns-4,
    .archive-columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .archive-main .container {
        flex-direction: column;
    }
    
    .archive-sidebar {
        width: 100%;
        order: 1;
    }
    
    .archive-content.with-sidebar {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .archive-columns-2,
    .archive-columns-3,
    .archive-columns-4,
    .archive-columns-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .alpha-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .archive-columns-2,
    .archive-columns-3,
    .archive-columns-4,
    .archive-columns-5 {
        grid-template-columns: 1fr;
    }
}

/* Archive Item */
.archive-item {
    position: relative;
}

.archive-item-link {
    display: block;
    text-decoration: none;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.archive-item-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image Styles */
.archive-item-image {
    position: relative;
    overflow: hidden;
}

.archive-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.archive-item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

/* Hover Effects */
.hover-zoom .archive-item-link:hover .archive-item-image img {
    transform: scale(1.08);
}

.hover-lift .archive-item-link:hover {
    transform: translateY(-12px);
}

.hover-overlay .archive-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-overlay .archive-item-link:hover .archive-item-overlay {
    opacity: 1;
}

.hover-grayscale .archive-item-image img {
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.hover-grayscale .archive-item-link:hover .archive-item-image img {
    filter: grayscale(0%);
}

/* Overlay Content */
.view-more {
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid #ffffff;
    border-radius: 50px;
}

/* Item Content */
.archive-item-content {
    padding: 1.5rem;
}

.archive-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.archive-item-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.archive-pagination {
    margin-top: 3rem;
    text-align: center;
}

/* Classic Pagination */
.archive-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover {
    border-color: #667eea;
    color: #667eea;
}

.archive-pagination .page-numbers.current {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

/* Load More Button */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.load-more-btn:disabled,
.load-more-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Infinite Scroll */
.infinite-scroll-trigger {
    height: 50px;
    margin-top: 2rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0 0 1rem;
}

.no-results p {
    color: #64748b;
    margin: 0;
}

/* Loading State */
.archive-item.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* AJAX Loading Indicator */
.ajax-loading .archive-grid {
    opacity: 0.6;
    pointer-events: none;
}
