/* News Section */
.news-section {
    padding: 100px 0;
    background-color: #fff; /* White background */
    color: #131B2C;
    overflow: hidden; /* Prevent horizontal scroll */
}

/* Header */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .news-section {
        padding: 60px 0; /* Consistent with other sections */
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .news-grid-wrapper {
        gap: 24px;
    }

    .news-card-main .news-card-img-wrapper {
        max-height: 260px;
    }

    .news-small-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.news-title {
    font-size: 48px;
    font-weight: 600;
    color: #13519C;
    /* Gradient text effect if desired, similar to other blocks */
    background: linear-gradient(180deg, #14284E 5.65%, #2E5CB4 92.34%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 480px) {
    .news-title {
        font-size: 32px;
    }
}

/* Controls (Nav + Link) */
.news-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .news-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

/* Nav Arrows */
.news-nav-arrows {
    display: flex;
    gap: 12px;
}

.news-nav-btn {
    width: 50px;
    height: 50px;
    border: 1px solid #13519C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #13519C;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.news-nav-btn:hover:not(:disabled) {
    background: #13519C;
    color: #fff;
}

.news-nav-btn:disabled {
    border-color: #CBD5E1; /* Slate 300 */
    color: #CBD5E1;
    cursor: not-allowed;
}

/* Button (Reused style base) */
.news-header-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
}

.news-btn-text {
    height: 50px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    border: 1px solid #13519C;
    border-radius: 50px;
    color: #13519C;
    font-weight: 500;
    font-size: 16px;
    margin-right: -10px;
    position: relative;
    z-index: 1;
    background: #fff;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrap */
}

.news-btn-icon {
    width: 50px;
    height: 50px;
    border: 1px solid #13519C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: #fff;
    margin-left: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.news-header-btn:hover .news-btn-icon {
    transform: rotate(-45deg);
}

@media (hover: none), (pointer: coarse) {
    .news-header-btn:hover .news-btn-icon {
        transform: none;
    }
}

/* Grid Layout */
.news-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% / 50% split */
    gap: 30px;
    transition: opacity 0.3s ease;
}

.news-grid-wrapper.loading {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .news-grid-wrapper {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 24px;
    }

    .news-small-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

    .news-card-main .news-card-img-wrapper {
        max-height: 360px;
    }
}

/* Main Card */
.news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-card-main {
    /* Takes up the left column */
}

.news-card-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.news-card-main .news-card-img-wrapper {
    aspect-ratio: 16 / 10; /* Adjust as needed */
    height: auto;
    max-height: 400px; /* Limit height */
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-card-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #0C3C75;
    border-radius: 50px;
    color: #0C3C75;
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #1E293B; /* Slate 800 */
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: #13519C;
}

@media (hover: none), (pointer: coarse) {
    .news-card:hover .news-card-img {
        transform: none;
    }

    .news-card:hover .news-card-title {
        color: #1E293B;
    }
}

.news-card-excerpt {
    color: #898989;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Small Grid (Right Column) */
.news-small-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 640px) {
    .news-small-grid {
        grid-template-columns: 1fr;
    }
}

.news-card-small .news-card-img-wrapper {
    aspect-ratio: 4 / 3;
}

.news-card-small .news-card-title {
    font-size: 18px;
    margin-bottom: 0;
}

.news-card-tag-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fff;
    padding: 4px 10px;
    border: 1px solid #0C3C75;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 300;
    color: #0C3C75;
}

/* News Archive Page */
.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    padding: 40px 0;
}

/* Common Card Styles */
.news-card-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #F1F5F9; /* Placeholder background */
}

