/*
 * Archive Styles
 * Shared styles for blog/archive pages
 * Used by: home.php, archive.php
 */

/* Archive Layout Container */
.archive-layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #ffffff;
}

/* Archive Hero Section (optional) */
.archive-hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.05) 0%, rgba(240, 248, 255, 0.8) 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 115, 170, 0.1);
}

.archive-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 16px;
    text-transform: capitalize;
    letter-spacing: -0.02em;
}

.archive-page-description {
    font-size: 1.1rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Posts Grid */
.archive-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

/* Post Cards */
.archive-post-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 115, 170, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.archive-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 115, 170, 0.12);
    border-color: rgba(0, 115, 170, 0.15);
}

/* Post Thumbnails */
.archive-post-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.archive-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.archive-post-card:hover .archive-post-thumbnail img {
    transform: scale(1.03);
}

.archive-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

/* Post Content */
.archive-post-content {
    padding: 18px;
}

.archive-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666666;
}

.archive-post-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
}

.archive-post-date::before {
    content: "📅";
    font-size: 0.8rem;
}

.archive-post-category {
    display: inline-block;
    background: rgba(0, 115, 170, 0.1);
    color: #0073aa;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-post-category:hover {
    background: #0073aa;
    color: white;
    transform: scale(1.05);
}

.archive-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #333333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.archive-post-title a:hover {
    color: #0073aa;
}

.archive-post-excerpt {
    color: #666666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0073aa;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.archive-read-more:hover {
    color: #005177;
    gap: 8px;
}

.archive-read-more::after {
    content: "→";
    transition: transform 0.3s ease;
}

.archive-read-more:hover::after {
    transform: translateX(3px);
}

/* Pagination */
.archive-pagination-wrapper {
    margin-top: 60px;
    padding-top: 40px;
}

.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.archive-pagination .page-numbers:not(.current):not(.dots) {
    background: #f8f9fa;
    color: #666666;
}

.archive-pagination .page-numbers:not(.current):not(.dots):hover {
    background: #0073aa;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.archive-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #005177;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.archive-pagination .page-numbers.dots {
    background: transparent;
    color: #999999;
    cursor: default;
}

/* No Posts State */
.archive-no-posts {
    text-align: center;
    padding: 80px 20px;
    background: rgba(240, 248, 255, 0.5);
    border-radius: 16px;
    border: 2px dashed rgba(0, 115, 170, 0.2);
}

.archive-no-posts-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    opacity: 0.5;
}

.archive-no-posts-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.archive-no-posts-text {
    color: #666666;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .archive-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .archive-layout-container {
        padding: 20px 15px;
    }
    
    .archive-hero-section {
        padding: 40px 20px;
        margin-bottom: 40px;
    }
    
    .archive-page-title {
        font-size: 2rem;
    }
    
    .archive-page-description {
        font-size: 1rem;
    }
    
    .archive-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-bottom: 40px;
    }
    
    .archive-post-thumbnail {
        height: 140px;
    }
    
    .archive-post-content {
        padding: 16px;
    }
    
    .archive-post-title {
        font-size: 1rem;
    }
    
    .archive-post-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .archive-pagination-wrapper {
        margin-top: 40px;
        padding-top: 30px;
    }
}

@media (max-width: 480px) {
    .archive-layout-container {
        padding: 15px 10px;
    }
    
    .archive-hero-section {
        padding: 30px 15px;
        margin-bottom: 30px;
    }
    
    .archive-page-title {
        font-size: 1.7rem;
    }
    
    .archive-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .archive-post-thumbnail {
        height: 180px;
    }
    
    .archive-post-content {
        padding: 18px;
    }
    
    .archive-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .archive-post-title {
        font-size: 1.1rem;
    }
    
    .archive-post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .archive-pagination .page-numbers {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
