/* Articles Archive Template Styles */

/* Filter Controls */
.articles-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.articles-filters select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background-color: #f9fafb;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    min-width: 150px;
}

.articles-filters select:focus {
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 2px rgba(55, 65, 81, 0.2);
}

.articles-filters .btn-reset {
    padding: 0.75rem 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background-color: #f9fafb;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.articles-filters .btn-reset:hover {
    background-color: #111827;
    color: white;
    border-color: #111827;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.article-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.article-card:hover .article-card__image::after {
    background: rgba(0, 0, 0, 0.3);
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card__date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.article-card__title {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-card__title a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card__title a:hover {
    color: #111827;
}

.article-card__excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.article-card__button {
    display: inline-block;
    padding: 0.625rem 2rem;
    background-color: #374151;
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.article-card__button:hover {
    background-color: #111827;
}

/* No Results */
.articles-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Loading State */
.articles-grid--loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Animation for cards */
.article-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }
.article-card:nth-child(7) { animation-delay: 0.35s; }
.article-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Transition for filtered items */
.article-card--hidden {
    display: none;
}
