

:root{
    --font-family400: "eurofurence400", sans-serif;
    --second-family: "Healthy-Innovation", sans-serif;
}

@media (max-width:768px){.breadcrumbs.common-page{
        top: 20vw !important;
        left: 10vw !important
    }}

.blog{

    & .breadcrumbs,
    & .breadcrumbs a {
        font-family: "Healthy-Innovation";
    }
    


    & .flex-row *,
    & article *,
    & .blog_load_more {
        font-family: "eurofurence", sans-serif;
    }

    & .blog-title {
        color: #604c81;
        margin-bottom: 2vw;
    }

    & .img-end {
        display: block;
        width: 25vw;
        height: auto;
        margin: 0 auto;

        & img {
            width: 100%;
            height: auto;
        }
    }

    & section header {
        height: 13vw !important;
    }

    & article {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2vw;
        row-gap: 4vw;

        @media (max-width:768px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width:540px) {
            grid-template-columns: 1fr;
        }
    }

    & .blog_item {
        display: flex;
        flex-direction: column;

        & a {
            text-decoration: none;

            & h2 {
                transition: all 0.3s linear;

                &:hover {
                    color: #437e9b;
                }
            }

        }
    }

   & .blog-select {
        border-radius: 5px;
        background: #f0f0f0;
        font-weight: 400;
        font-size: 1.8vw;
        color: #000;
        display: flex;
        align-items: center;
        gap: 0.7vw;
        padding: 0.3vw 0.8vw;
        margin-bottom: 3vw;
        font-family: var(--font-family400);
        margin-left: auto;
        transition: all 0.3s linear;
    
        &:hover {
            background: url(../../files/img/translate-bg.webp);
            background-size: cover;
            opacity: 0.7; /* Пример с изменением прозрачности для плавного перехода */
        }
    }
    
    /* & .blog-select {
        border-radius: 5px;
        background: #f0f0f0;
        font-weight: 400;
        font-size: 1.8vw;
        color: #000;
        display: flex;
        align-items: center;
        gap: 0.7vw;
        padding: 0.3vw 0.8vw;
        margin-bottom: 3vw;
        font-family: var(--font-family400);
        margin-left: auto;
        transition: all 0.3s linear;

        &:hover{
            background: url(../../files/img/translate-bg.webp);
        }
    } */

    @media (max-width:540px) {
        & .blog-select {
            font-size: 2.8vw;
        }
    }

    & .blog_tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8vw;
        row-gap: 1.5vw;
        margin-bottom: 5vw;
        transform-origin: 0 0;
        transform: rotateX(-90deg);
        opacity: 0;
        position: absolute;
        padding-right: 14vw;
        padding-left: 14vw;
        margin-top: 3vw;


        &.animation {
            transition: all 0.3s linear;
            transform: rotateX(0);
            opacity: 1;
            top: 100%;
            left: 0;
            z-index: 1;
        }


        & a {
            font-family: var(--font-family400);
            border-radius: 5px;
            background: #604c81;
            padding: 0.3vw 0.8vw;
            font-size: 2vw;
            font-weight: 400;
            text-transform: lowercase;
            color: #fff;
            text-decoration: none;
            transition: all 0.3s linear;

            @media (hover:hover) {
                &:hover {
                    color: #604c81;
                    background-color: #f0f0f0;
                }                
            }

            &.active {
                color: #604c81;
                background-color: #f0f0f0;
            }
        }
    }

    @media (max-width:540px) {
        & .blog_tags {
            gap: 1.5vw;
            row-gap: 2.5vw;
            justify-content: center;
        }

        & .blog_tags a {
            font-size: 3vw;
        }

        .blog-title {
            font-size: 7.5vw;
        }
    }

    & .flex-row {
        padding-left: 14vw;
        padding-right: 14vw;
        margin-top: 3vw;
        position: relative;
    }

    & article {
        padding-left: 14vw;
        padding-right: 14vw;
    }

    & .recipes-content>section {
        height: unset !important;
        width: 100% !important;
    }

    & .blog_item {
        display: flex;
        flex-direction: column;
        position: relative;

        &.blog_item.opacity {

            &::after,
            &::before {
                opacity: 0;
            }
        }


        &.right::after,
        &.left::before {
            position: absolute;
            content: "";
            width: 11vw;
            height: 39vw;
            z-index: -1;
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center;
            transition: all 0.3s linear;
        }

        &.right::after {
            background-image: url("/wp-content/themes/hi-food/assets/images/green_right.webp");
            right: -14vw;
            top: 5vw;

        }

        &.left::before {
            background-image: url("/wp-content/themes/hi-food/assets/images/green_left.webp");
            left: -14vw;
            top: -9vw;
        }
    }

    @media (max-width: 768px) {

        & .blog_item.right::after {
            background-image: url("/wp-content/themes/hi-food/assets/images/green_left.webp");
            right: unset;
            left: -14vw;
        }

        & .blog_item.left::before {
            background-image: url("/wp-content/themes/hi-food/assets/images/green_right.webp");
            left: unset;
            right: -14vw;
        }
    }

    & .img-wrap {
        width: 22vw;
        height: 22vw;

        & img {
            width: 100% !important;
            height: auto;
            max-width: unset !important;
        }

    }

    @media (max-width: 768px) {
        & .img-wrap {
            width: 33vw;
            height: 33vw;
        }
    }

    @media (max-width:540px) {
        & .img-wrap {
            /* width: 48vw;
            height: 48vw; */
            width: 100%;
            height: auto;
            margin-left: auto;
            margin-right: auto;
        }
    }

    & time {
        font-family: var(--font-family400);
        font-weight: 400;
        font-size: 1.3vw;
        color: #654a85;
        display: block;
        margin-top: 2vw;
    }

    @media (max-width:540px) {
        & time {
            font-size: 2.5vw;
            text-align: center;
        }
    }

    & .blog_item_title {
        font-weight: 700;
        font-size: 2.15vw;
        line-height: 90%;
        text-align: center;
        color: #654a85;
        display: block;
        margin-top: 2.5vw;
        flex-grow: 1;
    }

    @media (max-width:540px) {
        & .blog_item_title {
            font-size: 4vw;
            text-align: center;
        }
    }

    & .blog_item_tags {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3vw;
        margin-top: 1.2vw;

        & a {
            font-family: var(--font-family400);
            font-weight: 400;
            font-size: 2vw;
            text-transform: lowercase;
            color: #a1a1a1;
            text-decoration: none;
            transition: all 0.3s linear;

            &:hover{
                color: #654a85;
            }
        }
    }

    @media (max-width:540px) {
        & .blog_item_tags {
            justify-content: center;
            margin-top: 2.5vw;
            gap: 2vw;
            row-gap: 1.5vw;
        }

        & .blog_item_tags a {
            font-size: 3.2vw;
        }
    }

    & .blog_load_more {
        width: 18vw;
        height: 4vw;
        display: block;
        margin: 4vw auto 6vw;
        background-image: url("/wp-content/themes/hi-food/files/img/translate-bg.webp");
        border-radius: 29px;
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.2);
        display: flex;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.9vw;
        text-align: center;
        color: #7d4797;
        transition: all 0.3s linear;

        &:hover {
            color: #437e9b;
        }
    }

    @media (max-width:540px) {
        & .blog_load_more {
            font-size: 2.9vw;
            width: 25vw;
            height: 7vw;
            margin-top: 8vw;
            margin-bottom: 10vw;
        }
    }

}

