/* ========================================
   EPF ARTICLES SECTION - "Want to stay updated"
   ======================================== */

.epf-articles-section {
    background: linear-gradient(180deg, #60609D 0%, #46429A 100%);
    border-radius: 100px;
    margin: 15px 0;
    padding: 20px;
}

.epf-articles-container {
    background: transparent;
    border-radius: 100px;
    padding: 60px 40px;
}

/* Main Heading */
.epf-articles-main-title {
    font-family: 'Marcellus', sans-serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 100%;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 50px;
}

/* Subtitle */
.epf-articles-subtitle {
    font-family: 'Marcellus', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 50px;
}

/* Articles Grid */
.epf-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
    margin-bottom: 40px;
    max-width: 92%;
    margin: 0 auto 40px;
}

/* Individual Article Card */
.epf-article-card {
    display: flex;
    align-items: start;
    gap: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* Desktop: Remove border from last 2 items (last row in 2-column grid) */
.epf-article-card:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
}

/* Mobile: Override - remove border only from last item (1-column layout) */
@media (max-width: 768px) {
    .epf-article-card:nth-last-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        padding-bottom: 20px;
    }
    
    .epf-article-card:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

.epf-article-card:hover {
    transform: translateY(-3px);
}

/* Article Text Content (Left Side) */
.epf-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.epf-article-category {
    font-family: 'Proxima Nova', 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    color: #3D93F7;
    text-decoration: underline;
    text-transform: uppercase;
    margin: 0;
}

.epf-article-title {
    font-family: 'Proxima Nova', 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    color: #FFFFFF;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epf-article-author {
    font-family: 'Proxima Nova', 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #3D93F7;
    margin: 8px 0 0 0;
    vertical-align: middle;
}

/* Article Image (Right Side) */
.epf-article-image-wrapper {
    width: 209px;
    height: 139px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.epf-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Read More Button Container */
.epf-read-more-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.epf-read-more-btn {
    background: #FCF5DD;
    color: #46429A;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.epf-read-more-btn:hover {
    background: #F4E9C1;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Loading and Error States */
.epf-loading-state,
.epf-error-state {
    text-align: center;
    padding: 60px 20px;
    color: #FFFFFF;
}

.epf-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FCF5DD;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: epfSpinner 1s linear infinite;
}

@keyframes epfSpinner {
    to { transform: rotate(360deg); }
}

.epf-error-message {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-bottom: 20px;
}

.epf-retry-btn {
    background: #FCF5DD;
    color: #46429A;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.epf-retry-btn:hover {
    background: #F4E9C1;
    transform: translateY(-2px);
}

/* Animation for articles fade in */
@keyframes epfArticleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epf-article-fade-in {
    animation: epfArticleFadeIn 0.5s ease forwards;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet - 768px */
@media (max-width: 768px) {
    .epf-articles-section {
        margin: 20px 0 0;
        border-radius: 60px;
        padding: 15px;
    }
    
    .epf-articles-container {
        border-radius: 60px;
        padding: 40px 20px;
        gap: 25px;
    }

    .epf-article-content {
        gap: 5px;
    }
    
    .epf-articles-main-title {
        font-size: 24px;
        padding: 0 50px;
        margin-bottom: 25px;
        line-height: 36px;
    }
    
    .epf-articles-subtitle {
        font-size: 20px;
        margin-bottom: 40px;

    }
    
    /* Single column layout */
    .epf-articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;

    }
    
    .epf-article-card {
        gap: 15px;
    }
    
    .epf-article-category {
        font-size: 14px;
    }
    
    .epf-article-title {
        font-size: 18px;
        line-height: 120%;
        -webkit-line-clamp: 3;
    }
    
    .epf-article-author {
        font-size: 14px;
    }
    
    .epf-article-image-wrapper {
        width: 160px;
        height: 106px;
    }
}

/* Mobile - 400px */
@media (max-width: 400px) {
    .epf-articles-container {
        padding: 30px 15px;
    }
    
    .epf-articles-main-title {
        font-size: 24px;
        padding: 0 50px;
        margin-bottom: 25px;
    }
    
    .epf-articles-subtitle {
        font-size: 20px;
        margin-bottom: 30px;
    }
    
    .epf-articles-grid {
        gap: 25px;
    }
    
    .epf-article-card {
        gap: 12px;
    }
    
    .epf-article-category {
        font-size: 13px;
    }
    
    .epf-article-title {
        font-size: 16px;
    }
    
    .epf-article-author {
        font-size: 13px;
    }
    
    .epf-article-image-wrapper {
        width: 140px;
        height: 93px;
    }
    
    .epf-read-more-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Mobile - 360px */
@media (max-width: 360px) {
    .epf-articles-main-title {
        font-size: 18px;
    }
    
    .epf-articles-subtitle {
        font-size: 18px;
    }
    
    .epf-article-category {
        font-size: 12px;
    }
    
    .epf-article-title {
        font-size: 15px;
    }
    
    .epf-article-author {
        font-size: 12px;
    }
    
    .epf-article-image-wrapper {
        width: 120px;
        height: 80px;
    }
}