/*
Theme Name: Sport and Life
Author: Maple Rock Design
Description: A custom WordPress theme for Sport and Life.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sport-and-life
*/

@import url("https://use.typekit.net/yii2ruu.css");
/* <link rel="stylesheet" href="https://use.typekit.net/yii2ruu.css"> */

html,body {
    height: 100%;
    line-height: 1.4;
}

.wp-site-blocks {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1 0 auto;
}

.advertseparator { /*TODO: move to theme.json, once custom advert-separator block added */
    background: linear-gradient(to right, #1d1d1b, #1d1d1b) 0 50% / 100% 0.5px no-repeat;
}

.wp-block-query .wp-block-post .wp-block-post-featured-image {
    overflow: hidden;
}

.wp-block-query .wp-block-post:hover .wp-block-post-featured-image img {
    scale: 1.3;
}

.wp-block-query .wp-block-post:hover .wp-block-post-featured-image img {
    transition: all 0.3s;
}


.wp-block-navigation-item__content:after {
    content: '';
    display: block;
    height: 3px;
    background-color: black;
    max-width: 0;
    transition: max-width 0.2s;
}

.wp-block-navigation-item__content:hover:after {
    max-width: 100%;
}

.mrd-search {

    .wp-block-search__button {
        max-width: 30px !important;
    }

}

.wp-block-group.is-linked {

    .wp-block-group:first-of-type:has(img) {
        overflow: hidden;
    }
    .wp-block-group:first-of-type img {
        transition: 0.2s;
    }
    &:hover .wp-block-group:first-of-type img {
        scale: 1.3
    }
}

.is-advert {

    text-align: center;
    position: relative;

    &:before {
        display: block;
        content: 'Advertisement';
        padding: 1rem 0;
        text-align: center;
        text-transform: uppercase;
        font-size: 80%;
        background-color: white;
        display: inline-block;
        margin: 0 auto;
        z-index: 1;
        position: relative;
        padding: 8px 10px;
    }

    &:after {
        display: block;
        content: '';
        height: 1px;
        width: 100%;
        background-color: var(--wp--preset--color--mid);
        position: absolute;
        top: 16px;
    }
}

.wp-block-query .wp-block-post {
    display: flex;
    flex-direction: column;

    h2 {
        margin: 0.3rem 0 0 0;
    }

    .wp-block-group.is-vertical {
        flex: 1 0 auto;
        gap: 0;
    }
}


.mrd-stack-pattern {
    flex: 1 0 auto;

    &:hover  h3 a, &:hover  h3{
        color: var(--wp--preset--color--accent);
    }
}

body.is-featured {
    main > .wp-block-group:nth-child(2) > .wp-block-group {
        border-top: 5px solid var(--wp--preset--color--mid);
    }
}


/*REALLY*/
.wp-block-group:has(> .mrd-featured-article) {
    display: flex;
    flex-direction: column;

    > .mrd-featured-article {
        flex: 1 0 auto;
        display: flex;
        > ul {
            display: flex;
            flex: 1 0 auto;
            flex-direction: column;

            > li {
                display: flex;
                flex: 1 0 auto;
                flex-direction: column;

                > div {
                    flex: 1 0 auto;

                    figure {
                        flex: 0 0 40%;
                    }

                    figure, img {
                        height: 100%;
                    }
                }
            }


        }
    }

}
.mrd-term-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;

    li {
        display: flex;
    }
    li:after {
        display: block;
        content: '/';
        margin: 0 5px;
    }

    li:last-of-type:after {
        display: none;
    }
}