/* ===================== NEWS SECTION ===================== */
#news {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 3rem 1.5rem;
    font-family: 'Inter', sans-serif;
}

.news-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.news-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ===================== NEWS GRID ===================== */
.news-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

/* ===================== NEWS CARD ===================== */
/* ===================== NEWS CARD ===================== */
.news-card {
    display: flex;
    flex-direction: column;
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    transform: translateY(20px);
    opacity: 1;
    max-height: 400px;
}

.news-card.show {
    transform: translateY(0);
    opacity: 1;
}

.news-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid #334155;
}

.news-card-content {
    padding: 0.75rem 1rem 0.5rem 1rem; /* reduced top and bottom padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.news-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.3rem 0; /* remove top margin, reduce bottom margin */
    line-height: 1.25;
}

.news-body {
    font-size: 0.88rem;
    line-height: 1.4;
    color: #cbd5e1;
    max-height: 130px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem; /* reduced spacing */
}

.news-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5rem;
    background: linear-gradient(to top, #1e293b, transparent);
    pointer-events: none;
}

.news-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem; /* slightly smaller */
    padding-top: 0.2rem;
    padding-bottom: 0.5rem; /* reduced bottom padding for tighter card */
}

.news-card-footer time {
    font-size: 0.72rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.news-card-footer a.read-more {
    all: unset;
    display: inline-block;
    cursor: pointer;
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease;
}

.news-card-footer a.read-more:hover {
    color: #22d3ee;
    background: rgba(56, 189, 248, 0.1);
}

/* ===================== MEDIA QUERIES ===================== */
@media (max-width: 768px) {
    .news-card img {
        height: 120px;
    }

    .news-card-content {
        padding: 0.5rem 0.75rem 0.4rem 0.75rem; /* reduced top/bottom padding */
    }

    .news-card h3 {
        font-size: 1rem;
        margin: 0 0 0.25rem 0;
        line-height: 1.2;
    }

    .news-body {
        font-size: 0.78rem;
        max-height: 100px;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .news-body::after {
        height: 2rem;
    }

    .news-card-footer {
        gap: 0.4rem;
        padding-top: 0.15rem;
        padding-bottom: 0.4rem;
    }

    .news-card-footer time {
        font-size: 0.68rem;
    }

    .news-card-footer a.read-more {
        font-size: 0.7rem;
        padding: 0.12rem 0.25rem;
    }
}

/* ===================== MEDIA QUERIES ===================== */
@media (max-width: 768px) {
    #news {
        padding: 2rem 1rem;
    }

    .news-feed {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .news-card img {
        height: 120px;
    }

    .news-card-content {
        padding: 0.75rem;
    }

    .news-card h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }

    .news-body {
        font-size: 0.78rem;
        max-height: 100px;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .news-body::after {
        height: 2rem;
    }

    .news-card-footer {
        gap: 0.5rem;
        padding-top: 0.2rem;
    }

    .news-card-footer time {
        font-size: 0.68rem;
    }

    .news-card-footer a.read-more {
        font-size: 0.7rem;
        padding: 0.12rem 0.25rem;
    }
}

/* ===================== NEWS PAGINATION ===================== */
.news-pagination {
    text-align: center;
    margin-top: 2rem;
}

.news-pagination button {
    background: #1e293b;
    color: #cbd5e1;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.news-pagination button:hover {
    background: #38bdf8;
    color: #1e293b;
}

.news-pagination button.active {
    background: #22d3ee;
    color: #0f172a;
}