/* First item large (2x2) */
.news-card-large {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-large .news-card-img-wrapper {
    width: 100%;
    /* Let the image wrapper grow to fill the available height defined by the grid rows */
    flex-grow: 1;
    display: flex;
    height: auto;
}

/* Small Cards in Grid */
.news-card:not(.news-card-large) .news-card-img-wrapper {
    /* Fixed aspect ratio for consistency */
    aspect-ratio: 3 / 2 !important; 
}

.news-card:not(.news-card-large) .news-card-title {
    font-size: 18px; /* Smaller font for regular cards */
    line-height: 1.4;
}

/* Large Card Typography */
.news-card-large .news-card-title {
    font-size: 28px;
    margin-top: 20px;
}

.news-card-large .news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .news-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-card-large {
        grid-column: span 2;
        grid-row: span 2; /* Keep it large or make it full width? */
    }
}
@media (max-width: 640px) {
    .news-archive-grid {
        grid-template-columns: 1fr;
    }
    .news-card-large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}
.pagination-wrapper .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #64748B;
    text-decoration: none;
    transition: all 0.3s ease;
}
.pagination-wrapper .page-numbers.current,
.pagination-wrapper .page-numbers:hover:not(.dots) {
    background: #13519C;
    color: #fff;
    border-color: #13519C;
}
.pagination-wrapper .dots {
    border: none;
}

/* Single News Post Wrapper */
.news-single-wrapper {
    padding-bottom: 80px;
    background: #fff;
}

/* Breadcrumbs adjustment */
.single-breadcrumbs-section {
    background-color: #F5F9FF;
    padding: 20px 0;
    display: flex;
    align-items: center;
}

.single-breadcrumbs-section .container {
    width: 100%;
}

.single-breadcrumbs {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px; /* Increased gap */
    font-size: 13px; /* Slightly smaller */
    flex-wrap: wrap;
    color: #334155;
    line-height: 1.5;
}

.single-breadcrumbs a {
    color: #334155;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.single-breadcrumbs a:hover {
    color: #0C3C75;
}

.single-breadcrumbs .sep {
    display: flex;
    align-items: center;
    color: #94A3B8;
}

.single-breadcrumbs .current {
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Single News Post Wrapper */
.news-single-wrapper {
    padding-bottom: 80px;
    background: #fff;
    padding-top: 40px;
}

/* Hero Image */
.news-single-hero {
    width: 100%;
    max-height: 400px;
    border-radius: 20px;
    overflow: hidden;
    margin: 0; /* Removed all margins */
    position: relative;
}

.news-single-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(29, 100, 233, 0) 50%, rgba(29, 100, 233, 0.6) 100%);
    pointer-events: none;
}

.news-single-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content Wrapper */
.news-single-body-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 30px; 
}

/* Meta Row */
.news-single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.news-single-tag {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #0C3C75;
    border-radius: 50px;
    color: #0C3C75;
    font-size: 14px;
    font-weight: 300;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748B;
    font-size: 14px;
    font-weight: 400;
}

/* Title */
.news-single-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    
    background: linear-gradient(180deg, #14284E 5.65%, #2E5CB4 92.34%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #14284E;
}

/* Content Area */
.news-single-content {
    max-width: 100%;
}

.news-single-lead {
    font-size: 20px;
    line-height: 1.6;
    color: #334155;
    font-weight: 500;
    margin-bottom: 30px;
}

.news-single-body {
    font-size: 16px; /* Reduced from 18px */
    line-height: 1.8;
    color: #475569;
    font-weight: 300;
}

.news-single-body p {
    margin-bottom: 24px;
}

.news-single-body h2, 
.news-single-body h3 {
    color: #1E293B;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Related News Section */
.related-news-section {
    padding: 60px 0 40px;
    background: #F5F9FF;
    border-top: none;
}

.related-news-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 24px 0; /* Only bottom margin */
    padding: 0;
    
    background: linear-gradient(180deg, #14284E 5.65%, #2E5CB4 92.34%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #14284E;
}

.related-news-grid {
    margin: 0 !important;
    padding-top: 0 !important; /* Remove top padding from archive grid */
}

/* Responsive */
@media (max-width: 768px) {
    .news-single-hero {
        max-height: 300px;
        border-radius: 12px;
    }
    .news-single-title {
        font-size: 28px;
    }
    .news-single-lead {
        font-size: 18px;
    }
    .news-archive-grid {
        gap: 20px;
    }
}
