/* =========================
   SECTION
========================= */
.news-section {
    background: #1f2a30;
    padding: 70px 30px;
}

/* =========================
   LAYOUT
========================= */
.news-container {
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* =========================
   SIDEBAR
========================= */
.news-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    height: fit-content;
}

.news-sidebar h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.news-sidebar ul {
    list-style: none;
}

.news-sidebar li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.news-sidebar li.active {
    color: #b22222;
    font-weight: 600;
}

.news-sidebar-btn {
    display: block;
    margin-top: 25px;
    padding: 12px;
    text-align: center;
    background: #b22222;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

/* =========================
   CONTENT GRID
========================= */
.news-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* =========================
   CARD
========================= */
.news-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* =========================
   IMAGE (SAFE FOR ANY SIZE)
========================= */
.news-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* image hover overlay */
.news-card-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(178, 34, 34, 0.8);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.news-card-img:hover::after {
    opacity: 1;
}

/* =========================
   BODY
========================= */
.news-card-body {
    padding: 22px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* text hover background */
.news-card-body::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #b22222;
    transition: width 0.4s ease;
    z-index: 0;
}

.news-card-body:hover::before {
    width: 100%;
}

.news-card-body * {
    position: relative;
    z-index: 1;
}

.news-card-body h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-card-body p {
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* =========================
   BUTTON (FIXED DESIGN)
========================= */
.news-btn {
    align-self: flex-start;       /* ⬅ prevents full width */
    display: inline-flex;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #b22222;
    color: #b22222;
    background: transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: auto;             /* stays bottom aligned */
}

.news-card-body:hover h4,
.news-card-body:hover p {
    color: #fff;
}

.news-card-body:hover .news-btn {
    background: #fff;
    color: #b22222;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .news-container {
        grid-template-columns: 1fr;
    }
}
