main .animate{
    background: url("../img/family_small.webp") center 0 no-repeat;
    min-height: 690px;
    display: grid;
    grid-template-rows: max-content auto;
    margin-top: calc(-1 * var(--header-height));
}

main #program{
    text-align: center;
    border-radius: 0 0 16px 16px;
    background-color: var(--light-blue-bg);
    padding-top: calc(var(--header-height) + 1.5rem) !important;
    /*padding-top: 1.5rem;*/
    padding-bottom: 16px !important;
    transition: transform 2s;
    transform: translateY(0%);
}

main #program > *:not(:last-child){
    margin-bottom: 1rem;
}

main #program h1{
    text-transform: uppercase;
    font-weight: bold;
    background-image: url("../img/family_small.webp");
    background-repeat: no-repeat;
    background-position: center calc(-1 * (var(--header-height) + 1.5rem));
    /*background-position: center -1.5rem;*/

    -webkit-background-clip: text;
    /*noinspection CssInvalidPropertyValue*/
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent; /* для WebKit */
    line-height: 75%;
    transition: background-position 2s;
}

body.reg-main-active main #program h1{
    transition: background-position 2s ease-in-out;
    /*background-position: center calc(-1 * (var(--header-height) + 1.5rem) - 100%);*/
    background-position: center calc(-1.5rem - 100%);
}

main #program p{
    max-width: 909px;
    margin: 0 auto;
    line-height: 1.4em;
}

main #program hr{
    border-top: 1px solid var(--blue-20);
    opacity: 1;
    margin: 0 auto 1rem auto;
    max-width: 735px;
}

main #program ul{
    padding: 0 10px;
    list-style: inside none;
    max-width: 444px;
    margin: 0 auto;
}

main #program ul li{
    border: 1px solid var(--dark-blue);
    border-radius: 60px;
    padding: 0.6rem;
    display: inline-block;
    margin: 4px 0;
    width: 100%;
}

main #area_button{
    display: grid;
    justify-items: center;
    align-content: center;
}

main .button_start{
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px dashed #FFF;
    background-color: rgba(55, 55, 55, 0.5);
    color: #FFF;
    transform: rotate(0);
    transition: transform 2s;
}

body.reg-main-active main .button_start{
    transform: rotate(180deg);
    transition: transform 2s ease-in-out;
}

main .container-fluid{
    padding: 0;
}

.content .slide{
    scroll-margin-top: var(--header-height);
    /*height: 50%;*/
}

.content .slide .one,
.content .slide .two{
    aspect-ratio: 100 / 80;
    width: 100vw;
    position: relative;
    /*noinspection CssUnknownProperty*/
    container-type: inline-size;
}

.content .slide1 .one{
    background: center center / cover no-repeat url("/img/index/iron-deficiency.webp");
}

.content .slide1 .two{
    background: center center / contain no-repeat url("/img/index/p_iron-deficiency.webp");
}

.content .slide2 .one{
    background: center center / cover no-repeat url("/img/index/alzheimer.webp");
}

.content .slide2 .two{
    background: center center / contain no-repeat url("/img/index/p_alzheimer.webp");
}

.content .slide3 .one{
    background: center center / cover no-repeat url("/img/index/cholesterol.webp");
}

.content .slide3 .two{
    background: center center / contain no-repeat url("/img/index/p_cholesterol.webp");
}

.content .slide4 .one{
    background: center center / cover no-repeat url("/img/index/thrombosis-stroke.webp");
}

.content .slide4 .two{
    background: center center / contain no-repeat url("/img/index/p_thrombosis-stroke.webp");
}

.content .slide5 .one{
    background: center center / cover no-repeat url("/img/index/uric-hypertension.webp");
}

.content .slide5 .two{
    background: center center / contain no-repeat url("/img/index/p_uric-hypertension.webp");
}

.content .slide .one{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    /*@formatter:off*/
    grid-template-areas:
        "h2 h2"
        "a index";
    /*@formatter:on*/
}

.content .slide .one img{
    grid-area: inherit;
}

.content .slide .one h2{
    grid-area: h2;
    color: var(--white);
    padding: 8%;
    width: 100%;
    text-align: center;
    position: absolute;
    left: 0;
    top: 0;
    /*noinspection CssInvalidPropertyValue*/
    font-size: 6.5cqw !important;
}

.content .slide .one img.index{
    grid-area: index;
    position: absolute;
    right: 50%;
    bottom: 0;
    transform: translateX(50%);
    width: 66%;
}

