* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

body {
    height: 100vh; /* Adjust this based on your content */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: rgb(111, 111, 248);
    height: 5rem;
    color: whitesmoke;
}

.name {
    font-size: xx-large;
    font-weight: bolder;
    font-family: cursive;
}

.searchbar {
    position: relative;
}

.searchinput {
    padding: 10px 40px 10px 10px;
    border-radius: 1rem;
    border: none;
    width: 15rem;
    font-size: 12px;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 30%;
    color: #555; 
    font-size: 16px;
    cursor: pointer;
}

.filters {
    list-style: none;
    display: flex;
    gap: 5px;
    margin-right: 10px;
    padding: 10px;
}

.filter1, .filter2 {
    flex: 1;
    border: none;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    border-radius: 8px;
    background-color: rgb(223, 221, 221);
    text-align: center;
}

.news--container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.news--card {
    margin: 10px;
    background-color: white;
    box-shadow: 0px 0px 8px rgb(0, 0, 0, 0.3);
    width: 350px;
    position: relative;
    border-radius: 8px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.news--source {
    position: absolute;
    background-color: #e3dfdf;
    border-radius: 10px;
    padding: 2px 10px;
    right: 10px;
    top: 8px;
    max-width: 280px;
    opacity: 0.8;
}

.news--image {
    width: 100%;
    height: 300px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    object-fit: cover;
}

.news--content {
    padding: 1rem;
}

.news--info {
    font-size: small;
    color: #555;
}

.news--desc {
    text-align: justify;
    margin-top: 10px;
}

/* Responsive Adjustments */
@media (max-width: 750px) {
    .navbar {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 9rem;
        padding: 0 10px;
    }

    .name {
        font-size: 30px;
    }

    .searchbar {
        width: 50%;
        padding: 3px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .searchinput {
        width: 80%;
        font-size: 10px;
    }

    .search-icon {
        font-size: 14px;
        top: 50%;
        transform: translateY(-50%);
        right: 50px;
    }

    .filters {
        flex-direction: row;
        gap: 5px;
    }

    .filter1, .filter2 {
        font-size: 10px;
        width: 92px;
    }

    .news--card {
        width: 280px;
        margin-top: 20px;
    }

    .news--image {
        height: 200px;
        object-fit: cover;
    }

    .news--heading {
        font-size: 1rem;
    }

    .news--info {
        font-size: 0.8rem;
    }

    .news--desc {
        font-size: 0.9rem;
    }
}
