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


 #articles-section {
    text-align: center;
    margin-top: 60px;
    padding: 70px 20px;
    background: linear-gradient(135deg, #f8fafc, #e7eff8);
    border-radius: 12px;

}

/* Title and description */
#articles-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: #1d3557;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

#articles-intro {
    font-size: 1.2rem;
    color: #444;
    max-width: 850px;
    margin: 0 auto 40px;
    line-height: 1.8;
    padding: 10px;
}

.article-date {
  display: block;
  font-size: 0.9rem;
  color: #777;
  margin-top: 10px;
  font-style: italic;
}


/* Grid Layout (Handles Single & Multiple Articles) */
#articles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;  /* Centers the card if only one */
    gap: 35px;
    max-width: 1150px;
    margin: 0 auto;
    padding: 15px 15px;

}

/* Article Card Styling */
.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
    width: 320px; /* Ensures a good size for a single article */
}

/* Image Styling */
.article-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    transition: transform 0.3s ease-in-out;
}

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

/* Article Content */
.article-content {
    padding: 22px;
    text-align: center;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #1d3557;
    margin-bottom: 10px;
    font-weight: 700;
    transition: color 0.3s ease-in-out;
}

.article-content p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

/* Hover Effects */
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.18);
}

.article-card:hover h3 {
    color: #c98c00;
}

/* Single Article Centering */
#articles-grid:has(.article-card:only-child) {
    justify-content: center; /* Ensures the single article is centered */
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    #articles-title {
        font-size: 2.1rem;
    }
    #articles-intro {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    .article-content h3 {
        font-size: 1.4rem;
    }
    .article-content p {
        font-size: 0.95rem;
    }
    .article-card {
        width: 90%; /* Makes it wider on smaller screens */
    }
}