.content .slide .two h3{
    --fs-min: 14;
    --fs-max: 40;
    color: var(--text-color);
    padding: 0;
    text-align: left;
    position: absolute;
    left: 6.25%;
    right: 20%;
    bottom: 5%;
    /*noinspection CssInvalidPropertyValue*/
    font-size: 4cqw !important;
}

.content .slide a.button{
    align-items: center;
    position: absolute;
    left: 6%;
    bottom: 6%;
}

.content .slide .one a.button{
    grid-area: a;
    display: grid;
    color: #FFF;
    border-color: #FFF;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0;
    width: 88%;
    max-width: 200px;
}

.content .slide .one a.button svg{
    display: none;
}

.content .slide .two .button{
    display: none;
}

.content .slide .button svg{
    transform: rotate(270deg);
}

.content .slide .button:hover svg{
    transform: rotate(270deg) translateY(5px);
}

@media screen and (min-width: 320px){
    .content .slide .one a.button svg{
        display: block;
    }
}

@media screen and (min-width: 480px){
    main #program ul{
        padding: 0;
        max-width: 95%;
    }

    main #program ul li{
        width: auto;
        padding: 0.6rem 1.2rem;
    }
}

@media screen and (min-width: 640px){
    main .animate{
        background: url("../img/family_big.webp") center 0 no-repeat;
        min-height: 890px;
    }

    main #program{
        padding-top: calc(var(--header-height) + 6.3rem) !important;
        /*padding-top: 6.3rem;*/
        padding-bottom: 4.3em !important;
    }

    main #program > :nth-child(1){
        margin-bottom: 0.37em;
    }

    main #program > :nth-child(2){
        margin-bottom: 1.6em;
    }

    main #program > :nth-child(3){
        margin-bottom: 2.4em;
    }

    main #program > :nth-child(4){
        margin-bottom: 0.5em;
    }

    main #program h1{
        background-image: url("../img/family_big.webp");
        background-position: center calc(-1 * (var(--header-height) + 6.3rem));
        /*background-position: center calc(-6.3rem);*/
    }

    body.reg-main-active main #program h1{
        background-position: center calc(-1 * (var(--header-height) + 6.3rem) - 100%);
    }
}

@media screen and (min-width: 768px){
    main .button_start{
        width: 64px;
        height: 64px;
    }

    .home main .content{
        min-width: 768px;
        width: min(100vw, calc((100vh - 104px) * 2));
        max-width: 1920px;

        min-height: 400px;
        height: min(50vw, calc(100vh - 104px));
        max-height: 960px;

        margin: 0 auto;

        position: relative;
        overflow: hidden;
    }

    .content .container-fluid{
        display: flex;
        flex-direction: row;
        width: 100%;
        height: 100%;
    }

    .content .slide{
        flex: 0 0 100%;
        height: 100%;
        max-height: calc(100vh - 104px);
        position: relative;

        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .content .slide .one,
    .content .slide .two{
        aspect-ratio: 1 / 1;
        width: auto;
        height: 100%;
    }

    .content .slide .one {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        /*@formatter:off*/
        grid-template-areas:
            "h2"
            "index";
        /*@formatter:on*/
    }

    .content .slide .one a.button{
        display: none;
    }

    .content .slide .one img.index{
        width: 33%;
    }

    .content .slide .two h3{
        bottom: 20%;
    }

    .content .slide .two .button{
        display: grid;
    }
}

@media screen and (min-width: 1800px){
    main #program ul{
        max-width: 100%;
    }
}


/* =========================================
   АНИМАЦИЯ РЕГИСТРАЦИИ С ГЛАВНОЙ СТРАНИЦЫ
   ========================================= */

/* Анимация #program при открытии регистрации с главной */
body.reg-main-active main #program{
    transition: transform 2s ease-in-out;
    transform: translateY(-100%);
}

/* Модалка при анимированном открытии */
.reg-modal--animated{
    z-index: 2000 !important; /* Выше обычного .reg-modal */
    animation: regModalOpen 0.5s ease-out forwards;
}

@keyframes regModalOpen{
    from{
        opacity: 0;
        transform: scale(0.8);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}

/* Модалка при анимированном закрытии */
.reg-modal--closing{
    z-index: 2000 !important;
    animation: regModalClose 0.3s ease-in forwards;
    pointer-events: none; /* Отключаем клики во время анимации */
}

@keyframes regModalClose{
    from{
        opacity: 1;
        transform: scale(1);
    }
    to{
        opacity: 0;
        transform: scale(0.8);
    }
}
