/* --- Blogs & News Section Styles --- */

.news-section {
    background-color: #f8f9fa;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden; /* Prevent background bleeding */
}

/* Header Text */
.news-sub-title {
    color: #1a44a5;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-align: center;
}
.news-main-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #333333;
    font-size: 2.25rem;
    text-align: center;
}
.title-divider {
    width: 60px;
    height: 3px;
    background-color: #00d2ff;
    margin-top: 15px;
    border-radius: 2px;
}

/* --- Responsive Flex Row (Desktop 4-in-a-row vs Mobile Track) --- */
.news-cards-row {
    display: flex;
    flex-wrap: nowrap; /* Forces row stay unbroken */
    gap: 24px;
    width: 100%;
}

/* Column Rules for Desktop */
.news-card-column {
    flex: 0 0 calc(25% - 18px); /* Flawlessly spaces out 4 elements equally inside 100% width */
    min-width: 0;
}

/* Card Outer Design */
.news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Image Aspect and Tags */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #00d2ff;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    text-transform: uppercase;
}

/* Content Elements */
.news-card .card-date {
    font-size: 0.8rem;
    color: #8c98a4;
    margin-bottom: 8px;
}
.news-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}
.news-card .card-title a {
    color: #212529;
    text-decoration: none;
}
.news-card .card-excerpt {
    font-size: 0.88rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card .read-more-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a44a5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

/* --- Mobile Responsiveness Breakpoints --- */

@media (max-width: 1199.98px) {
    /* On medium screens (Tablets), show 2 cards per view */
    .news-card-column {
        flex: 0 0 calc(50% - 12px);
    }
    .news-cards-row {
        overflow-x: auto;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch; /* Butter-smooth mobile swipe physics */
    }
}

@media (max-width: 575.98px) {
    /* On small Mobile screens, show 1 full card + a visual peek of the next card */
    .news-card-column {
        flex: 0 0 85%; /* Let's mobile user see there's more content to slide into */
    }
    .news-cards-row {
        overflow-x: auto;
        padding: 0 15px 20px 15px; /* Extra breathing space for thumb swiping */
        margin-left: -15px; /* Stretches the row edge-to-edge on mobile display viewports */
        margin-right: -15px;
        scroll-snap-type: x mandatory; /* Makes cards perfectly snap grid-align when swiped */
    }
    .news-card-column {
        scroll-snap-align: start;
    }
    /* Hide native clunky mobile scrollbars for an app-like premium feel */
    .news-cards-row::-webkit-scrollbar {
        display: none;
    }
}