html {
    scroll-behavior: smooth;
}

/* General Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#article {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Search Input */
.search {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;
}

#search-input:focus {
    border-color: #3498db;
    outline: none;
}

/* Filters Section */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-checkbox {
    font-size: 1.1rem;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: #333 solid 2px;
    padding: 5px 10px;
    border-radius: 5px;
}

.filter-checkbox input[type="checkbox"] {
    width: 25px;
    height: 25px;
    margin-right: 10px;
    cursor: pointer;
    appearance: none;
    /* Remove default checkbox styling */
    border: 2px solid #3498db;
    /* Border color */
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Checkbox checked state */
.filter-checkbox input[type="checkbox"]:checked {
    background-color: #3498db;
    /* Background color when checked */
    border-color: #3498db;
    /* Change border color when checked */
}

/* Articles List */
#articles-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 equal columns */
    gap: 20px 10px;
}

.article-link {
    display: block;
    padding: 10px 20px;
    background-color: #fff;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.article-link:hover {
    background-color: #f8f8f8;
}

.article-link:active {
    background-color: #e6e6e6;
}

/* Hover Effect for Icons */
.article-link::before {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #3498db;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-link:hover::before {
    opacity: 1;
}

@media (max-width: 900px) {
    .filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin: 20px auto;
        max-width: 80%;
    }
    .filters > :nth-child(5) {
        width: 100%;  /* Makes the 5th child span the full width */
        grid-column: span 2;  /* This makes it take up both columns in the grid */
    }

    #articles-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .filters {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .filter-checkbox {
        width: 100%;
    }

    #articles-list {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    #search-input {
        font-size: 1.1rem;
        padding: 12px;
    }

    .filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-checkbox {
        font-size: 1rem;
    }

    #articles-list {
        gap: 20px;
    }

    .article-link {
        font-size: 1.1rem;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    #search-input {
        font-size: 1rem;
        padding: 10px;
    }

    .article-link {
        font-size: 1rem;
        padding: 15px;
    }
}