* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {

    --bg: #F8F4EF;
    --section: #F5EFE8;
    --hero: #E8DDD2;

    --text: #3A342F;
    --text-light: #6D655E;

    --accent: #7c5c41;
    --accent-hover: #A98D74;

    --card: #FFFFFF;
    --border: #E8E0D7;

}

body {
    font-size: clamp(1rem, 0.9rem + 0.3vw, 1.15rem);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: "Cormorant Garamond", serif;
}

h1 {font-size: 2rem; line-height: 1.2;}
h2 {font-size: 3rem; line-height: 1.2;}
h3 {font-size: 2rem; line-height: 1.2;}


p {font-size: 1rem;}
.btn {font-size: 1rem;}

body {
    font-family: "Manrope", sans-serif;
}

section {
    /*max-width: 1280px;*/
    margin: 0 auto;
    width: 100%;
    display: block;
}

.content-width {
    max-width: 1200px;
    width: 85%;
    margin: 0 auto;
}

/* free-btn */

.free-btn {
    position: fixed;
    bottom:40px;
    right:40px;
    z-index: 1000;
}

.free-btn.hidden{
    display: none;
}

.free-btn .btn {
    padding: 14px 28px;
    color: white;
    text-decoration: none;
    border-radius: 200px;
    transition: .2s;
    text-align: center;
    background-color: #775e51;
    white-space: nowrap;
}

/* block 1 */

.b1 {
    height: 50px;
    position: fixed;
    background-color: white;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #CCC;
    /*display: none;*/
}

.b1 .content {
    display: flex;
    flex-direction: row-reverse;
    align-content: revert;
    height: 100%;
    align-items: center;
}

.b1 .content a {
    margin-right:40px;
    text-decoration: none;
    color: #000;
    font-size: 14px;
}

/* block 2 */

.b2 {
    /*margin-top:50px;*/
    padding-bottom: 0px;
    padding-top: 0px;
    background-image: url(img/bg11.jpg);
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position-x: 72%;
    background-color: #d1b39b;
}

.b2 .content {
    width: 50%;
    padding-bottom: 80px;
    padding-top: 80px;
}

.b2 .buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    flex-direction: row;
}

.b2 .btn {
    padding: 14px 28px;
    color: white;
    text-decoration: none;
    border-radius: 200px;
    transition: .2s;
    text-align: center;
}

.b2 p, .b2 h2 {
    margin-bottom: 20px;
}

.b2 .btn-1 {
    background-color: #775e51;
}

.b2 .btn-1:hover {
    background: var(--accent-hover);
}

.b2 .btn-2 {
    border: 1px solid var(--accent);
    color: var(--accent);
    display: none;
}

.b2 .t1 {
    color: var(--accent);
}



/* block 3 */

.b3 {
    padding-bottom: 40px;
    padding-top: 40px;
    background-color: #ffffff;
}

.b3 p {
    margin-bottom: 20px;
    text-align: justify;
}

.b3 h3 {
    text-align: center;
    margin-bottom: 20px;
}

/* block 4 */

.b4 {
    padding-bottom: 40px;
    padding-top: 40px;
    background-color: #F2EBE4;
    text-align: center;
}

.b4 h3 {
    text-align: center;
    margin-bottom: 20px;
}

