/* ==========================================================================
   News Archive - Card Grid Layout
   ========================================================================== */

/* ===== Archive Page ===== */
.news-archive {
    padding: 40px 20px;
}

.news-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.news-archive-header h1 {
    font-size: 2.5em;
    color: var(--color-text);
    margin-bottom: 10px;
}

/* ===== Card Grid ===== */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Individual Card ===== */
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Card Link */
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail */
.news-card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-thumbnail img {
    transform: scale(1.05);
}

/* No Image Fallback */
.news-card-thumbnail.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3em;
    font-weight: bold;
}

/* Card Content */
.news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
}

.news-card-excerpt {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-card-more {
    display: inline-block;
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.news-card-more:hover {
    transform: translateX(5px);
}

/* ===== Pagination ===== */
.news-pagination {
    margin-top: 50px;
    text-align: center;
}

.news-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f5f5f5;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.news-pagination .page-numbers:hover,
.news-pagination .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
}

/* ===== Two Column Option ===== */
.news-card-grid.two-column {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* ===== List View Option ===== */
.news-list-view .news-card {
    display: flex;
    flex-direction: row;
    margin-bottom: 20px;
}

.news-list-view .news-card-thumbnail {
    width: 250px;
    height: 150px;
    flex-shrink: 0;
}

.news-list-view .news-card-content {
    flex-grow: 1;
}

/* ===== No Posts ===== */
.no-posts {
    text-align: center;
    color: #999;
    font-size: 1.1em;
    padding: 60px 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-archive {
        padding: 20px 15px;
    }

    .news-archive-header h1 {
        font-size: 2em;
    }

    .news-list-view .news-card {
        flex-direction: column;
    }

    .news-list-view .news-card-thumbnail {
        width: 100%;
        height: 200px;
    }
}
