/**
 * Latest Articles Section Styles
 * Matches the design shown in the image
 */

.latest-articles-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.latest-articles-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.latest-articles-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 16px 16px 0 0;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Article Card Header */
.article-card-header {
    margin-bottom: 1.5rem;
}

.article-date {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Article Title */
.article-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Allow up to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    word-break: break-word;
}

.article-title a:hover {
    color: #2563eb;
}

.article-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Article Meta */
.article-meta {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.article-authors,
.article-issue {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.article-authors strong,
.article-issue strong {
    color: #1f2937;
}

/* Article Footer */
.article-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.read-more-link:hover {
    color: #f59e0b;
    transform: translateX(4px);
}

/* Section Footer */
.section-footer {
    text-align: center;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .latest-articles-section .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .latest-articles-section {
        padding: 3rem 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card {
        padding: 1.5rem;
    }
    
    .latest-articles-section .section-title {
        font-size: 1.75rem;
    }
    
    .article-title {
        font-size: 17px;
        min-height: 3rem; /* Adjust for smaller font */
        -webkit-line-clamp: 3; /* Still allow 3 lines on mobile */
    }
}

@media (max-width: 480px) {
    .article-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .article-title {
        font-size: 1.125rem;
        min-height: 3rem; /* Adjust for smaller font */
        -webkit-line-clamp: 3; /* Still allow 3 lines */
    }
    
    .article-excerpt {
        font-size: 0.9rem;
    }
    
    .view-all-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation for cards appearing */
.article-card {
    animation: fadeInUp 0.6s ease-out;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.articles-grid.loading .article-card {
    opacity: 0.6;
    pointer-events: none;
}

.articles-grid.loading .article-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}