/* top search */
#search_wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

#search_wrapper h1 {
    font-size: 64px;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
}

#search_wrapper h1 {
    font-size: 36px
}

/* generic */
#page-content section {
    padding: 16px;
    display: flex;
    gap: 24px;
    flex-direction: column;
}

#page-content section h2 {
    color: white;
    text-align: center;
    font-size: 38px;
    font-style: normal;
    font-weight: 600;
}

/* categories */
#categories_container {
    background-color: black;
}

#categories_list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.category {
    border-radius: 4px;
    padding: 16px;
    background: linear-gradient(166.24deg, #27293D 5.82%, #1D1C29 93.28%);
}

.category a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: 100%;
    justify-content: space-around;
}

.category img {
    width: 80px;
}

.category h3 {
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; /* 120% */
    font-family: var(--font-family-condensed);
    text-align: center;
}

/* general article list */
.article_item a {
    text-decoration: none;
    font-size: 20px;
}

.article_item .article_type {
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1.28px;
    opacity: 0.6;
}

/* featured */
.feature {
    background-color: #0C0D0D;
}

.feature img {
    aspect-ratio: 16 / 9;
    vertical-align: middle;
    object-fit: cover;
}

/* latest */
#latest_container {
    background-color: black;
}

#feature_container,
#latest_article_list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#featured_article_list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.latest {
    background-color: #0C0D0D;
}

.latest img {
    aspect-ratio: 16 / 9;
    vertical-align: middle;
    object-fit: cover;
}

.article_item {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* pagination */
#pagination {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

#pagination a {
    padding: 0px 8px;
    text-decoration: none;
    align-items: center;
    display: flex;
}

#pagination .active {
    border-bottom: 1px solid var(--brand-colour, #ECE81A);
}

@media screen and (min-width: 550px){
    #page-content section h2 {
        font-size: 48px;
    }

    #categories_list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 600px) {
    #latest_article_list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 750px) {
    #featured_article_list {
        grid-template-columns: 1fr 1fr 1fr;
    }

    #latest_article_list {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 900px) {
    /* generic */
    #page-content section {
        padding: 32px 96px;
        display: flex;
        gap: 16px;
        flex-direction: column;
    }

    #categories_list,
    #featured_article_list,
    #latest_article_list {
        width: 100%;
        max-width: 1360px;
        margin: 0 auto;
    }

    /* search */
    #search_wrapper h1 {
        font-size: 48px;
    }

    #search_wrapper p {
        font-size: 21px;
        font-style: normal;
        font-weight: 500;
        line-height: 30px; /* 142.857% */
    }

    /* categories */
    #categories_list {
        grid-template-columns: 1fr 1fr 1fr;
    }

    /* featured articles */
    .article_item {
        height: 203px;
    }

    .feature img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    /* latest articles */
    #latest_article_list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
    }

    .latest img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}

@media screen and (min-width: 1280px) {
    #categories_list,
    #featured_article_list,
    #latest_article_list {
        max-width: 1360px;
        margin: 0 auto;
    }

    /* search */
    section#search_banner {
        padding: 32px 0;
        gap: 16px;
    }

    /* search */
    #search_wrapper h1 {
        font-size: 64px;
    }

    /* featured */
    .related_article_article_title a {
        font-size: 24px;
        line-height: 32px;
        overflow: hidden;
        word-break: break-word;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        display: -webkit-box;
    }

    /* latest */
    .latest .related_article_article_title a {
        font-size: 20px;
        line-height: 28px;
        -webkit-line-clamp: 4;
    }

    /* categories */
    .category h3 {
        font-size: 20px;
        line-height: 24px;
    }
}

@media screen and (min-width: 1520px) {
    /* category */
    #categories_list {
        display: flex;
        justify-content: space-between;
    }

    .category {
        width: 204px;
        aspect-ratio: 1 / 1;
        padding: 16px;
        text-align: center;;
    }
    .category img {
        width: 120px;
    }
}