.b4 .content {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.b4 .square {
    position:relative;
    width: 32%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #eee;
    background-color: #fff;
    border-radius: 7px;
}

.b4 .square .icon {
    background-size: contain;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.b4 .square .title {
    font-weight:bold;
    margin-bottom: 10px;
}

.b4 .square .icon-1 {background-image: url(./img/icon1.png)}
.b4 .square .icon-2 {background-image: url(./img/icon2.png)}
.b4 .square .icon-3 {background-image: url(./img/icon3.png)}
.b4 .square .icon-4 {background-image: url(./img/icon4.png)}
.b4 .square .icon-5 {background-image: url(./img/icon5.png)}
.b4 .square .icon-6 {background-image: url(./img/icon6.png)}


/* block 5 */

.b5 {
    padding-bottom: 20px;
    padding-top: 20px;
    background: #faf8f5;
    text-align: center;
}

.b5 .content {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.b5 .square {
    position:relative;
    width: 32%;
    padding: 20px 20px 20px;
    padding-left:9%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.b5 .square .title {
    font-weight: bold;
}

.b5 .square .icon {
    position:absolute;
    top: 50%;
    transform: translateY(-50%);        
    left:10px;
    width: 60px;
    height: 60px;
    background-size: contain;
}

.b5 .square .icon-8 {background-image: url(./img/icon8.png)}
.b5 .square .icon-9 {background-image: url(./img/icon9.png)}
.b5 .square .icon-10 {background-image: url(./img/icon10.png)}

/* block 6 */

.b6 {
    padding-bottom: 40px;
    padding-top: 40px;
    background-color: #faf8f5;
}

.b6 .content {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.b6 p {
    text-align: justify;
}

/* block 7 */

.b7 h3 {text-align: center; margin-bottom: 20px;}
.b7 .content {
    display: flex;
    gap: 10px;
    flex-direction: column; 
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.b7 .date {font-size: 0.9rem; color: #826c59; font-weight: 800;}
.b7 .title {font-size: 1.2rem;}
.b7 .grade {font-size: 0.9rem; color: #666;}

.b7 .square {
    padding: 20px;
    border-radius: 7px;
    box-shadow: 1px 1px 3px #ccc;
    background-color: #ffffff;
    width: 70%;
}

.b7 {
    padding-bottom: 40px;
    padding-top: 40px;
    background-color: #F2EBE4;;
}

/* Планшеты */

@media (max-width:1050px){
    .b2 {
        background-position-x: 78%;
    } 
    

}

/* Телефоны */

@media (max-width:800px){

    .b2 .btn {
        padding: 10px 25px;;
        font-size: 1rem;
        width: fit-content;
        white-space: nowrap;
    }

    h2 {
        font-size: 1.6rem;
        line-height: 1.0;
    }

    .b2 h1 {font-size: 1.2rem; line-height: 0.9; margin-bottom: 5px;}

    .b2 .t3 {
        display: none;
    }

    .b2 p {
        font-size: 0.8rem;
    }

    .b2 .buttons {
        flex-direction: column;
        
    }

    .b2 {
        background-position-x: 78%;
    }

    .b2 .content {
        width: 50%;
        padding-bottom: 20px;
        padding-top: 20px;
    }

    .b4 .content {
        flex-direction: column;
    }

    .b4 .square {
        width: 100%;
        padding-left: 100px;
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
        justify-content: center;
    }

    .b4 .square p {
        text-align: left;
    }

    .b4 .square .title {
        margin-bottom: 0;
        text-align: left;
    }

    .b4 .square .icon {
        position:absolute;
        top: 50%;
        transform: translateY(-50%);        
        left:10px;
        width: 60px;
        height: 60px;
    }

    .b5 .square .icon {
        position:absolute;
        top: 50%;
        transform: translateY(-50%);        
        left:10px;
        width: 60px;
        height: 60px;
    }

    .b5 .square {
        width: 100%;
        padding-left: 100px;
        padding-top: 10px;
        padding-bottom: 10px;
        justify-content: center;
    }

}


.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: .25s;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__window {
    position: relative;

    width: min(90%, 420px);

    padding: 40px;
    border-radius: 20px;

    background: #fff;

    transform: translateY(20px);
    transition: .25s;
}

.modal.active .modal__window {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 8px;
    right: 16px;
    border: none;
    background: none;
    font-size: 35px;
    cursor: pointer;
}

.contact {
    display: flex;
    gap: 12px;
    align-items: center;

    margin-top: 18px;
    font-size: 18px;
}

.contact a {
    color: inherit;
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}