:root {
    /** ============ CSS-змінні ============ */
    --color-font-body: #4b2500;
    --color-background-body: #e6ffe0;
    --color-title-lesson: #6b5f00;
    --color-title-section: red;
    --color-title-subsection: blue;
}

body {
    font-family: 'Montserrat', serif;
    font-size: 1.5rem;
    padding: 20px 20px 150px;
    /* min-height: 100vh; */
    /* display: flex; */
    /* flex-direction: column; */
    /* gap: 20px; */
    /* flex-wrap: wrap; */
    /* justify-content: center; */
    /* text-align: center; */
    /* align-items: center; */
    color: var(--color-font-body);
    background-color: var(--color-background-body);
}

.title-lesson {
    text-align: center;
    color: var(--color-title-lesson);
    text-shadow: 4px 2px 6px #43300088;
    /* ! for position: fixed */
    /* margin-bottom: 350px; */
}

.title-section {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--color-title-section);
    text-shadow: 4px 2px 6px #a17301bd;
}

.title-subsection {
    margin-top: 10px;
    margin-bottom: 15px;
    font-style: italic;
    color: var(--color-title-subsection);
    text-shadow: 4px 2px 6px #0114a1bd;
}

/* .part {
    display: flex;
    flex-direction: column;
    align-items: center;
} */

/* *======================================= */
/*! =============================== */
/* .part_1 {
    display: none;
} */
/*! 1.Верстка та адаптація мобільного меню без використання Java Script */
header {
    position: relative;
    width: 100%;
    max-width: 1024px;
    margin: 40px auto 50vh;
    padding: 35px 16px;
    /* padding: 35px 0px; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: 1px solid black;
}

.logo {
    font-size: 25px;
    font-weight: 600;
    flex-grow: 1;
    outline: 1px dashed darkgreen;
    
}

/*? nav-menu */
nav {
    /* width: 65%; */
    flex-grow: 3;
    outline: 2px dashed orangered;
}

/*? Приховуємо ці елементи в мобільному меню */
button.button,
input[type="checkbox"],
label {
    display: none;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: 2px dotted blue;
}

.nav-list__item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
}


.nav-list__link,
.join_block {
    font-size: 13px;
    font-weight: 400;
    /* outline: 1px dotted tomato; */
}

/*? join_block */
.join_block {
    flex-grow: 1;
    text-align: right;
    outline: 1px dashed green;
}

.join {
    padding: 0 20px;
    border: none;
    background: none;
    transition: opacity .5s;
}

.started {
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    background: #ffcc01;
    transition: opacity .5s;
}

.join:hover,
.started:hover {
    opacity: .7;
    cursor: pointer;
}

/*? mobile menu */
@media (max-width: 767px) {
    nav {
        order: 1;
        display: flex;
    }

    label {
        position: relative;
        display: block;
        height: 30px;
        width: 30px;
        margin-left: auto;
        background-color: aqua;
    }

    button.button {
        position: relative;
        height: 30px;
        width: 30px;
        margin-left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 1px solid blue;
        background-color: rgb(255, 198, 198);
    }

    label:hover {
        cursor: pointer;
    }

    label span.toggle-label {
        /* top: 15px;  */ /*todo old */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    label span.toggle-label,
    label span.toggle-label::before,
    label span.toggle-label::after {
        content: '';
        display: block;
        width: 24px;
        height: 4px;
        background-color: green;
        position: absolute;
        /* right: 0; */ /*todo old */
        transition: .5s;
    }
    button.button span.toggle-btn,
    button.button span.toggle-btn::before,
    button.button span.toggle-btn::after {
        content: '';
        display: block;
        width: 24px;
        height: 4px;
        background-color: green;
        position: absolute;
        /* right: 0; */
        transition: .5s;
    }

    label span.toggle-label::before {
        top: -8px;
        background-color: red;
    }
    button.button span.toggle-btn::before {
        top: -8px;
        background-color: red;
    }

    label span.toggle-label::after {
        top: 8px;
        background-color: blue;
    }
    button.button span.toggle-btn::after {
        top: 8px;
        background-color: blue;
    }

    .nav-list {
        display: none;
    }

    input[type="checkbox"]:checked~.nav-list {
        display: flex;
        flex-direction: column;
        outline: 2px dotted red;
    }
    button.button:active~.nav-list {
        display: flex;
        flex-direction: column;
        outline: 2px dotted red;
    }

    /*? +++++++++++++++++++++++++++++++++++++++++++ */
    /** green */
    input[type="checkbox"]:checked~label span.toggle-label {
        /* transform: rotate(-45deg); */ /*todo old */
        transform: translate(-50%, -50%) rotate(-45deg); 
    }
    /** green */
    button.button:hover > span.toggle-btn {
        transform: rotate(-45deg); 
    }
    
    /*! red */
    input[type="checkbox"]:checked~label span.toggle-label::before {
        top: 0;
        /* transform: rotate(0); */
    }
    /*! red */
    button.button:hover > span.toggle-btn::before {
        top: 0;
        /* transform: rotate(0); */
    }

    /*? blue */
    input[type="checkbox"]:checked~label span.toggle-label::after {
        top: 0;
        transform: rotate(90deg);
    }
    /*? blue */
    button.button:hover > span.toggle-btn::after {
        top: 0;
        transform: rotate(90deg);
    }
    /*? ___________________________________________ */

    .nav-list {
        position: absolute;
        top: 120%;
        left: 0;
        width: 100%;
        padding: 20px;
        background-color: rgb(255, 230, 198);
        box-shadow: 0 12px 8px #797979;
    }

    .nav-list__item {
        margin: 15px 0;
        outline: 1px solid olivedrab;
    }
}


/*! 2.Приклад мобільного меню з використанням Java Script */
.link2 {
    display: block;
    text-align: center;
}





/*? ______________________________________________________ */
/*! =============================== */
.part_0 {
    display: none;
}

/*! 0.Заголовок */