/* Featured news */

.nintenduo-home-featured-news {
    margin-top: 40px !important;
    padding-bottom: 12px;
}

.nintenduo-home-featured-news li {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    /*box-shadow: 0 4px 8px 0 red;*/
    border-radius: 8px;
}

.nintenduo-home-featured-news h2 {
    height: 130px;
    font-size: 22px;
    margin: 16px 26px 20px 24px !important;
}

.nintenduo-home-featured-news h2 a {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* number of lines to show */
    line-clamp: 5;
    -webkit-box-orient: vertical;
}

.nintenduo-home-featured-news-root-group {
    position: relative;
    height: 100%;
}

.nintenduo-home-featured-news-root-group .wp-block-group {
    position: absolute;
    bottom: 0;
    z-index: 1;
}

.nintenduo-home-featured-news-root-group figure {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.nintenduo-home-featured-news-root-group figure img {
    width: 264px !important;
    height: 474px !important;
    object-fit: cover;
    border-radius: 8px;
}

/* Featured posts - First row (desktop) */

.nintenduo-home-featured-posts {
    margin-top: 36px;
}

.nintenduo-home-featured-posts .wp-block-heading {
    font-size: 28px;
    margin-bottom: 24px;
    margin-top: 24px;
}

.nintenduo-home-featured-posts-first-row {
    text-align: center;
}

.nintenduo-home-featured-posts-first-row li > div > figure {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.nintenduo-home-featured-posts-first-row h2 a {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* number of lines to show */
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Featured posts - Second row (desktop) */

.nintenduo-home-featured-posts-second-row {
    text-align: center;
}

.nintenduo-home-featured-posts-second-row li > div > div > figure {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.nintenduo-home-featured-posts-second-row h2 a {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* number of lines to show */
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.nintenduo-home-featured-posts-second-row .wp-block-columns {
    margin-bottom: 0;
}

/* Featured posts - Tablet and mobile row */
.nintenduo-home-featured-posts-mobile-tablet-row {
    display: none;
}

.nintenduo-home-featured-posts-mobile-tablet-row li > div > figure {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}


/* Latests news */

.nintenduo-home-latest-news > div {
    gap: 0;
}

.nintenduo-home-latest-news .wp-block-heading {
    font-size: 28px;
    margin-bottom: 24px;
}

.nintenduo-home-latest-news .wp-block-post-title {
    margin-top: -3px;
    font-size: 22px;
}

.nintenduo-home-latest-news .wp-block-post-excerpt {
    font-size: 18px;
}

.nintenduo-home-latest-news li > div > div:last-child {
    display: flex;
    flex-direction: column;
}

.nintenduo-home-latest-news li > div > div:last-child > div:last-child {
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
}

.nintenduo-home-latest-news .wp-block-nintenduo-category-tag-block {
    position: absolute;
    z-index: 1;
}

.nintenduo-home-latest-news-category-tag {
    top: 16px;
    left: -16px;
}

.nintenduo-home-latest-news .wp-block-post-template li hr {
    margin-top: 24px;
    margin-bottom: 24px;
}

.nintenduo-home-latest-news .wp-block-post-template li:last-child hr {
    display: none;
}

.nintenduo-home-latest-news .wp-block-post > div {
    gap: 24px;
}

.nintenduo-home-latest-news .wp-block-post > div > div:first-child {
    flex-basis: 360px !important;
    flex-shrink: 0;
}

.nintenduo-home-latest-news li figure img {
    vertical-align: middle;
    /*display: block;*/
    /*max-width: fit-content;*/
}

.nintenduo-home-latest-news .wp-block-query-pagination {
    margin-top: 40px;
}

.nintenduo-home-latest-news .wp-block-query-pagination-numbers {
    margin-bottom: 0;
}

/* Only on desktop */
@media (min-width: 1151px) {
    .nintenduo-home-featured-news-root-group:hover .wp-block-group {
        background-color: #ff0f0f !important;
    }

    .nintenduo-home-featured-posts-first-row h2 a:hover {
        color: #ff0f0f !important;
    }

    .nintenduo-home-featured-posts-second-row h2 a:hover {
        color: #ff0f0f !important;
    }

    .nintenduo-home-latest-news h2 a:hover {
        color: #ff0f0f !important;
    }

    .nintenduo-home-latests-news-columns {
        flex-wrap: nowrap !important;
        gap: 24px;
    }

    .nintenduo-home-latests-news-columns > .wp-block-column:first-child {
        flex-basis: 0 !important;
        flex-grow: 1;
    }

    .nintenduo-home-latests-news-columns > .wp-block-column:last-child {
        flex-basis: 360px !important;
        flex-grow: 0;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1150px) {
    .nintenduo-home-featured-news h2 a {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4; /* number of lines to show */
        line-clamp: 4;
        -webkit-box-orient: vertical;
    }

    .nintenduo-home-featured-news {
        overflow-x: scroll;
        margin-top: 32px !important;
    }

    .nintenduo-home-featured-news .wp-block-query {
        width: 932px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .nintenduo-home-featured-news ul {
        display: flex;
        gap: 12px !important;
    }

    .nintenduo-home-featured-news li {
        width: 224px;
    }

    .nintenduo-home-featured-news h2 {
        height: 88px;
        white-space: normal;
        font-size: 18px;
        margin: 9px 16px 19px 16px !important;
    }

    .nintenduo-home-featured-news-root-group figure img {
        width: 224px !important;
        height: 352px !important;
        max-width: none !important;
    }

    .nintenduo-home-featured-posts {
        margin-top: 20px;
    }

    .nintenduo-home-featured-posts .wp-block-heading {
        font-size: 28px;
        margin-bottom: 17px;
        margin-top: 17px;
    }

    .nintenduo-home-featured-posts-first-row {
        display: none;
    }

    .nintenduo-home-featured-posts-second-row {
        display: none;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row {
        display: block;
        text-align: center;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row > .wp-block-group {
        overflow-x: scroll;
        padding-left: 16px;
        padding-right: 16px;
        height: 295px;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row .wp-block-query {
        width: 1568px;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row ul {
        display: flex;
        gap: 12px !important;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row h2 a {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* number of lines to show */
        line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row li:last-child {
        margin-right: 16px;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row li > div > figure img {
        width: 304px !important;
        height: 171px !important;
        max-width: none !important;
    }

    .nintenduo-home-latest-news {
        margin-top: 32px !important;
        margin-left: 16px;
        margin-right: 16px;
    }

    .nintenduo-home-latest-news .wp-block-heading {
        font-size: 28px;
        margin-bottom: 17px;
    }

    .nintenduo-home-latest-news .wp-block-post-title {
        font-size: 18px;
    }

    .nintenduo-home-latest-news .wp-block-post-excerpt {
        display: none;
    }

    .nintenduo-home-latests-news-columns {
        flex-wrap: nowrap !important;
        gap: 17px;
    }

    .nintenduo-home-latests-news-columns > .wp-block-column:first-child {
        flex-basis: 0 !important;
        flex-grow: 1;
    }

    .nintenduo-home-latests-news-columns > .wp-block-column:last-child {
        flex-basis: 234px !important;
        flex-grow: 0;
    }

    /* Post info row */
    .nintenduo-home-latest-news .wp-block-post > .wp-block-columns {
        gap: 16px;
    }

    /* Time row */
    .nintenduo-home-latest-news .wp-block-post > .wp-block-columns > .wp-block-column:last-child > div:last-child {
        gap: 6px;
    }

    .nintenduo-home-latest-news .wp-block-post > div > div:first-child {
        flex-basis: 234px !important;
        flex-shrink: 0;
    }

    .nintenduo-home-latest-news .wp-block-post-template li hr {
        margin-top: 16px;
        margin-bottom: 17px;
    }

    .nintenduo-home-latest-news .wp-block-query-pagination {
        margin-top: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nintenduo-home-featured-news h2 a {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4; /* number of lines to show */
        line-clamp: 4;
        -webkit-box-orient: vertical;
    }

    .nintenduo-home-featured-news {
        overflow-x: scroll;
        margin-top: 16px !important;
    }

    .nintenduo-home-featured-news .wp-block-query {
        width: 932px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .nintenduo-home-featured-news ul {
        display: flex;
        gap: 12px !important;
    }

    .nintenduo-home-featured-news li {
        width: 224px;
    }

    .nintenduo-home-featured-news h2 {
        height: 88px;
        white-space: normal;
        font-size: 18px;
        margin: 10px 16px 12px 16px !important;
    }

    .nintenduo-home-featured-news-root-group figure img {
        width: 224px !important;
        height: 352px !important;
        max-width: none !important;
    }

    .nintenduo-home-featured-posts {
        margin-top: 12px;
    }

    .nintenduo-home-featured-posts .wp-block-heading {
        font-size: 20px;
        margin-bottom: 12px;
        margin-top: 12px;
    }

    .nintenduo-home-featured-posts-first-row {
        display: none;
    }

    .nintenduo-home-featured-posts-second-row {
        display: none;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row {
        display: block;
        margin-top: 0;
        text-align: center;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row > .wp-block-group {
        overflow-x: scroll;
        padding-left: 16px;
        padding-right: 16px;
        height: 235px;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row .wp-block-query {
        width: 1168px !important;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row ul {
        display: flex;
        gap: 12px !important;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row h2 a {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* number of lines to show */
        line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row li > div > figure img {
        width: 224px !important;
        height: 129px !important;
        max-width: none !important;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row li h2 {
        padding-top: 10px !important;
        padding-bottom: 9px !important;
    }

    .nintenduo-home-featured-posts-mobile-tablet-row .wp-block-post-date {
        font-size: 12px !important;
    }

    .nintenduo-home-latest-news {
        margin-top: 25px !important;
        margin-left: 16px;
        margin-right: 16px;
    }

    .nintenduo-home-latest-news .wp-block-heading {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .nintenduo-home-latest-news > div > div:first-child {
        width: 100%;
        text-align: center;
    }

    .nintenduo-home-latest-news .wp-block-columns {
        gap: 48px;
    }

    .nintenduo-home-latest-news .wp-block-post-title {
        font-size: 18px;
    }

    .nintenduo-home-latest-news .wp-block-post-excerpt {
        display: none;
    }

    /* Post info row */
    .nintenduo-home-latest-news .wp-block-post > .wp-block-columns {
        gap: 12px;
        align-items: flex-end;
    }

    /* Time row */
    .nintenduo-home-latest-news .wp-block-post > .wp-block-group {
        gap: 4px;
        align-items: flex-end;
    }

    .nintenduo-home-latest-news .wp-block-post > div > div:first-child {
        flex-basis: 165px !important;
        flex-shrink: 0;
    }

    .nintenduo-home-latest-news .wp-block-post > div > div:first-child img {
        height: 104px !important;
    }

    .nintenduo-home-latest-news .wp-block-post-template li hr {
        margin-top: 13px;
        margin-bottom: 13px;
    }

    .nintenduo-home-latest-news .wp-block-query-pagination {
        margin-top: 33px;
    }

    .nintenduo-home-latest-news .wp-block-query-pagination-numbers {
        flex-grow: 1;
        text-align: center;
    }
}