@media(max-width: 1540px){
    :root{
        --container: 1280px;
    }
    header .logo p{
        display: none;
    }
    .profily_btn{
        gap: 8px;
    }
    .profily_btn .btn_main{
        width: 100%;
        text-align: center;
    }
    .sale_div img{
        height: auto;
        max-height: 100%;
    }
    .sale_div{
        padding: 32px;
    }
}

@media(max-width: 1320px){
    :root{
        --container: 1100px;
    }
    ul.nav li a{
        font-size: 13px;
    }
    .header_top .header_top_row_adress,
    .header_top ul.nav{
        gap: 24px;
    }
    .header_bottom ul.nav li a{
        font-size: 13px;
    }
    #main{
        padding: 120px 0px 200px 0px;
        margin-top: 160px;
    }
    h1{
        font-size: 40px;
    }
    #main p, #free_form p,
    .portfolio_description p.adres,
    .header_center_end a{
        font-size: 18px;
    }
    .veka_partner{
        padding: 8px 12px;
    }
    .veka_partner p span{
        font-size: 12px;
    }
    .logo img{
        height: 30px;
    }
    .header_center_end p{
        font-size: 11px;
    }
    .header_center_social a{
        height: 36px;
    }
    header .header_center_social p{
        display: none;
    }
    .btn_main, input, select,
    a, p, span, div{
        font-size: 15px;
    }
    #free_form h2,
    .portfolio_content p.price span{
        font-size: 28px;
    }
    .button_swiper{
        height: 44px;
    }
    .prev, .next{
        top: calc(50% - 22px);
    }
    .logo_veka_profily{
        max-width: 180px;
    }
    h2{
        font-size: 32px;
    }
    .profily_div_title h3, .profily_div_price span{
        font-size: 24px;
    }
    .profily_div_main{
        width: calc(33% - 13px);
    }
    .profily_tab{
        font-size: 13px;
        padding: 6px 14px;
    }
    .header_bottom .container{
        padding: 16px;
    }
    .profily_div_main img{
        height: 240px;
    }
    .sale_div_text h3{
        font-size: 20px;
    }
    .portfolio_content{
        padding: 32px;
    }
    .sale_div_text{
        width: 70%;
    }
    .otzyvy_div, .faq_header,
    .faq_body, .charakteristiki_okna_div,
    .sale_div{
        padding: 24px;
    }
    .footer_end a{
        font-size: 12px;
    }
    .etaps_div img{
        height: 40px;
    }
    .etaps_div_header{
        gap: 16px;
    }
    .top_page{
        padding-top: 220px;
    }
    .charakteristiki_okna_div{
        width: calc(50% - 24px);
    }
    #blog_single_page .container{
        max-width: 880px;
    }
}

@media(max-width: 1140px){
    :root{
        --container: 900px;
    }
    .header_top ul.nav, .veka_partner,
    .header_bottom{
        display: none;
    }
    .header_top_row_adress{
        width: 100%;
        justify-content: end;
    }
    header .header_center_social p{
        display: block;
        width: 120px;
    }
    .btn_main{
        padding: 18px 28px;
    }
    #main{
        margin-top: 120px;
    }
    .header_center{
        border-bottom: 1px solid #e6e0d8;
    }
    #main{
        padding: 100px 0px 200px 0px;
    }
    #free_form .container{
        padding: 32px;
    }
    .swiper_portfolio_main{
        height: 320px;
    }
    .portfolio_content .portfolio_description{
        height: 110px;
    }
    #project_page .project_gallery .swiper_portfolio_main{
        height: 360px;
    }
    .prev, .next{
        top: calc(50% - 20px);
    }
    .button_swiper{
        height: 40px;
    }
    .button_swiper img{
        width: 20px !important;
    }
    .profily_tab{
        font-size: 12px;
        padding: 5px 8px;
    }
    .profily_div_main img{
        height: 200px;
    }
    img.vertical{
        display: none;
    }
    .about_main_img{
        width: 40%;
    }
    .about_main_text{
        width: 50%;
    }
    .etaps_div{
        width: calc(50% - 24px);
    }
    .top_page{
        padding-top: 160px;
    }
    .profily_main_image{
        width: 40%;
    }
    .profily_main_text h1{
        font-size: 28px;
    }
    .glass_card.acf-filters{
        width: 100%;
    }
    .profily_filter_container{
        top: 110px;
    }
    .acf-filters-results{
        width: 67%;
    }
    .profily_filter_column{
        width: calc(33% - 24px);
    }
    .profily_main_text{
        width: calc(60% - 24px);
    }
    .mt-56{
        margin-top: 40px;
    }
    .gap-56{
        gap: 40px;
    }
    h1{
        font-size: 36px;
    }
    .portfolio_description p.adres{
        font-size: 16px;
    }
    .cont_text{
        padding: 24px;
        gap: 24px;
    }
    #blog_single_page figure img, #blog_single_page img{
        max-height: 480px;
    }
    .blog_card_body h3{
        font-size: 18px;
    }
    .blog_card_body{
        padding: 16px;
    }
    .swiper_portfolio_thumbs{
        aspect-ratio: 8;
    }
    .portfolio_content{
        padding: 24px;
    }
    .portfolio_div_price{
        display: none;
    }
    .blog_toc{
        padding: 24px;
    }
    .about_main_img .flex{
        display: none;
    }
    img.vertical{
        width: 100%;
        display: block;
    }
}

