.af-home-articles {
    padding: 80px 0;
    background: #ffffff;
}

.af-home-articles__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.af-home-articles__header {
    text-align: center;
    margin-bottom: 50px;
}

.af-home-articles__eyebrow {
    display: inline-block;
    padding: 6px 20px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: "Vazir FD", Tahoma, sans-serif;
}

.af-home-articles__title {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px;
    font-family: "Vazir FD", Tahoma, sans-serif;
}

.af-home-articles__description {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    font-family: "Vazir FD", Tahoma, sans-serif;
}

.af-home-articles__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.af-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.af-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: #4f46e5;
}

.af-article-card__cover-link {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.af-article-card__cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.af-article-card:hover .af-article-card__cover {
    transform: scale(1.05);
}

.af-article-card__body {
    padding: 18px; /* Reduced from 24px to make it shorter */
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    justify-content: space-between;
}

.af-article-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    font-family: "Vazir FD", Tahoma, sans-serif;
    line-height: 1.5;
    min-height: 3em; /* Prevent layout shift from title length */
}

.af-article-card__title:hover {
    color: #4f46e5;
}

.af-article-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
    font-family: "Vazir FD", Tahoma, sans-serif;
    margin-top: auto; /* Push to bottom */
}

.af-article-card__meta-icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 1024px) {
    .af-home-articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .af-home-articles {
        padding: 50px 0;
    }
    
    .af-home-articles__title {
        font-size: 26px;
    }
    
    .af-home-articles__grid {
        grid-template-columns: 1fr;
    }
    
    .af-article-card__body {
        padding: 20px;
    }
    
    .af-article-card__title {
        font-size: 18px;
    }
}