.btn-reset{
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

footer .footer_background{
    width: 100% !important;
}

@media (max-width: 768px){footer{
        display: flex !important;
        flex-direction: column-reverse;
        align-items: center;
        height: 100% !important;
        gap: 2vw;
        padding-top: 20vw;
    }

    footer .footer_background{
        height: 100% !important;
    }}

.blog_item{
    & .flex-custom-row * {
        font-family: "eurofurence", sans-serif;
    }

    & time {
        font-family: var(--font-family400);
        font-weight: 400;
        font-size: 1.3vw;
        color: #654a85;
        display: block;
        margin-top: 2vw;
    }

    @media (max-width:540px) {
        & time {
            font-size: 2.5vw;
            text-align: center;
        }
    }
    & .flex-custom-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 1.7vw;

        & time {
            margin-top: 0;
        }

        & .count_view,
        & time,
        & .reading_time {
            font-family: var(--font-family400);
            font-weight: 400;
            font-size: 1.3vw;
            color: #654a85;

            & img {
                width: 2vw;
            }
        }

        & .count_view,
        & .reading_time {
            display: flex;
            align-items: center;
            gap: 1vw;
        }
    }

    @media (max-width: 768px) {
        .flex-custom-row {
            gap: 1vw;
        }

        & .blog_item {
            align-items: center;
            
            & a {
                display: block;
                width: 100%;
                height: 100%;
            }

            & img-wrap img {
                width: 100%;
            }
        }

        & .count_view,
        & time,
        & .reading_time {
            font-size: 2vw !important;
        }

        .blog_item_title {
            font-size: 3.5vw;
        }
    }

    @media (max-width: 540px) {
        & .flex-custom-row{
            margin-top: 2.7vw;
        }

        & .count_view,
        & time,
        & .reading_time {
            font-size: 3vw !important;

            & img {
                width: 4vw !important;
                height: auto;
            }
        }
        & .reading_time img{
            width: 3.5vw !important;
        }

        .blog_item_title {
            font-size: 5vw;
        }
    }
}

