body,
html {
    overflow-x: hidden;
}

.container{
    max-width: unset !important;
    margin: 0 auto;
    padding: 0 1.875rem;
    width: 82.5rem !important;
}

@media screen and (min-width:1600px) {
    html {
        font-size: 17px !important;
    }
	
	.news .news-item {
		margin-right: 1.5rem;
	}
}

@media screen and (max-width:1599px) and (min-width:1400px) {
	html {
        font-size: 16px !important;
    }
}

@media screen and (max-width:1399px) and (min-width:1300px) {
    html {
        font-size: 15px !important;
    }
}

@media screen and (max-width:1299px) and (min-width:1200px) {
    html {
        font-size: 14px !important;
    }
}

@media screen and (max-width:1119px) and (min-width:1100px) {
    html {
        font-size: 13px !important;
    }
}

@media screen and (max-width:1099px) and (min-width:1050px) {
    html {
        font-size: 12px !important;
    }
}

@media screen and (max-width: 1049px) and (min-width: 992px) {
    html {
        font-size: 11px !important;
    }

	.thumbnails-wrapper {
		width: auto;
	}
}

@media (min-width: 992px) {
    .ratio-lg-21x9 {
        --bs-aspect-ratio: 42.857% !important; 
    }
}

@media (max-width: 991px) {
	.container {
        width: 100% !important;
		padding: 0 0.9375rem;
    }
}

@media (max-width: 991px) {

    .scroll-gallery .gallery-item.is-active {
        width: 85vw;
    }

    .scroll-gallery .gallery-item {
        width: 85vw;
        margin-right: 0.9375rem;
    }

    .news .news-item {
        width: 85vw;
        margin-right: 0.9375rem;
        min-height: 18.75rem;
    }

    .news .news-item.is-active {
        width: 85vw;
    }

    .catalog-items .col-lg-3 {
        margin-bottom: 30px;
    }

    .thumbnails-wrapper {
        width: 100%;
        justify-content: space-between !important;
    }
}

