/* Обнуление отступов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Обнуление стилей для списков */
ul, ol {
    list-style: none;
}

/* Обнуление границ и других элементов */
a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

input, textarea {
    border: none;
    outline: none;
}

body {
    width: 100%;
    overflow-x: hidden;
}

html {
    width: 100%;
    overflow-x: hidden;
}

/* Десктоп типографика */

.red-text {
    color: var(--MATRESHKA, #B31917);
}

h1 {
color: var(--Black-soft, #2F3134);
text-align: center;
font-family: Mulish, sans-serif;
font-size: 102px;
font-style: normal;
font-weight: 800;
line-height: 100%; /* 102px */
letter-spacing: -5.1px;
}

h2 {
    color: var(--MATRESHKA, #B31917);
    font-family: Mulish, sans-serif;
    font-size: 64px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%; /* 64px */
    letter-spacing: -3.2px;
}

h3 {
    color: var(--Black-soft, #2F3134);
    font-family: Mulish, sans-serif;
    font-size: 64px;
    font-style: normal;
    font-weight: 800;
    line-height: 100%; /* 64px */
    letter-spacing: -3.2px;
}

h4 {
    color: var(--Black-soft, #2F3134);
    font-family: Manrope, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 22.4px */
}

p, div {
    color: var(--Black-soft, #2F3134);
    font-family: Manrope, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%; /* 22.4px */
}

.headtext, .regtext {
    color: var(--Black-soft, #2F3134);
    font-family: Manrope, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 130%; /* 31.2px */
}

.headtext {
    text-align: center;
}

/* Десктоп выравнивание, фоны */
header {
    background-color: var(--Beige-100, #FCF6F0);
    width: 100%;
    overflow-x: hidden;
}

.header-container {
    display: flex;
    flex-direction: column;
    width: 1200px;
    /* height: 700px; */
    height: calc(100vh - 80px);
    gap: 64px;
    justify-self: center;
    justify-content: center;
    align-items: center;
    position: relative;
    top: -80px;
    z-index: 10;

    margin-left: auto;
    margin-right: auto;

    .header-logo {
        display: flex;
        width: 395px;
        height: 64px;
        align-self: center;
        flex-shrink: 0;
        background-image: url("assets/header-logo.svg");
    }

    .headtext {
        width: 803px;
    }

    .img-wrapper {
        position: absolute;
        display: flex;
        bottom: 110px;
        width: 1200px;
        justify-content: space-between;

        .matreska-left {
            width: 250px;
            height: 250px;
            background-size: cover;
            background-position: right;
            background-repeat: no-repeat;
            background-image: url("assets/matreska-left.png");
            transform: rotate(-30deg);
        }

        .matreska-right {
            width: 250px;
            height: 250px;
            background-size: cover;
            background-position: right;
            background-repeat: no-repeat;
            background-image: url("assets/matreska-right.png");
            transform: rotate(30deg);
        }
    }
}

header::after {
    content: '';
    position: absolute;
    bottom: -0;
    /* left: -10%; */
    width: 100%;
    height: 80px;
    background-color: var(--Beige-100, #FCF6F0);
    border-radius: 50% / 0 0 100% 100%; /* эллипс сверху */
    z-index: 0;
    /* overflow-x: hidden; */
}

.container {
    display: flex;
    flex-direction: column;
    width: 1200px;
    justify-self: center;
    padding-top: 128px;
    padding-bottom: 208px;
    position: relative;

    margin-left: auto;
    margin-right: auto;
}

.location {
    /* overflow-x: hidden; */
    .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 32px;
        padding-top: 208px;

        .description-wrapper {
            padding-top: 16px;
            padding-bottom: 16px;
            display: flex;
            flex-direction: column;
            gap: 48px;
            width: 513px;
        }

        .text-wrapper {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .location-photo {
            width: 100%;
            height: 100%;
            align-self: stretch;

            img {
                width: 100%;
                height: 100%;
                border-radius: 16px;
            }
        }

        .details-wrapper {
            grid-column: 1 / 3;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 32px;
            margin-top: 32px;

            .card {
                display: flex;
                padding: 32px;
                flex-direction: column;
                justify-content: center;
                align-items: flex-start;
                flex: 1 0 0;
                border-radius: 16px;
                background: var(--Beige-100, #FCF6F0);
                gap: 4px;
            }

            .adress {
                background-image: url("assets/adress.svg");
                background-repeat: no-repeat;
                background-position: right center;
            }

            .work-time {
                background-image: url("assets/work-time.svg");
                background-repeat: no-repeat;
                background-position: right center;
            }
        }
    }
}

.friendly::before {
    content: '';
    position: absolute;
    top: -80px; /* поднимаем вверх примерно на 1/3 высоты овала */
    left: -10%;
    width: 120%;
    height: 160px;
    background-color: var(--Gray-soft, #F4F4F5);
    border-radius: 50% / 100% 100% 0 0; /* эллипс сверху */
    z-index: 1;
    /* overflow-x: hidden; */
}

.friendly {
    background-color: var(--Gray-soft, #F4F4F5);
    position: relative;
    /* overflow-x: hidden; */

    .container {
        display: flex;
        flex-direction: column;
        gap: 48px;

        .friendly-cards-wrapper {
            display: flex;
            flex-direction: column;
            width: 100%;
            max-height: 348px;
            gap: 20px 32px;
            flex-wrap: wrap;

            .friendly-card {
                max-width: 584px;
                padding: 32px 32px 32px 68px;
                align-self: stretch;
                border-radius: 16px;
                background-color: #FFF;
                background-image: url("assets/check-icon.svg");
                background-repeat: no-repeat;
                background-size: 20px 20px;
                background-position: 32px 32px;
            }
        }
    }
}

.comunity::before {
    content: '';
    position: absolute;
    top: -80px; /* поднимаем вверх примерно на 1/3 высоты овала */
    left: -10%;
    width: 120%;
    height: 160px;
    background-color: var(--White, #FFF);
    border-radius: 50% / 100% 100% 0 0; /* эллипс сверху */
    z-index: 1;
    /* overflow-x: hidden; */
    
}

.comunity {
    position: relative;
    /* overflow-x: hidden; */

    .container{
        flex-direction: row;

        .text-wrapper {
            width: 513px;
            padding-top: 16px;
            padding-bottom: 16px;

            h2 {
                margin-bottom: 48px;
            }

            p:has(.red-text) {
                margin-top: 8px;
            }
        }

        .photo-wrapper {
            display: flex;
            margin-left: auto;
            gap: 32px;

            .comunity-photo1,
            .comunity-photo2 {
                width: 276px;
                height: 326px;

                img {
                    width: 100%;
                    height: auto;
                    border-radius: 16px;
                    aspect-ratio: 354/418;
                }
            }

            .comunity-matreska {
                position: absolute;
                width: 240px;
                height: 240px;
                background-size: 240px 240px;
                background-repeat: no-repeat;
                background-image: url("assets/comunity-matreska.png");
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) rotate(17deg);
            }
        }
    }
}

.comfort::before {
    content: '';
    position: absolute;
    top: -80px; /* поднимаем вверх примерно на 1/3 высоты овала */
    left: -10%;
    width: 120%;
    height: 160px;
    background-color: var(--Beige-100, #FCF6F0);
    border-radius: 50% / 100% 100% 0 0; /* эллипс сверху */
    z-index: 1;
    /* overflow-x: hidden; */
}

.comfort {
    background-color: var(--Beige-100, #FCF6F0);
    position: relative;
    /* overflow-x: hidden; */

    .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 32px;

        h3 {
            grid-row: 1 / 2;
            grid-column: 1 / 3;
            margin-bottom: 48px;
        }

        .comfort-cards-wrapper {
            display: flex;
            border-radius: 16px;
            background-color: #FFF;
            align-items: center;
            margin-top: 24px;

            .comfort-card {
                display: flex;
                padding: 32px;
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                flex: 1 0 0;
                align-self: stretch;
            }

            .divider {
                display: flex;
                width: 1px;
                height: calc(100% - 64px);
                align-self: center;
                opacity: 0.1;
                background: var(--Black-soft, #2F3134);
            }
        }
        
        .registration {
            grid-column: 2 / 3;
            grid-row: 2 / 4;

            display: flex;
            padding: 32px;
            flex-direction: column;
            align-items: flex-start;
            flex: 1 0 0;
            align-self: stretch;

            border-radius: 16px;
            border: 1px solid var(--Beige-500, #EEE4D9);
            background-image: url("assets/comfort-like.svg");
            background-repeat: no-repeat;
            background-position: bottom right;

            .regtext {
                width: 63%;
            }
        }
    }
}



/* планшет и мобильньная типографика */
@media (max-width: 1279px) {

    h1 {
        color: var(--Black-soft, #2F3134);
        text-align: center;
        font-family: Mulish, sans-serif;
        font-size: 54px;
        font-style: normal;
        font-weight: 800;
        line-height: 100%; /* 102px */
        letter-spacing: -2.7px;
        }
        
        h2 {
            color: var(--MATRESHKA, #B31917);
            font-family: Mulish, sans-serif;
            font-size: 32px;
            font-style: normal;
            font-weight: 800;
            line-height: 100%; /* 64px */
            letter-spacing: 0;
        }
        
        h3 {
            color: var(--Black-soft, #2F3134);
            font-family: Mulish, sans-serif;
            font-size: 32px;
            font-style: normal;
            font-weight: 800;
            line-height: 100%; /* 64px */
            letter-spacing: 0;
            padding-left: 20px;
        }
        
        h4 {
            color: var(--Black-soft, #2F3134);
            font-family: Manrope, sans-serif;
            font-size: 12px;
            font-style: normal;
            font-weight: 700;
            line-height: 140%; /* 22.4px */
        }
        
        p, div {
            color: var(--Black-soft, #2F3134);
            font-family: Manrope, sans-serif;
            font-size: 12px;
            font-style: normal;
            font-weight: 400;
            line-height: 140%; /* 22.4px */
        }
        
        .headtext, .regtext {
            color: var(--Black-soft, #2F3134);
            font-family: Manrope, sans-serif;
            font-size: 16px;
            font-style: normal;
            font-weight: 600;
            line-height: 130%; /* 31.2px */
        }
        
        .headtext {
            text-align: center;
        }

}

/* планшет и мобильньная отступы */

@media (max-width: 1279px) {

    header {
        overflow: hidden;
    }
    .header-container {
        gap: 32px;
        top: -80px;
        z-index: 10;

        .header-logo {
            width: 296px;
            height: 48px;
            background-size: contain;
            background-repeat: no-repeat;
        }

        .img-wrapper{
            .matreska-left {
                width: 200px;
                height: 200px;
            }

            .matreska-right {
                position: relative;
                bottom: -25px;
                width: 200px;
                height: 200px;
            }
        }
    }
    

    .container {
        padding-top: 80px;
        padding-bottom: 120px;
    }

    .friendly::before,
    .comunity::before,
    .comfort::before,
    footer::before {
        height: 80px;
        top: -40px;
    }

    header::after {
        height: 80px;
        bottom: 0px;
    }

    .header-container {
        height: calc(100vh - 140px);
    }

    .location .container {
        padding-top: 120px;
        column-gap: 20px;
        row-gap: 24px;

        .description-wrapper {
            gap: 32px;
            width: 100%;
        }

        .details-wrapper {
            column-gap: 20px;
            row-gap: 12px;

            .card {
                padding: 20px;
            }
        }
    }

    .friendly .container {
        gap: 32px;

        .friendly-cards-wrapper {
            gap: 20px;
        }
    }

    .comunity .container,
    .comunity .container .text-wrapper,
    .comunity .container .photo-wrapper {
        row-gap: 32px;
        column-gap: 20px;
    }

    .comunity .container .text-wrapper {
        padding: 0 20px 0 20px;
        h2 {
            margin-bottom: 0;
        }
    }

    .comfort .container {
        column-gap: 20px;

        h3 {
            margin-bottom: 32px;
        }

        p {
            margin-bottom: 16px;
            padding-left: 20px;
        }

        .comfort-card p {
            padding-left: 0;
        }

        .comfort-cards-wrapper .divider {
            height: 1px;
            width: calc(100% - 40px);
        }
    }
}

/* планшет выравнивание */

@media (min-width: 768px) and (max-width: 1279px) {
    header {
        width: 100%;
    }

    header::after {
        bottom: 40px;
    }

    .header-container {
        width: 588px;
        /* align-self: center; */
        margin-left: auto;
        margin-right: auto;
        margin-top: -25px;

        .headtext {
            width: 588px;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .img-wrapper {
            width: 200%;
            justify-content: center;
            bottom: -25px;
            
        }
    }

    .container {
        width: 728px;
        /* align-self: center; */
        margin-left: auto;
        margin-right: auto;
    }

    .location .container {
        display: flex;
        flex-direction: column;
        
        .description-wrapper {
            padding-left: 20px;
            padding-right: 20px;
            padding-top: 0;
            padding-bottom: 0;
        }

        .text-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
        }

        .location-photo {
            width: 728px;
            height: 436px;
        }

        .details-wrapper {
            margin-top: 0;
            display: flex;
            flex-direction: column;
        }
    }

    .friendly .container {
        .friendly-cards-wrapper {
            max-width: 728px;
            max-height: 296px;

            .friendly-card {
                max-width: 354px;
                background-size: 15px 15px;
                background-position: 20px 20px;
                padding: 20px 20px 20px 43px;
            }
        }
    }

    .comunity .container {
        flex-direction: column;

        .text-wrapper {
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: auto auto;

            h2 {
                grid-column: 1 / 3;
            }

            p:has(.red-text) {
                margin-top: 0px;
            }
        }

        .photo-wrapper {
            margin: 0;

            .comunity-photo1,
            .comunity-photo2 {
                width: 354px;
                height: 418px;
            }

            .comunity-matreska {
                transform: translate(-50%, -25%) rotate(17deg);
            }
        }
    }

    .comfort .container {
        p {
            margin: 0;
        }

        .comfort-cards-wrapper {
            flex-direction: column;

            .comfort-card {
                padding: 20px;
            }
        }

        .registration {
            padding: 20px;
            background-position: bottom -42px right -46px;
            background-size: contain;
    
            .regtext {
                width: 70%;
            }
        }
    }
}

/* выравнивание мобильная */
@media (max-width: 767px) {

    header {
        width: 100%;
    }

    .header-container {
        width: 350px;
        height: calc(100vh - 120px);

        .header-logo {
            width: 198px;
            height: 32px;
            background-size: contain;
            background-repeat: no-repeat;
        }

        .headtext {
            width: 320px;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .img-wrapper {
            width: 200%;
            justify-content: center;
            /* bottom: -100px;
            bottom: -60px; */

            top: calc(50% + 200px);

            .matreska-right {
                position: relative;
                bottom: -5px;
            }
        }
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
        width: 100%;
    }

    .location .container {
        display: flex;
        flex-direction: column;

        .description-wrapper {
            padding-left: 20px;
            padding-right: 20px;
            width: 100%;
        }

        .location-photo {
            width: 100%;
            /* min-width: 300px; */
            min-height: 190px;
            /* background-size: contain;
            background-position: center; */
        }

        .details-wrapper {
            margin: 0;
            display: flex;
            flex-direction: column;
        }
    }

    .friendly .container {
        h3{
            padding-left: 20px;
        }

        .friendly-cards-wrapper {
            flex-wrap: nowrap;
            max-height: fit-content;

            .friendly-card {
                max-width: 100%;
            }
        }
    }

    .comunity .container {
        flex-direction: column;

        .text-wrapper {
            width: 100%;
            padding-left: 20px;
            padding-right: 20px;

            h2 {
                margin-bottom: 32px;
            }
        }

        .photo-wrapper {
            margin-left: 0;
            width: 100%;
            position: relative;

            .comunity-photo1,
            .comunity-photo2 {
                width: 50%;
                min-width: 150px;
                height: fit-content;
                min-height: 177px;
                /* background-size: contain; */
            }

            .comunity-matreska {
                width: 120px;
                height: 120px;
                background-size: contain;
                transform: translate(-50%, -50%) rotate(17deg);
            }
        }
    }

    .comfort .container {
        display: flex;
        flex-direction: column;

        p {
            margin: 0;
        }

        p, h3 {
            padding-left: 20px;
            padding-right: 20px;
        }

        .comfort-cards-wrapper {
            flex-direction: column;

            .comfort-card {
                padding: 20px;

                p {
                    padding: 0;
                }
            }
        }

        .registration {
            margin-top: 16px;
            height: 300px;
            flex: 1 0 300px;
            background-position: bottom center;

            .regtext {
                width: 100%;
            }
        }
    }
}

/* кнопка */

.anchor {
    display: flex;
    width: 48px;
    height: 48px;
    padding: 0 12px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.75;
    background-image: url("assets/arrow.svg");
    position: absolute;
    left: 50%;
    z-index: 100;
    transform: translateX(-50%);
}

@media (max-width: 1279px) {
    .anchor {
        display: none;
    }
}