/* Анимация загрузки */
.loader{
    display: none; /* Скрыто по умолчанию */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

@keyframes spin{0%{ transform: rotate(0deg); }
    100%{ transform: rotate(360deg); }}

@media (max-width:768px){.relative-wrapper + footer{
        margin-top: 6vw;
    }}
@media (max-width:576px){.relative-wrapper + footer{
        margin-top: 8vw;
    }}


.post-likes{
    display: flex;
    align-items: center;
    gap: 1vw;

    &:hover {
        & svg {
            fill: #654a85;
            stroke: #fff;
            transform: scale(1.2);
        }
    }

    & svg {
        width: 1.5vw;
        height: 1.5vw;
        transition: all 0.3s linear;
        stroke: #654a85;

        & * {
            transition: all 0.3s linear;
        }
    }
}

.like-count{
    color: #654a85;
    font-family: var(--font-family400) !important;
    font-weight: 400;
    font-size: 1.7vw;
}

.flex-custom-row{
    flex-wrap: wrap;

    & time {
        flex: 1 0 100%;
        margin-bottom: 2vw;
    }
}

.post-share{
    & svg {
        width: 1.6vw;
        height: 1.6vw;
        transition: all 0.3s linear;
        fill: #654a85;
        transition: all 0.3s linear;

        &:hover {
            fill: #a1a1a1;
        }
    }
}
#shareModal{
    display: block;
    transform-origin: 0 0;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: scale(0.8) translate(-50%, -50%);
    z-index: 10;
    transition: all 0.3s ease-in-out;
    right: unset;
    bottom: unset;

    & .modal-content {
        background-color: #fff;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: relative;
    }
    
    & .flex-row:nth-child(1) {
        margin: 10px 0 30px;
        font-size: 2vw;

        & .close{
            position: absolute;
            right: 10px;
            top: 10px;
            font-size: 3vw;
            z-index: 11;
            cursor: pointer;
        }
    }

    & .flex-row:nth-child(2){
        display: flex;
        align-items: center;
        gap: 10px;

        & a{
            display: block;
        }
    }

    & .flex-row:nth-child(3){
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 40px;
        border: 1px solid rgba(155, 81, 224, 0.3);
        border-radius: 20px;
        
        &  .actual_link{
            border-radius: 20px;
            width: 100%;
            padding: 10px 20px;    
        }

        & button{
            background-color: #604c81;
            padding: 10px 20px;
            border-radius: 20px;
            color: #fff;
        }
    }
    
    & .share_buttons img {
        width: 40px;
        height: 40px;
        margin: 0 10px;
        cursor: pointer;
    }
}

#shareModal.active{
    transform: scale(1) translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}

.post-likes{
    transition: all 0.3s linear;
    &:hover{
        stroke: #a1a1a1;
    }
}



@media (max-width:768px){.post-share,.like-heart{
        & svg{
            width: 2.2vw;
            height: 2.2vw;
        }
    }
    .like-count{
        font-size: 2.2vw;
    }}
@media (max-width:540px){.post-share,.like-heart{
        height: 3.5vw;
        & svg{
            width: 3.5vw;
            height: 3.5vw;
        }
    }
    .like-count{
        font-size: 3.5vw;
    }

    #shareModal .flex-row:nth-child(1) span{
        font-size: 4.5vw;
    }
    #shareModal .flex-row:nth-child(2){
        gap: 0;
    }
    #shareModal .close{
        font-size: 6vw;
    }}

#button_copy{
    transition: all 0.3s linear;
    &:hover{
        background-color: #a1a1a1 !important;
    }
    &.active{
        background-color: #a1a1a1 !important;
    }
}

.post-likes.active{
    & svg{
        fill: #654a85;
    }
}

.post-likes{
    cursor: pointer;
}

.--accent{
    color: #654a85;
}