@media (max-width: 1600px) {
    .learning {
        & :nth-child(3) {
            top: 450px;
            left: 0;
        }
        & :nth-child(5) {
            bottom: 450px;
            right: 0;
        }
    }

    .practice {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        box-sizing: border-box;

        h3 {
            width: 100%;
            max-width: 100%;
        }

        figure, a {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0;
            left: 0 !important;
            right: 0 !important;
            box-sizing: border-box;

            &:nth-child(3),
            &:nth-child(4),
            &:nth-child(5),
            &:nth-child(6),
            &:nth-child(7) {
                width: 100% !important;
                max-width: 100% !important;
            }

            img {
                max-width: 100%;
                height: auto;
            }

            figcaption {
                max-width: 100%;
                word-wrap: break-word;
            }
        }
    }
}

@media (max-width: 1440px) {
    .program {
        flex-direction: column;

        article {
            &:nth-child(1) {
                width: 100%;

                img {
                    right: 5px;
                    top: -5px;
                }

                .bl {
                    width: 160px;
                }
            }

            &:nth-child(2) {
                width: 100%;
            }
        }
    }
}

@media (max-width: 1250px) {
    .projects {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        max-width: 591px;

        > * {
            grid-area: auto !important;
        }

        & :nth-child(5) {
            grid-area: auto; 
            order: -1;  
        }
    }
}

@media (max-width: 1200px) {
    nav, section {
        max-width: 100%;
    }

    h1 {
        max-width: 100%;
    }

    header {
        section {
            .header_background {
                .header_background_left_info {
                    padding-left: 40px;

                    h2 {
                        width: 100%;
                        max-width: 600px;
                    }
                }
            }
        }
    }

    .program {
        flex-direction: column;

        article {
            &:nth-child(1),
            &:nth-child(2) {
                width: 100%;
            }
        }
    }

    .practice {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;

        div {
            grid-area: 1 / 1 / 2 / 3;
        }

        figure, a {
            width: 100% !important;
            left: 0 !important;
            right: 0 !important;
        }
    }

    .learning {
        width: 100%;
        height: auto;
        position: relative;
        padding: 40px;

        p {
            position: static !important;
            width: 100%;
            box-sizing: border-box;
            max-width: 635px;

            &::before {
                position: relative;
                left: -40px;
            }
        }

        h3{
            order: -1;
        } 
    }

    .Advantages {
        article {
            padding: 30px 20px;

            div {
                width: 100%;
                max-width: 800px;
            }
        }
    }

    .achievements {
        max-width: 100%;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;

        .achievements_slider {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;

            .achievements_slider_container {
                width: 100%;
                max-width: 100%;
            }

            .achievements_slide {
                flex-direction: column;
                height: auto;
                padding: 30px;
                max-width: 100%;
                box-sizing: border-box;

                .achievements_left,
                .achievements_border {
                    width: 100%;
                    max-width: 100%;
                }

                .achievements_border {
                    display: flex;
                    flex-direction: column;
                }

                .achievements_right {
                    width: 100%;
                    padding: 40px 10px 40px 20px;
                    max-height: 500px;
                    overflow: hidden;

                    .achievements_right_content {
                        padding-right: 10px;
                    }
                }
            }

            .slider_btn {
                top: 70px;
                font-size: 28px;
                flex-shrink: 0;
            }
        }
    }

    footer {
        section {
            max-width: 100%;
            width: 100%;
            box-sizing: border-box;
            padding: 0 20px;

            .social_links {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;

                .social_links_communication {
                    width: 100%;
                    max-width: 100%;
                    box-sizing: border-box;
                }
            }
        }
    }
}

@media (max-width: 1040px) {

    .Program_manager {
        .Program_manager_info {
            flex-direction: column;
            gap: 20px;

            article {
                width: 100%;
                max-width: 100%;

                figure {
                    align-items: flex-start;
                }
            }

            img {
                width: 100%;
                max-width: 100%;
            }
        }
    }
}

@media (max-width: 1140px) {
    .Advantages {
        article {
            ul {
                grid-template-columns: 1fr !important;
                grid-template-rows: repeat(4, 1fr);

                li {
                    grid-area: auto !important;
                }
            }
        }
    }
}

@media (max-width: 1130px) {
    .achievements {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        box-sizing: border-box;

        .achievements_slider {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;

            .achievements_slider_container {
                width: 100%;
                max-width: 100%;
            }

            .achievements_slide {
                flex-direction: column;
                align-items: center;
                height: auto;
                max-width: 100%;
                width: 100%;
                gap: 16px;
                box-sizing: border-box;
            }
        }
    }
}

