.topic-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.topic-header h1 {
    width: max-content;
    font-size: 1rem;
    font-weight: bold;
    color: rgb(45, 45, 45);
    margin-bottom: 20px;
    font-family: "Poppins", sans-serif;
    border-bottom: 1px solid #b4b4b4;
}

.topic-articles {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

.article-item {
    width: 98%;
    height: 150px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0 auto;
    padding-bottom: 20px;
    border-bottom: 1px solid #b4b4b4;
    justify-content: space-between;
    
}

.article-item img {
    width: 180px;
    height: 130px;
    object-fit: cover;
    border-radius: 20px;
}

.article-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-content p {
    font-family: "poppins", sans-serif;
    font-size: 0.8rem;
    color: rgb(0, 0, 0);
}

.article-tag {
    display: flex;
    flex-direction: column;
}

.article-tag a {
    text-decoration: none;
}

.article-tag h2 {
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(41, 115, 188);
    text-decoration: none;
    font-family: "Poppins", sans-serif;
}

.article-tag p {
    font-size: 0.8rem;
    color: rgb(124, 124, 124);
}

/* berita serupa */

.topic-section {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    border-bottom: 3px solid #dc3545; /* Red line similar to the image */
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block; /* To make the border only under the text */
}

.section-header h2 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    color: #333;
    text-transform: uppercase;
}

.card-container {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Enable horizontal scrolling if cards exceed container width */
    padding-bottom: 10px; /* Space for scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.card-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.card {
    min-width: 300px; /* Minimum width for each card */
    flex: 1; /* Allow cards to grow and shrink */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    position: relative; /* For the "Kriminal" tag positioning */
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.card-content {
    padding: 15px;
}

.card-tag {
    background-color: rgb(41, 115, 188); /* Red tag */
    color: white;
    font-family: "Poppins", sans-serif;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    left: 10px;
}

.card-title {
    font-family: "Poppins", sans-serif;
    font-size: 0.8em;
    font-weight: 700;
    color: #333;
    margin-top: 10px;
    line-height: 1.4;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-link:hover .card-title {
    color: #007bff; /* Blue on hover */
}


@media (max-width: 900px) {
    .topic-content {
        width: 95%;
    }
    .topic-header h1 {
        font-size: 1rem;
    }
    .article-item {
        height: 105px;
    }

    .article-item img {
        width: 100px;
        height: 80px;
    }

    .article-content > p {
        display: none;
    }

    .article-tag h2 {
        font-size: 0.8rem;
    }
    
    /* berita lainnya */
    .section-header{
        margin-left: 20px;
    }
    .card-container {
        margin-left: 20px;
    }
}