@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.ifag-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default, overridden by Elementor */
    gap: 30px;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.ifag-news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ifag-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.ifag-news-card-link {
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- THUMBNAIL --- */
.ifag-news-thumb {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.ifag-news-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #CE2139;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


/* --- CONTENT --- */
.ifag-news-content {
    padding: 25px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ifag-news-date-text {
    display: block;
    color: #888888;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.ifag-news-title {
    color: #111111;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 15px 0;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ifag-news-card:hover .ifag-news-title {
    color: #CE2139;
}

.ifag-news-footer {
    margin-top: auto;
}

.ifag-news-cta {
    color: #CE2139;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    transition: gap 0.3s ease;
}

.ifag-cta-arrow {
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.ifag-news-card:hover .ifag-cta-arrow {
    transform: translateX(5px);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .ifag-news-grid {
        grid-template-columns: 1fr;
    }
    .ifag-news-thumb {
        height: 200px;
    }
    .ifag-news-content {
        padding: 25px 20px;
    }
    .ifag-news-title {
        font-size: 17px;
    }
    .ifag-news-arrow {
        display: none;
    }
}