@media (max-width: 968px) {
    header {
        nav {
            menu {
                flex-wrap: wrap;
                gap: 10px;
            }

            img {
                max-width: 180px;
            }
        }

        section {

            .header_background {

                .header_background_left_info {
                    padding-left: 0;
                    padding-bottom: 30px;
                    align-items: center;
                    text-align: center;

                    h1,
                    h2 {
                        text-align: center;
                    }
                }

                .header_background_right {
                    display: none;
                }
            }
        }
    }

    .program {
        article {
            padding: 30px 20px;
        }
    }

    .Advantages {
        height: auto;

        article {
            ul {
                grid-template-columns: 1fr;
                grid-template-rows: auto;

                li {
                    grid-area: auto !important;
                }
            }
        }
    }

    .practice {
        grid-template-columns: 1fr;

        div {
            grid-area: 1 / 1 / 2 / 2;
        }

        h3,
        h4 {
            text-align: center;
            width: 100%;
        }
    }

    .Program_manager {
        padding: 0 20px;
    }

    .speakers article{
        flex-direction: column;
        height: auto;
        padding: 28px;

        div:nth-child(1){
            padding-bottom: 28px;
        }

        div p{
            padding: 0;
        }

        h5{
            width: 100%;
            box-sizing: border-box;
        }

        img{
            width: 100%;
        }
    }

    footer {
        section {
            max-width: 100%;
            width: 100%;
            box-sizing: border-box;
            padding: 0 20px;

            .social_links {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;

                .social_links_communication {
                    width: 100%;
                    max-width: 100%;
                    box-sizing: border-box;
                }
            }
        }
    }
}

