/* --- TOP FEATURED ROW --- */
.featured-row {
    display: flex;
    gap: 30px;
    /* align-items: stretch forces the image and content columns to equal height */
    align-items: stretch; 
    margin-bottom: 50px;
}

.featured-row .news-image {
    flex: 0 0 350px; /* Keep your fixed width */
    display: flex;   /* Helps the child image fill the space */
}

/* Make the image cover the exact height of the text beside it */
.featured-row .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents image distortion */
}

.featured-row .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 10px; /* Adjusted so it aligns nicely */
}

/* --- BOTTOM GRID --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Make all cards in the grid the same height */
.news-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-item .news-image {
    /*aspect-ratio: 1 / 1; /* Keeps images square */
    width: 100%;
    overflow: hidden;
}

.news-item .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item .content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes the content fill remaining space */
}

/* Pushes the divider and date to the bottom so all cards align at the bottom */
.news-item .news-divider {
    margin-top: auto; 
    color: var(--primary-green, #2fb979);
    height: 2px;
    border: none;
    background-color: var(--primary-green, #2fb979);
}

.featured-row .news-divider { 
    color: var(--primary-green, #2fb979);
    height: 2px;
    border: none;
    background-color: var(--primary-green, #2fb979);
}

/* Mobile Fallback */
@media (max-width: 768px) {
    .featured-row {
        flex-direction: column;
    }
    .featured-row .news-image {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 9; /* Gives image a good shape on mobile */
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.article-container {
    max-width: 900px; /* Constrain width for better reading experience */
    margin: 0 auto;
}

.article-title {
    color: var(--primary-green, #2fb979);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.3;
}

.article-meta {
    font-size: 0.9rem;
    color: #666;
    border-bottom: 2px solid var(--primary-green, #2fb979);
    padding-bottom: 15px;
}

.article-hero-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f5f5f5; /* Placeholder color while loading */
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Ensures images inside the WYSIWYG content don't break the layout */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.btn-back {
    border-color: var(--primary-green, #2fb979);
    color: var(--primary-green, #2fb979);
    transition: all 0.3s;
}
.btn-back:hover {
    background-color: var(--primary-green, #2fb979);
    color: white;
}

.news-link {
    color: var(--primary-green, #2fb979);
}

.hover-card { transition: all 0.3s ease; border-radius: 15px; overflow: hidden; border: none !important; box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important; }
.hover-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important; }