@media(max-width: 991px){
    :root{
        --container: 700px;
    }
    .project_page > section{
        padding-top: 64px;
    }
    h1.project_hero_title{
        font-size: 36px;
        max-width: 640px;
    }
    .project_hero_media{
        width: min(420px, 68%);
    }
    .project_text_grid{
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 28px;
    }
    .project_text_title{
        font-size: 30px;
        line-height: 1.15;
    }
    .project_details_layout{
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 20px;
    }
    .project_details_row{
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 12px 20px;
    }
    .project_assets_duo{
        gap: 16px;
    }
    .project_assets_duo--portrait .project_assets_duo_item--b{
        margin-top: 24px;
    }
    .project_assets_trio,
    .project_assets_trio_row,
    .project_assets_quad{
        gap: 16px;
    }
    .gap-24{
        gap: 16px;
    }
    .gap-32{
        gap: 24px;
    }
    section, #portfolio{
        padding-top: 80px;
    }
    footer{
        margin-top: 80px;
    }
    header .header_center_social{
        display: none;
    }
    #free_form input[type="text"]{
        width: 100%;
    }
    #free_form form .flex{
        flex-grow: 1;
    }
    .portfolio_description{
        margin: 0;
    }
    #free_form .container{
        gap: 8px;
    }
    .blog_list .blog_div{
        width: calc(50% - 8px);
    }
    .blog_toc{
        padding: 24px;
    }
    #blog_single_page h2,
    .blog_single_section h2,
    .blog_single_section{
        scroll-margin-top: 120px;
    }
    #main p, #free_form p, .portfolio_description p.adres{
        font-size: 16px;
    }
    .swiper_portfolio_main{
        height: 280px;
    }
    #project_page .project_gallery .swiper_portfolio_main{
        height: 320px;
    }
    .portfolio_content .portfolio_description{
        height: 100px;
    }
    .portfolio_title, .portfolio_content p.price{
        font-size: 20px;
    }
    .portfolio_content p.price span{
        font-size: 24px;
    }
    .profily_div_main{
        width: calc(50% - 8px);
    }
    #about_main .container, 
    #kak_podobrat_profily .container{
        flex-direction: column;
    }
    .about_main_img, .about_main_text,
    .profily_main_image, .profily_main_text,
    .kak_podobrat_profily_text,
    #kak_podobrat_profily img, .profily_filter_column,
    .acf-filters-results{
        width: 100%;
    }
    .about_main_img .flex{
        flex-direction: column;
        display: block;
    }
    .about_main_img img{
        width: calc(60% - 8px);
        height: auto;
    }
    footer .container{
        flex-wrap: wrap;
    }
    .footer_div{
        width: calc(50% - 8px);
    }
    .profily_main_content{
        flex-direction: column;
        align-items: start;
        justify-content: start;
    }
    .preimushhestva_profily_div h3{
        width: 80%;
    }
    #podobnye_profily .profily_div_main:nth-child(3){
        display: none;
    }
    .profily_archive_row{
        flex-direction: column;
    }
    .cont_text, .map{
        width: 100%;
    }
    .map{
        aspect-ratio: 16/11;
    }
    .cont_row{
        flex-direction: column-reverse;
    }
    #blog_single_page .container{
        max-width: var(--container);
    }
}

