/* Featured Articles Styling Improvements */

/* Featured Article Card Layout */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    align-items: stretch; /* Stretch all cards to same height */
}

.featured-article {
    display: flex;
    flex-direction: column;
    background-color: #1A2A42;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #DECA9C;
    height: auto; /* Remove fixed height to allow natural content flow */
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.featured-article a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-thumbnail {
    height: 200px;
    overflow: hidden;
    background-color: #0D1320;
    position: relative; /* Add for consistent image positioning */
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0.8;
    position: absolute; /* Ensure consistent image positioning */
    top: 0;
    left: 0;
}

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

.article-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative; /* For consistent layout */
}

/* Card layout structure with fixed heights for consistent alignment */
.article-content {
    display: flex;
    flex-direction: column;
    min-height: 350px; /* Minimum height to ensure consistency */
}

.article-title {
    font-family: 'Optima', sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 1px;
    line-height: 1.4;
    margin-bottom: 20px;
    /* Fixed height for title */
    min-height: 90px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-author {
    color: #DECA9C;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 25px;
    /* Consistent height for author info */
    height: 20px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-excerpt {
    color: #E2E8F0;
    font-size: 16px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Limit to 6 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0; /* Remove bottom margin */
}

/* View All button styling */
.view-all {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}

.view-all-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #DECA9C;
    text-decoration: none;
    border: 1px solid #DECA9C;
    font-family: 'Optima', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background-color: rgba(222, 202, 156, 0.1);
    color: #FFFFFF;
    border-color: #FFFFFF;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .article-content {
        padding: 25px;
        min-height: auto; /* Allow natural height on mobile */
    }
    
    .article-title {
        font-size: 20px;
        min-height: auto; /* Allow natural height on mobile */
        -webkit-line-clamp: 2; /* Limit to 2 lines on mobile */
    }
    
    .article-author {
        height: auto; /* Allow natural height on mobile */
        margin-bottom: 15px; /* Reduce space on mobile */
    }
    
    .article-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 4; /* Limit to 4 lines on mobile */
    }
}