@media (max-width: 640px) {

    header {
        margin-bottom: 40px;
        background: linear-gradient(#2928288c), url(../../assets/img/background.jpg);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        height: 100vh;

        nav:not(.bm-nav) {
            padding: 5px;
            position: relative;
            justify-content: center;
            background: none;
            box-shadow: none;

            .burger-menu {
                display: flex;
                order: 1;
            }

            img {
                max-width: 140px;
                margin-top: 0;
            }

            menu.nav-menu {
                display: none;
                width: 100%;
                order: 3;
                margin-top: 0;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background-color: #f5f5f5;
                border-radius: 0 0 20px 20px;
                padding: 20px;
                box-shadow: 0px 4px 20px 0px #ccc;
                z-index: 1000;
                opacity: 0;
                transform: translateY(-10px);
                transition: opacity 0.3s ease, transform 0.3s ease;

                &.active {
                    display: flex;
                    opacity: 1;
                    transform: translateY(0);
                }

                li {
                    width: 100%;

                    a {
                        display: block;
                        padding: 10px 0;
                        font-size: 18px;
                        transition: color 0.3s ease;
                    }
                }
            }
        }

        .bm-nav{
            display: block;
            position: fixed;
            right: 16px;
            top: 29px;
            background-color: #f5f5f5;
            box-shadow: 0px 0px 20px 0px #ccc;
            width: auto;
            border-radius: 20px;
            padding: 10px;
            z-index: 1001;
            height: auto;

            .burger-menu {
                display: flex;
            }

            menu.nav-menu {
                display: none;
                min-width: 200px;
                width: max-content;
                max-width: 250px;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                position: absolute;
                top: calc(100% + 10px);
                right: 0;
                background-color: #f5f5f5;
                border-radius: 0 0 20px 20px;
                padding: 20px;
                box-shadow: 0px 4px 20px 0px #ccc;
                z-index: 1000;
                opacity: 0;
                transform: translateY(-10px);
                transition: opacity 0.3s ease, transform 0.3s ease;

                &.active {
                    display: flex;
                    opacity: 1;
                    transform: translateY(0);
                    border-radius: 20px;
                }

                li {
                    width: 100%;

                    a {
                        display: block;
                        padding: 10px 0;
                        font-size: 18px;
                        transition: color 0.3s ease;
                    }
                }
            }
        }

        section {
            padding: 0;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;

            .header_background {
                background: none;
                padding: 0 10px;
                padding-bottom: 178px;
                justify-content: center;

                .header_background_left_info {
                    gap: 20px;

                    button {
                        padding: 16px 24px;
                        font-size: 18px;
                    }
                }
            }
        }
    }

    main {
        > section {
            margin-bottom: 40px;
        }
    }

    .program {
        flex-direction: column;
        gap: 20px;

        article {
            padding: 20px 15px;
            gap: 20px;

            &:nth-child(1) {
                padding-bottom: 40px;

                .bl {
                    width: 110px;
                }                
            }

            div {
                flex-wrap: wrap;
            }
        }
    }

    .Advantages {
        article {
            padding: 20px 15px;

            div {
                padding: 0;
            }

            h3 {
                margin-bottom: 15px;
            }

            ul {
                gap: 15px;

                li {
                    padding: 15px;
                    gap: 16px;

                    img {
                        margin-right: 0;
                        margin-bottom: 10px;
                        width: 44px;
                        height: 44px;
                    }
                }
            }
        }
    }

    .practice {
        gap: 15px;
        margin: 40px 0;

        div {
            padding: 20px 15px;
        }

        figure, a {
            padding: 15px;
            gap: 15px;
            flex-direction: column;
            text-align: center;

            img {
                width: 24px;
            }
        }
    }

    .entrance {
        gap: 20px;
        margin-bottom: 40px;

        article {
            padding: 25px 20px;
            height: auto;

            ul {
                gap: 20px;
            }
        }

        article:nth-child(2) p ,article:nth-child(3) li {
            background-size: 12px;
        }
    }

    .achievements {
        gap: 15px;
        margin: 40px 0;
        padding: 0 15px;
        box-sizing: border-box;

        .achievements_slider {
            gap: 10px;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;

            .achievements_slider_container {
                width: 100%;
                max-width: 100%;
            }

            .achievements_slide {
                padding: 20px 15px;
                flex-direction: column;
                max-width: 100%;
                box-sizing: border-box;

                .achievements_left {
                    width: 100%;
                    max-width: 100%;
                    padding: 20px 0;

                    h4 {
                        padding: 12px;
                    }

                    h5 {
                        max-width: 100%;
                    }
                }

                .achievements_border {
                    width: 100%;
                    max-width: 100%;
                    display: flex;
                    flex-direction: column;
                }

                .achievements_right {
                    width: 100%;
                    padding: 25px 15px;
                    box-sizing: border-box;
                    max-height: none;
                    overflow: visible;

                    .achievements_right_content {
                        width: 100%;
                        padding-right: 0;
                        box-sizing: border-box;

                        div {
                            padding: 15px;
                            width: 100%;
                            box-sizing: border-box;
                        }
                    }
                }
            }

            .slider_btn {

                font-size: 24px;
                flex-shrink: 0;
            }
        }
    }

    .Program_manager {
        margin-bottom: 20px;
        padding: 0 15px;

        h4 {
            margin-bottom: 20px;
            text-align: center;
        }

        .Program_manager_info {
            flex-direction: column;
            gap: 20px;

            article:nth-child(1){
                flex-direction: column;

                img:nth-child(1){
                    width: 100%;
                    max-width: 640px;
                }

                figure img {
                    width: 32px;
                }
            }

            article {
                padding: 20px 15px;
                flex-direction: column;
                align-items: flex-start;
                text-align: left;
                max-width: 100%;
                width: 100%;

                img {
                    margin-bottom: 20px;
                    width: 100%;
                    max-width: 290px;
                }

                figure {
                    align-items: flex-start;

                    img {
                        width: 45px;
                        margin: 15px 0;
                    }
                }

                p {
                    width: 100%;
                    margin-top: 15px;
                }
            }

            img {
                width: 100%;
                max-width: 100%;
                border-radius: 20px;
            }
        }
    }

    .experts{
        margin: 0;
        margin-top: 280px;
        margin-bottom: 220px;
    }

    footer {
        section {
            padding: 0 15px;
            max-width: 100%;
            width: 100%;
            box-sizing: border-box;

            h4 {
                margin-bottom: 20px;
                text-align: center;
            }

            .social_links {
                grid-template-columns: 1fr;
                grid-template-rows: auto;
                gap: 15px;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;

                .social_links_communication {
                    grid-area: auto !important;
                    padding: 20px 15px;
                    width: 100%;
                    max-width: 100%;
                    box-sizing: border-box;

                    &:nth-child(3) {
                        aspect-ratio: auto;
                    }

                    & figure {
                        img {
                            width: 20px;
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 480px) {
    header {
        nav {
            img {
                max-width: 120px;
            }
        }

        section {
            .header_background {

                .header_background_left_info {
                    gap: 15px;
                }
            }
        }
    }

    .program {
        article {
            div {
                .bl {
                    width: 150px;
                    right: -30px;
                    top: -50px;
                }
            }
        }
    }

    .achievements {
        .achievements_slider {
            .achievements_slide {
                .achievements_left {
                    h4 {
                        padding: 10px;
                    }
                }
            }

            .slider_btn {

                font-size: 20px;
            }
        }
    }
}

@media (max-width: 360px) {

    header {
        nav {
            padding: 8px;

            
            img {
                max-width: 100px;
            }
            
        }

        section {
            .header_background {
                min-height: 300px;
                padding: 12px 8px;

                .header_background_left_info {
                    button {
                        padding: 12px 20px;
                    }
                }
            }
        }
    }

    .program {
        article,
        .Advantages article,
        .entrance article,
        .achievements .achievements_slide {
            padding: 15px 10px;
        }
    }

    .achievements {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;

        .achievements_slider {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            gap: 5px;

            .achievements_slider_container {
                width: 100%;
                max-width: 100%;
            }

            .achievements_slide {
                max-width: 100%;
                width: 100%;
                box-sizing: border-box;
            }

            .slider_btn {
                display: none;
            }
        }
    }

    footer {
        section {
            padding: 0 10px;
            max-width: 100%;
            width: 100%;
            box-sizing: border-box;

            .social_links {
                gap: 12px;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;

                .social_links_communication {
                    padding: 15px 12px;
                    width: 100%;
                    max-width: 100%;
                    box-sizing: border-box;
                }
            }
        }
    }
}