@media(max-width: 770px){
    :root{
        --container: 500px;
    }
    .header_top_row_adress .flex:last-child,
    .header_center_end p, .header_center_end .btn_main,
    .logo_veka_profily{
        display: none;
    }
    .header_center_end a{
        font-size: 16px;
    }
    .top_page{
        padding-top: 140px;
    }
    .profily_main_image{
        aspect-ratio: 1.5;
    }
    .logo img{
        margin-bottom: 4px;
    }
    .preimushhestva_profily_div .flex{
        flex-direction: column-reverse;
        align-items: start;
        justify-content: start;
    }
    .charakteristiki_okna_div, .profily_div_main,
    .acf-filters-results .profily_div_main,
    .preimushhestva_profily_div h3{
        width: 100%;
    }
    .profily_btn .btn_main{
        width: calc(50% - 8px);
    }
    #main{
        margin-top: 100px;
    }
    h1{
        font-size: 32px;
    }
    h2{
        font-size: 28px;
    }
    #free_form h2, .portfolio_content p.price span{
        font-size: 24px;
    }
    .blog_list .blog_div{
        width: 100%;
    }
    #blog_single_page h2{
        font-size: 24px;
    }
    .blog_single_content{
        gap: 32px;
    }
    .blog_toc{
        padding: 20px;
    }
    #blog_single_page h2,
    .blog_single_section h2,
    .blog_single_section{
        scroll-margin-top: 100px;
    }
    .portfolio_item{
        flex-direction: column;
        align-items: start;
        justify-content: start;
    }
    .portfolio_gallery, .portfolio_content{
        width: 100%;
    }
    .swiper_portfolio_main{
        height: 320px;
    }
    #project_page .project_gallery .swiper_portfolio_main{
        height: 280px;
    }
    .project_page > section{
        padding-top: 48px;
    }
    h1.project_hero_title{
        font-size: 32px;
        max-width: none;
    }
    /* Hero image 80% centered on tablet/mobile */
    .project_hero_media{
        width: 80%;
        margin-top: 4px;
        margin-left: auto;
        margin-right: auto;
        align-self: center;
    }
    .project_hero_img,
    .project_hero_media{
        aspect-ratio: 4 / 5;
    }
    .project_details_row{
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px 0;
    }
    .project_details_key{
        padding-top: 0;
    }
    .project_text_title{
        font-size: 28px;
        letter-spacing: -0.02em;
    }
    .project_text_body p,
    .project_text_body li,
    .project_details_val,
    .project_details_val p,
    .project_details_val li{
        font-size: 15px;
    }
    /* Fluid mobile duo: column + staggered unequal widths (landscape-1 / portrait) */
    .project_assets_duo,
    .project_assets_duo--portrait{
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .project_assets_duo--landscape .project_assets_duo_item--a{
        width: 74%;
        margin-top: 0;
        margin-left: 0;
    }
    .project_assets_duo--landscape .project_assets_duo_item--b{
        width: 58%;
        margin-left: auto;
        margin-top: 0;
    }
    .project_assets_duo--portrait{
        justify-content: flex-start;
    }
    .project_assets_duo--portrait .project_assets_duo_item--a{
        width: 56%;
        margin-top: 0;
        margin-left: 0;
    }
    .project_assets_duo--portrait .project_assets_duo_item--b{
        width: 36%;
        margin-top: 0;
        margin-left: auto;
    }
    .project_assets_duo--landscape .project_assets_duo_item--a .project_asset_link{
        aspect-ratio: 3 / 2;
    }
    .project_assets_duo--landscape .project_assets_duo_item--b .project_asset_link{
        aspect-ratio: 3 / 2;
    }
    .project_assets_duo--portrait .project_assets_duo_item--a .project_asset_link,
    .project_assets_duo--portrait .project_assets_duo_item--b .project_asset_link{
        aspect-ratio: 3 / 4;
    }
    .project_assets_full .project_asset_link,
    .project_assets_trio_main .project_asset_link{
        aspect-ratio: 4 / 3;
    }
    .project_assets_trio_row,
    .project_assets_quad{
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .project_assets_trio_item .project_asset_link,
    .project_assets_quad_item .project_asset_link{
        aspect-ratio: 4 / 3;
    }
}

@media(max-width: 540px){
    .container{
        padding-left: 15px;
        padding-right: 15px;
    }
    h1.project_hero_title{
        font-size: 28px;
    }
    .project_text_title{
        font-size: 26px;
    }
    .project_assets_duo--landscape .project_assets_duo_item--a{
        width: 78%;
    }
    .project_assets_duo--landscape .project_assets_duo_item--b{
        width: 62%;
    }
    .project_assets_duo--portrait .project_assets_duo_item--a{
        width: 60%;
    }
    .project_assets_duo--portrait .project_assets_duo_item--b{
        width: 40%;
    }
    .header_top p{
        font-size: 11px;
    }
    .header_top img{
        height: 14px;
    }
    #free_form .container{
        margin-left: 15px;
        margin-right: 15px;
        width: calc(100% - 30px);
    }
    .etaps_div, .preimushhestva_profily_div,
    .profily_btn .btn_main{
        width: 100%;
    }
    .price_profily_page{
        flex-direction: column;
        align-items: start;
        justify-content: start;
        gap: 16px;
    }
    .footer_end .container, .profily_btn {
        flex-direction: column;
        align-items: start;
        justify-content: start;
    }
    .header_top p{
        font-size: 10px;
    }
    h2.small, h2{
        font-size: 24px;
    }
    .main_btn_row{
        gap: 8px;
    }
    #main{
        padding: 80px 0px 160px 0px;
    }
    .btn_main{
        width: 100%;
        text-align: center;
    }
    .header_top img{
        display: none;
    }
    #profily{
        margin-top: 60px;
        padding: 60px 0px;
    }
    #about_main, #portfolio,
    #podobnye_profily{
        padding-top: 60px;
    }
    #kak_podobrat_profily{
        margin-top: 60px;
        padding-top: 60px;
    }
    #charakteristiki_okna{
        padding-bottom: 60px;
    }
    .logo img{
        height: 26px;
    }
    #main{
        margin-top: 90px;
    }
    .top_page{
        padding-top: 120px;
    }
    .rank-math-breadcrumb p,
    .rank-math-breadcrumb p a,
    .rank-math-breadcrumb p span{
        font-size: 11px;
    }
    #blog_single_page figure img, #blog_single_page img{
        height: auto;
        max-height: inherit;
    }
}

@media(max-width: 380px){
    h1{
        font-size: 28px;
    }
    #free_form .container, .portfolio_content{
        padding: 24px;
    }
    #free_form form{
        gap: 8px;
    }
}