.frontpage-base-body {
    @media (min-width: 766px) {
        #footerwrapper {
            width: auto;
        }

        #footer {
            width: inherit;
        }
    }

    #main.container.index_main {
        @media (min-width: 768px) {
            width: 750px;
        }
        @media (min-width: 992px) {
            width: 970px;
        }
        @media (min-width: 1200px) {
            width: 1170px;
        }

        .row {
            width: auto;
        }
    }
}

#frontpage-top-hero-container {
    background: var(--napha-teal-200);
    padding: 60px 40px;
    color: var(--napha-black-600);

    @media (max-width: 767px) {
        padding: 20px 0;
        margin-top: 70px;
    }

    .hero-title-container {
        @media (min-width: 1200px) {
            max-width: 730px;
        }

        .hero-title {
            font-size: 38px;
            font-weight: 500;
            color: var(--napha-black-600);
            line-height: 120%;
            margin-top: 0;
            margin-bottom: 24px;

            @media (max-width: 767px) {
                font-size: 34px;
            }
        }
    }

    .activity-banner-wrapper .activity-banner {
        margin-bottom: 20px;
    }

    .hero-label {
        font-size: 17px;
        font-weight: 600;
        color: var(--napha-black-600);
        margin-bottom: 6px;
    }

    /* Flexbox on row avoids Bootstrap 3 float-wrapping/height snag issues */

    .hero-grid-row {
        display: flex;
        flex-wrap: wrap;

        /* Reset Bootstrap 3 micro-clearfix pseudo elements when using flex */

        &::before,
        &::after {
            display: none;
        }
    }

    .hero-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        margin-bottom: 0;
        border-bottom: 1px solid var(--napha-teal-300);
        color: var(--napha-black-600);
        font-size: 17px;
        font-weight: 400;
        text-decoration: none;
        transition: color 0.2s ease, border-color 0.2s ease;

        /* Embedded SVG arrow */

        &::after {
            content: "";
            display: inline-block;
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            margin-left: 12px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.7071 8.70711C14.0976 8.31658 14.0976 7.68342 13.7071 7.29289L7.34315 0.928932C6.95262 0.538407 6.31946 0.538407 5.92893 0.928932C5.53841 1.31946 5.53841 1.95262 5.92893 2.34315L11.5858 8L5.92893 13.6569C5.53841 14.0474 5.53841 14.6805 5.92893 15.0711C6.31946 15.4616 6.95262 15.4616 7.34315 15.0711L13.7071 8.70711ZM0 8L6.68527e-08 9L13 9L13 8L13 7L-6.68527e-08 7L0 8Z' fill='%23F15A22'/%3E%3C/svg%3E");
            transition: transform 0.2s ease;
        }

        &:hover,
        &:focus {
            text-decoration: none;
            border-bottom-color: var(--napha-black-600);
        }
    }
}

html #main.container.index_main {
    margin-top: 0;
    padding-top: 0;
}