/* Адаптивность для мобильных (< 768px) */
@media (max-width: 767px) {
    .form-horizontal-custom {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .form-horizontal-custom .custom-input-group {
        max-width: 100%;
        flex-basis: 100%;
        width: 100%;
    }

    .form-horizontal-custom .custom-btn-submit {
        width: 100%;
    }

    .gallery-thumb {
        min-width: auto; /* меньше ширина */
        aspect-ratio: 1 / 1; /* квадрат сохраняется */
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
}

@media screen and (max-width:550px) {
    :root {
        --font-size-xxl: 5rem;
        --font-size-h1: calc(1.375rem + 1.5vw);
        --font-size-h2: 1.5rem;
		--font-size-h3: 1.33rem;
        --font-size-h4: 1.185rem;
        --font-size-h5: 1.05rem;
        --font-size-h6: 0.9375rem;
        --font-size-subtitle: 0.9375rem;
        --font-size-p: 1rem;
        --font-size-14: 0.875rem;
        --font-size-13: 0.8125rem;
        --font-size-small: 0.75rem;
        --font-size-xsmall: 0.625rem;
		
		--btn-border-radius-50: 2.5rem;
		--btn-border-radius-40: 1.875rem;
		
		--accordion-border-radius: 1.875rem;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА ГЛАВНАЯ */
    /* ------------------------------------- */

    .breadcrumbs_section {
        margin-top: 1.25rem;
    }

    .hero {
        width: 100%;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: space-between;
        background-image: url(/assets/img/hero_mobile_bg.png);
        background-size: 100% 100%;
        background-position: top center;
        background-repeat: no-repeat;
        border-radius: var(--btn-border-radius-50);
        padding-bottom: 2.1875rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, -0.6rem + 10vw, 2.1rem) !important;
    }

    .hero .lead {
        gap: 0.9375rem;
        padding-bottom: 10rem;
    }

    .btn_accent {
        width: 100%;
        font-size: var(--font-size-p);
    }

    .btn-border {
        width: 100% !important;
        background: var(--color-text-light);
        border: 0.0625rem solid var(--color-secondary);
        color: var(--color-text-dark);
        font-size: var(--font-size-p);
        text-align: center;
    }

    .call_to_action {
        padding: 1rem 1rem 0 1rem;
    }

    .call_to_action .card {
        margin-top: 15rem !important;
        position: absolute;
        padding: 0 0.9375rem;
    }

    .call_to_action .card-text {
        font-size: var(--font-size-13) !important;
        line-height: var(--line-height-p);
        letter-spacing: var(--letter-spacing-tight);
        font-weight: var(--font-weight-regular);
    }

    .homepage .catalog_categories {
        padding-top: 10rem;
        padding-bottom: 3.75rem;
    }

    .catalog .card {
        min-height: 50vh !important;
		border-radius: var(--btn-border-radius-40);
    }

    .catalog span {
        font-size: var(--font-size-h6);
    }

    #cardMobileSlider .carousel-item {
        min-height: 40.625rem !important;
        align-items: stretch;
    }

    #cardMobileSlider .carousel-item.active {
        min-height: 40.625rem !important;
        align-items: stretch;
    }

    .catalog .carousel button {
        display: flex;
        width: 3rem;
        height: 3rem;
        padding: 0.625rem;
        flex-direction: column;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: center;
        align-items: center;
        border-radius: var(--btn-border-radius-50);
    }

    .catalog .carousel button svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .catalog .carousel button:focus,
    .catalog .carousel button:hover,
    .catalog .carousel button:active {
        box-shadow: none !important;
        outline: none !important;
        border: none !important;
    }

    .catalog .carousel [data-bs-slide="prev"] {
        background-color: var(--color-bg-light);
    }

    .catalog .carousel [data-bs-slide="next"] {
        background-color: var(--color-primary);
    }

    .catalog [data-bs-slide="prev"] svg {
        fill: white;
    }

    .catalog [data-bs-slide="next"] svg {
        fill: white;
    }

    .homepage .about_us {
        padding-bottom: 3.75rem;
    }

    .about_us img {
        aspect-ratio: 4/3;
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: var(--btn-border-radius-30);
    }

    .homepage .services {
        padding-bottom: 3.75rem;
    }

    .services span {
        font-size: var(--font-size-h6);
    }

    #servicesCarousel img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: var(--btn-border-radius-30);
    }

    .stage-content {
        min-height: 45vh !important;
    }

    .stages .title {
        font-size: var(--font-size-h5) !important;
    }

    .stages .desc {
        font-size: var(--font-size-p) !important;
    }

    .stages .stage_1 {
        background-size: 50%;
    }

    .stages .stage_4 {
        background-size: 53%;
    }

    .stages .stage_7 {
        background-image: url(../img/stage_7_bg_m.png);
        background-size: cover;
        background-position: bottom center;
        background-repeat: no-repeat;
    }

    .homepage .catalog_main {
        padding-top: 3.75rem;
        padding-bottom: 3.75rem;
    }
	
	.our_works .container-fluid {
		width: 100%;
	}

    .scroll-gallery-wrapper {
		min-width: 100%;
		padding-left: 0.9375rem;
        padding-bottom: 50px;
    }
	
	.news .container-fluid {
		width: 100%;
	}

    .scroll-news-wrapper {
		padding-left: 0.9375rem;
    }

    .scroll_navigation {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        justify-content: center;
        width: 100%;
        padding-bottom: 3rem;
    }
	
	.about .scroll_navigation {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        justify-content: center;
        width: 100%;
        padding-bottom: 3rem;
    }

    .scroll_news_navigation {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        justify-content: center;
        width: 100%;
        padding-bottom: 7rem;
    }

    .homepage .news {
        padding-top: 3.75rem;
        padding-bottom: 5rem;
    }

    .call_to_action_footer .title {
        font-size: var(--font-size-h2) !important;
        color: var(--color-bg-light);
    }

    .call_to_action_footer .lead {
        font-size: var(--font-size-h6) !important;
    }

    .call_to_action_footer .btn_cta {
        max-width: 100%;
    }

    #yandex-map-container {
        height: 20rem !important;
    }

    .contacts_info p {
        font-size: var(--font-size-p) !important;
    }

    .contacts_info h3 {
        font-size: var(--font-size-h4) !important;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА О КОМПАНИИ */
    /* ------------------------------------- */
    .hero_about_bg {
        position: relative;
        width: 100%;
        min-height: 25rem;
        background-image: url('../img/about/hero_m.jpg');
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
        border-radius: var(--btn-border-radius-50);
        margin-top: 7rem;
    }

    .absolute_mobile_title {
        margin-top: -7rem;
    }

    .about .list_advantages {
        padding-bottom: 3.75rem;
    }

    .list_advantages .advantage_item {
        min-height: 9.375rem;
        padding: 1.5625rem 1.875rem;
    }
	
	.mission {
		margin-bottom: var(--margin-bottom-60);
	}

    /* ------------------------------------- */
    /* СТРАНИЦА ШАБЛОН ОДНОЙ УСЛУГИ */
    /* ------------------------------------- */
    .service-page-template .services_section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .service-page-wrapper .services_section {
        margin-top: var(--margin-top-40);
    }

    .service-page-wrapper .our_works {
        margin-top: var(--margin-top-60);
        margin-bottom: var(--margin-bottom-60);
    }

    .services_section .d-grid img {
        aspect-ratio: 1 / 1;
        border-radius: var(--btn-border-radius-40);
    }

    .one-service-page h1 {
        font-size: var(--font-size-h2) !important;
        padding-right: 0rem;
    }
    
    .one-service-page p {
        padding-right: 0rem;
    }

    .one-service-page img {
        border-radius: var(--btn-border-radius-40);
    }

    /* ------------------------------------- */
    /* СТРАНИЦА КАТАЛОГ
    /* ------------------------------------- */
    .catalog-items {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    .catalog-page .card {
        border-radius: var(--btn-border-radius-40);
    }

    .catalog-page .card img {
        width: 100%;
        aspect-ratio: 1 / 1 !important;
        border-radius: var(--btn-border-radius-30);
        object-fit: cover;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА ТОВАРА
    /* ------------------------------------- */
    .product_section {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    .product_section .btn_accent {
        min-width: 100%;
    }

    .product-page .related-products {
        padding-bottom: 3.75rem;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА ПРОЕКТЫ
    /* ------------------------------------- */
    .projects-page .projects_section {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА НОВОСТИ
    /* ------------------------------------- */
    .news-page .news_section {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА SINGLE POST
    /* ------------------------------------- */
    .single-post .single_post_section {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    /* ------------------------------------- */
    /* СТРАНИЦА КОНТАКТЫ */
    /* ------------------------------------- */
    .contacts .contacts_section {
        padding-top: 1.875rem;
        padding-bottom: 3.75rem;
    }

    .contacts_section 
    .contacts_info 
    .subtitle {
        font-size: var(--font-size-14) !important;
        color: var(--color-text-dark) !important;
    }

    .custom-modal-content h3 {
        font-size: var(--font-size-h3) !important;
    }

    .custom-modal-content h2 {
        font-size: var(--font-size-h5) !important;
    }

}