@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

* {
    margin: 0;
    padding: 0;
    font-family: Poppins;
}
/* =========================
   HERO SECTION
   ========================= */
#news-page-hero {
    background-image: url(/hms/assets/news/news-page.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-height: 100dvh;
    position: relative;
    overflow: hidden;
    top: -70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 640px) {
    #news-page-hero {
        max-height: none;
    }
}

/* Blur overlay */
#news-page-hero .overlay-blur {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(1px);
    z-index: 1;
}

/* Gradient overlay dari bawah */
#news-page-hero .overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );
    z-index: 2;
}

/* Konten utama */
#news-page-hero .content-overlay {
    position: relative;
    z-index: 3;
    color: black;
    min-height: 100%; /* ikut section */
    height: auto;
    padding: 2rem 3rem; /* jarak dalam konten */
}

@media (max-width: 640px) {
    #news-page-hero .content-overlay {
        padding: 2rem 0rem; /* jarak dalam konten */
    }
}

/* Judul */
#news-page-hero .title-h3 {
    color: #fff;
    font-size: 3rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

#news-page-hero .title-h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: left;
}

#news-page-hero .title-h3:hover::after {
    transform: scaleX(1);
}

/* Search widget */
.news-search {
    margin: 2rem auto;
    width: 40%;
    height: 45px;
}

.news-search .input-group-text svg {
    vertical-align: middle;
}

/* Tablet */
@media (max-width: 992px) {
    .news-search {
        width: 60%;
    }
}

/* Mobile fix (≤768px) */
@media (max-width: 768px) {
    .news-search {
        width: 100%;
        max-width: 340px;
        height: auto;
        flex-direction: row;
        justify-content: center;
        margin: 1rem auto;
    }

    .news-search .input-group-text {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border: 1px solid #ccc;
        background-color: #fff;
    }

    .news-search input {
        border: 1px solid #ccc;
        border-left: none;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .d-grid.d-lg-none button {
        width: 100%;
        border-radius: 0.5rem;
        font-weight: 600;
        padding: 0.75rem;
    }
}

/* News hero list */
#news-page-hero .news-hero-list {
    position: relative;
    margin-top: 3rem;
    overflow-x: hidden;
    padding: 0 1rem;
}

.news-card-sm {
    height: 42%;
}

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

.card-img-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

/* Responsif */
@media (max-width: 576px) {
    .news-card {
        height: 240px;
    }

    .news-card-sm {
        height: 180px;
    }
}

/* Card style tambahan */
.card-left-list {
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

#section-latest-news .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#section-latest-news .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
