
/* Article Category Page Styles - Synced with Article Slider Block */

.category-hero-wrapper {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 0 16px;
}

.category-hero-image {
    width: 100%;
    height: 640px;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

@media (max-width: 1024px) {
    .category-hero-image {
        height: auto;
    }
}

.category-description {
    padding: 120px 0;
}

@media (max-width: 768px) {
    .category-description {
        padding: 60px 0;
    }
}

.category-description-text {
    max-width: 800px;
    margin: 0 auto;
}

/* Filters */
.article-filters-container {
    display: flex;
    padding: 16px 0;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 8px;
    align-self: stretch;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    padding: 16px 32px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 40px;
    border: 1px solid var(--cat-color, #2847AF);
    background: #FFF;
    color: var(--cat-color, #2847AF);
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-item:hover {
    background: #f8f9fc;
}

.filter-item.active {
    border: 1px solid #FFF;
    background: var(--cat-color, #2847AF);
    color: #FFF;
}

/* Posts Grid */
#posts-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 48px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
    #posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    #posts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --- EXACT ARTICLE CARD STYLES FROM BLOCK --- */

.article-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
}

.article-card:hover .article-card__image-wrapper img {
    transform: scale(1.05);
}

.article-card__image-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.article-card__image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-card__meta {
    align-items: center;
    display: flex;
    gap: 8px;
}

.article-card__dot {
    background-color: #2847af;
    border-radius: 4px; /* Block exact style */
    display: block;
    height: 8px;
    width: 8px;
}

.article-card__category {
    font-size: 12px;
    text-transform: uppercase;
}

.article-card__category,
.article-card__title {
    color: #1e3687;
    font-family: "DM Sans", sans-serif; /* Block exact style */
    font-weight: 600;
    line-height: 1.3;
}

.article-card__title {
    font-size: 24px;
    letter-spacing: -1px;
    margin: 0;
}

@media (min-width: 1024px) {
    /* Optional: If we want to strictly follow the block's square 368px desktop size */
    /* .article-card__image-wrapper {
        height: 368px;
        width: 368px;
    } */
}

/* Grid child adjustment for banner */
#posts-grid .hozen-category-banner {
    grid-column: 1 / -1;
}

/* Load More Button */
#load-more-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    width: 100%;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 48px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #3754db;
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.load-more-btn:hover {
    background-color: #2d45b8;
}

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

.load-more-btn .loader-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.load-more-btn.loading .loader-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