.frontpage-section {
    padding-bottom: 40px;
    padding-top: 55px;

    @media (min-width: 768px) {
        padding-bottom: 40px;
    }

    &#frontpage-news-articles-container {
        background: var(--napha-black-50);
    }

    .row {
        display: block;
    }

    .row#frontpage-news-articles-row, .row#frontpage-topic-pages-row {
        padding-top: 25px;

        @media (min-width: 768px) {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
        }

        .frontpage_news_col {
            display: flex;
            margin-bottom: 30px;
        }

        .frontpage_topic_pages_col {
            display: flex;
            margin-bottom: 25px;

            @media (min-width: 768px) and (max-width: 1199px) {
                padding-right: 6px;
                padding-left: 6px;
            }

            @media (max-width: 1199px) {
                margin-bottom: 12px;
            }

        }

        .article_element, .topic_page_element {
            width: 100%;
            display: flex;
            flex-direction: column;
        }

        .is-hidden {
            display: none;
        }
    }

    .frontpage-section-title-row {
        .frontpage-section-title {
            font-weight: 600;
            font-size: 24px;
            line-height: 110%;
            letter-spacing: 0.15372px;
            color: var(--napha-black-600);
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--napha-black-200);
            margin: 0;

            @media (max-width: 767px) {
                flex-direction: column;
                align-items: flex-start;
            }

            .title-link {
                display: inline-flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 0;
                color: var(--napha-black-600);
                font-size: 17px;
                font-weight: 400;
                text-decoration: none;
                transition: color 0.2s ease, border-color 0.2s ease;

                .title-link__text {
                    border-bottom: 1px solid transparent;
                    transition: border-color 0.2s ease;
                }

                /* Embedded SVG arrow */

                &::after {
                    content: "";
                    display: inline-block;
                    width: 16px;
                    height: 16px;
                    flex-shrink: 0;
                    margin-left: 12px;
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: contain;
                    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.7071 8.70711C14.0976 8.31658 14.0976 7.68342 13.7071 7.29289L7.34315 0.928932C6.95262 0.538407 6.31946 0.538407 5.92893 0.928932C5.53841 1.31946 5.53841 1.95262 5.92893 2.34315L11.5858 8L5.92893 13.6569C5.53841 14.0474 5.53841 14.6805 5.92893 15.0711C6.31946 15.4616 6.95262 15.4616 7.34315 15.0711L13.7071 8.70711ZM0 8L6.68527e-08 9L13 9L13 8L13 7L-6.68527e-08 7L0 8Z' fill='%23F15A22'/%3E%3C/svg%3E");
                    transition: transform 0.2s ease;
                }

                &:hover,
                &:focus {
                    text-decoration: none;

                    .title-link__text {
                        border-bottom-color: var(--napha-black-600);
                    }
                }
            }
        }
    }

    .frontpage-section-pagination-row {
        .articles-progress-wrapper {
            width: 300px;
            margin: 0 auto 20px;
        }

        #articles-progress-text {
            margin-bottom: 8px;
            font-size: 14px;
            font-weight: 400;
            color: var(--napha-black-500);
            text-align: center;
            /*padding-bottom: 6px;*/
        }

        .articles-progress {
            width: 300px;
            height: 2px;
            background-color: #DBDADA;
        }

        #articles-progress-bar {
            width: 0;
            height: 100%;
            background-color: #000;
            transition: width 0.2s ease;
        }

        .text-center {
            display: flex;
            justify-content: center;
        }

        .load-more-articles-btn, .show-all-btn, .show-less-articles-btn {
            display: flex;
            padding: 10px 20px;
            font-weight: 400;
            font-size: 17px;
            line-height: 140%;
            letter-spacing: 0.15px;
            background: none;
            color: var(--napha-black-600);
            text-decoration: none;
            gap: 15px;
            border-radius: 8px;

            &:hover, &:focus {
                background: var(--napha-orange-200);
                color: var(--napha-black-600);
                text-decoration: none;
            }

            img {
                margin-bottom: 0;
            }
        }

        #show-less-articles-wrapper {
            display: flex;
            justify-content: center;
            margin-bottom: 14px;

            .show-less-articles-btn {
                padding: 4px 8px;
                font-size: 14px;
                gap: 10px;

                &.is-hidden {
                    display: none;
                }

                img {
                    transform: scaleY(-1);
                    width: 18px;
                }
            }
        }

        .show-all-btn {
            border: 1px solid var(--napha-black-400);

            img {
                width: 14px;
            }
        }
    }
}

#frontpage-news-articles-container {
    background: var(--napha-black-50);
}

#frontpage-topic-pages-container {
    background: var(--napha-white);

    .temaside-link-box {
        background: var(--napha-orange-200);
        border-radius: 10px;
    }

    .temaside-link-box a {
        padding: 20px;
        letter-spacing: 0.15px;
        color: var(--napha-black-600);
        display: flex;
        justify-content: space-between;
        text-decoration: none;
        height: 100%;

        .temaside-link-box-left {
            align-items: center;
            display: flex;
        }

        h3 {
            color: var(--napha-black-600);
            font-size: 18px;
            line-height: 140%;
            font-weight: 500;
            margin: 0;
        }

        img {
            width: 14px;
        }

        &:hover, &:active {
            background: var(--napha-orange-300);
            border-radius: 10px;
            text-decoration: underline;
            text-decoration-thickness: 1.5px;
        }
    }
}