/* ===== Variables ===== */
    :root {
        --primary: #1DAA61;
        --primary-dark: #168a4e;
        --primary-light: #e8f5ee;
        --primary-gradient: linear-gradient(135deg, #1DAA61 0%, #148a4e 100%);
        --bg: #f4f7fb;
        --card-bg: #ffffff;
        --text-dark: #0b1a33;
        --text-muted: #4a5a72;
        --text-light: #7a8a9e;
        --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
        --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.10);
        --radius: 16px;
        --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ===== Base ===== */
    .news-page {
        padding: 40px 0 60px;
        background: var(--bg);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }
    .container {
        max-width: 1240px;
        margin: 0 auto;
        padding: 0 24px;
    }

    /* ===== Header ===== */
    .news-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 36px;
        padding-bottom: 20px;
        border-bottom: 2px solid rgba(29, 170, 97, 0.15);
    }
    .page-title {
        font-size: 2.4rem;
        font-weight: 800;
        color: var(--text-dark);
        margin: 0;
        letter-spacing: -0.02em;
    }
    .page-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background: var(--primary-gradient);
        border-radius: 4px;
        margin-top: 6px;
    }
    .page-subtitle {
        font-size: 1rem;
        color: var(--text-light);
        margin: 4px 0 0 0;
        font-weight: 400;
    }
    .news-stats {
        flex-shrink: 0;
    }
    .stat-badge {
        display: inline-block;
        background: var(--primary-gradient);
        color: #fff;
        padding: 8px 20px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.9rem;
        letter-spacing: 0.3px;
        box-shadow: 0 4px 12px rgba(29, 170, 97, 0.3);
    }

    /* ===== News Feed ===== */
    .news-feed {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    /* ===== News Card ===== */
    .news-card {
        background: var(--card-bg);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: transform var(--transition), box-shadow var(--transition);
        display: flex;
        flex-direction: column;
        border-left: 4px solid var(--primary);
    }
    .news-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-hover);
    }

    /* Featured card - spans full width */
    .news-card.featured {
        grid-column: 1 / -1;
        flex-direction: row;
        border-left: 6px solid var(--primary);
    }
    .news-card.featured .news-image {
        width: 40%;
        height: auto;
        min-height: 240px;
        flex-shrink: 0;
    }
    .news-card.featured .news-content {
        padding: 28px 32px;
    }
    .news-card.featured .news-title {
        font-size: 1.5rem;
    }
    .news-card.featured .news-summary {
        -webkit-line-clamp: 4;
    }

    /* Wide card - takes 2 cols */
    .news-card.wide {
        grid-column: 1 / -1;
        flex-direction: row;
        border-left: 5px solid var(--primary);
    }
    .news-card.wide .news-image {
        width: 35%;
        height: auto;
        min-height: 200px;
        flex-shrink: 0;
    }
    .news-card.wide .news-content {
        padding: 24px 28px;
    }

    /* ===== Image ===== */
    .news-image {
        position: relative;
        width: 100%;
        height: 200px;
        background: #e9edf2;
        overflow: hidden;
        flex-shrink: 0;
    }
    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    .news-card:hover .news-image img {
        transform: scale(1.03);
    }
    .news-image .image-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    }
    .news-image.placeholder{
        position: relative;
        display:flex;
        align-items:center;
        justify-content:center;
        min-height:180px;
        overflow:hidden;
    
        background:
            radial-gradient(circle at top right, rgba(29,170,97,.10), transparent 45%),
            radial-gradient(circle at bottom left, rgba(33,150,243,.08), transparent 45%),
            #ffffff;
    }
    
    .news-image.placeholder::before{
        content:"";
        position:absolute;
        inset:0;
        background:
            repeating-linear-gradient(
                -45deg,
                transparent,
                transparent 16px,
                rgba(0,0,0,.015) 16px,
                rgba(0,0,0,.015) 32px
            );
    }
    
    .placeholder-content{
        position:relative;
        z-index:2;
        text-align:center;
    }
    
    .placeholder-logo{
        width:64px;
        height:64px;
        border-radius:50%;
        background:linear-gradient(135deg,#1DAA61,#168a4e);
        color:#fff;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:28px;
        font-weight:700;
        margin:0 auto 16px;
        box-shadow:0 10px 25px rgba(29,170,97,.18);
    }
    
    .placeholder-source{
        font-size:18px;
        font-weight:700;
        color:#132238;
        margin-bottom:8px;
    }
    
    .placeholder-label{
        display:inline-block;
        padding:5px 14px;
        border-radius:30px;
        background:#eef6f1;
        color:#1DAA61;
        font-size:12px;
        font-weight:600;
        letter-spacing:1px;
    }

    /* ===== Content ===== */
    .news-content {
        padding: 20px 22px 22px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .news-meta-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        font-size: 0.78rem;
        color: var(--text-light);
    }
    .news-source {
        font-weight: 600;
        color: var(--primary);
        background: var(--primary-light);
        padding: 2px 12px;
        border-radius: 50px;
        font-size: 0.75rem;
    }
    .news-date {
        color: var(--text-light);
    }
    .news-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin: 0 0 10px 0;
        line-height: 1.4;
    }
    .news-title a {
        color: var(--text-dark);
        text-decoration: none;
        transition: color 0.2s;
    }
    .news-title a:hover {
        color: var(--primary);
    }
    .news-summary {
        font-size: 0.92rem;
        line-height: 1.6;
        color: var(--text-muted);
        margin: 0 0 16px 0;
        flex: 1;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .news-footer {
        border-top: 1px solid #eef2f6;
        padding-top: 14px;
        margin-top: auto;
    }
    .read-more {
        color: var(--primary);
        font-weight: 600;
        font-size: 0.85rem;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: gap 0.2s;
    }
    .read-more:hover {
        gap: 10px;
        color: var(--primary-dark);
    }
    .read-more .arrow {
        transition: transform 0.2s;
    }
    .read-more:hover .arrow {
        transform: translateX(4px);
    }

    /* ===== Loader ===== */
    .loader {
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 40px 0 20px;
        gap: 12px;
        color: var(--text-light);
        font-size: 0.95rem;
    }
    .spinner {
        width: 36px;
        height: 36px;
        border: 4px solid var(--primary-light);
        border-top: 4px solid var(--primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    /* ===== End Message ===== */
    .end-message {
        display: none;
        text-align: center;
        padding: 30px 0 10px;
        color: var(--text-light);
        font-size: 0.95rem;
        font-weight: 500;
    }
    .end-message span {
        background: #fff;
        padding: 10px 28px;
        border-radius: 50px;
        box-shadow: var(--shadow);
        display: inline-block;
    }

    /* ===== No News ===== */
    .no-news {
        grid-column: 1 / -1;
        text-align: center;
        padding: 60px 20px;
        background: #fff;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    .no-news span {
        font-size: 3rem;
        display: block;
        margin-bottom: 12px;
    }
    .no-news p {
        font-size: 1.1rem;
        color: var(--text-muted);
        margin: 0;
    }
    .no-news small {
        color: var(--text-light);
    }

    /* ===== Responsive ===== */
    @media (max-width: 1024px) {
        .news-feed {
            grid-template-columns: 1fr 1fr;
        }
        .news-card.featured,
        .news-card.wide {
            grid-column: 1 / -1;
            flex-direction: column;
        }
        .news-card.featured .news-image,
        .news-card.wide .news-image {
            width: 100%;
            height: 220px;
        }
        .news-card.featured .news-content,
        .news-card.wide .news-content {
            padding: 20px;
        }
        .news-card.featured .news-title {
            font-size: 1.3rem;
        }
    }

    @media (max-width: 768px) {
        .news-feed {
            grid-template-columns: 1fr;
            gap: 18px;
        }
        .news-header {
            flex-direction: column;
            align-items: flex-start;
        }
        .page-title {
            font-size: 1.8rem;
        }
        .news-card.featured .news-title {
            font-size: 1.2rem;
        }
        .news-card.wide .news-image {
            height: 180px;
        }
        .news-image {
            height: 170px;
        }
        .stat-badge {
            font-size: 0.8rem;
            padding: 6px 16px;
        }
    }

    @media (max-width: 480px) {
        .container {
            padding: 0 16px;
        }
        .news-page {
            padding: 24px 0 40px;
        }
        .news-content {
            padding: 16px;
        }
        .news-title {
            font-size: 1rem;
        }
    }