/*
 * Final responsive layer for Bitrix pages.
 * Loaded after page and component styles so the same mobile rhythm is shared
 * by the home page, production, assembly, projects, contacts and services.
 */

html,
body {
  max-width: 100%;
}

body {
  overflow-x: clip;
}

main,
main section,
main .container,
main .row,
main [class*="col-"],
body > section,
body > section .container,
body > section .row,
body > section [class*="col-"] {
  min-width: 0;
}

main img,
main video,
main iframe,
main svg,
body > section img,
body > section video,
body > section iframe,
body > section svg {
  max-width: 100%;
}

main img,
main video,
body > section img,
body > section video {
  height: auto;
}

main section[id] {
  scroll-margin-top: 92px;
}

@media (max-width: 1120px) {
  .header-shell.container {
    width: min(calc(100% - 40px), 960px);
    max-width: min(calc(100% - 40px), 960px);
  }
}

@media (max-width: 991.98px) {
  :root {
    --b2c-card-gap: 20px;
    --b2c-card-padding-text: 28px;
    --b2c-card-padding-photo: 22px;
  }

  main > section,
  .py-section-100,
  .py-section-80,
  .py-section-60 {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  main .pt-0,
  main section.pt-0,
  section.pt-0 {
    padding-top: 0 !important;
  }

  main .pb-0,
  main section.pb-0,
  section.pb-0 {
    padding-bottom: 0 !important;
  }

  .ash-section-title,
  main .ash-section-title.h1-title,
  main .ash-section-title.h2-title,
  main .ash-section-title.h2-title-36,
  main .ash-section-title.main-title,
  main .h2-title,
  main .h2-title-36 {
    font-size: clamp(34px, 5vw, 40px) !important;
  }

  .ash-section-lead,
  main .ash-section-lead {
    font-size: 17px !important;
  }

  .services-item,
  .company-card,
  .assembly-include-card,
  .choice-benefit-card,
  .power-item {
    min-height: 0;
  }

  div.submain-img,
  div.submain-img img {
    margin-top: 0;
  }

  div.submain-img {
    display: flex;
    min-height: 300px;
    align-items: flex-end;
  }

  div.submain-img img,
  img.submain-img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
  }

  #callbackModal .modal-dialog {
    width: min(calc(100% - 40px), 640px);
    max-width: 640px;
    margin-right: auto;
    margin-left: auto;
  }

  #callbackModal .modal-content {
    max-height: calc(100dvh - 32px);
    padding: 32px;
    overflow-y: auto;
  }

  .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 40px;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 991.98px) {
  .power-grid .power-item,
  .choice-benefit-card,
  .services-item,
  .b2c-price-factor,
  .b2c-project-card,
  .b2c-typical-card {
    transform: none !important;
  }

  .power-item__text-base,
  .choice-benefit-card__text-base {
    display: none !important;
  }

  .power-item__text-more,
  .choice-benefit-card__text-more {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .power-item__text,
  .choice-benefit-card__text {
    min-height: 0 !important;
  }

  .b2c-price-factor span {
    position: static;
    margin-top: auto;
    padding: 10px 12px;
    border: 1px solid rgba(219, 229, 255, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    opacity: 1;
    transform: none;
  }

  .b2c-price-factor:hover,
  .b2c-price-factor:focus,
  .b2c-price-factor:focus-visible {
    border-color: var(--b2c-line);
    background: #f6f9ff;
    box-shadow: var(--b2c-shadow);
  }

  .b2c-price-factor:hover strong,
  .b2c-price-factor:focus strong,
  .b2c-price-factor:focus-visible strong {
    color: var(--b2c-text);
  }

  .b2c-price-factor:hover span,
  .b2c-price-factor:focus span,
  .b2c-price-factor:focus-visible span {
    color: var(--b2c-muted);
  }

  .b2c-price-factor:hover .b2c-price-factor__icon,
  .b2c-price-factor:focus .b2c-price-factor__icon,
  .b2c-price-factor:focus-visible .b2c-price-factor__icon {
    opacity: 1;
    transform: none;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card {
    min-height: 190px;
    aspect-ratio: auto;
    gap: 18px;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card h3,
  .b2c-flow.b2c-flow--steps-only .b2c-step-card p {
    grid-area: auto;
    opacity: 1;
    transform: none;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card h3 {
    max-width: none;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card p {
    align-self: end;
    color: var(--b2c-muted);
    pointer-events: auto;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card:hover,
  .b2c-flow.b2c-flow--steps-only .b2c-step-card:focus-visible {
    border-color: var(--b2c-line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 32px rgba(35, 58, 120, 0.08);
    transform: none;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card:hover h3,
  .b2c-flow.b2c-flow--steps-only .b2c-step-card:focus-visible h3,
  .b2c-flow.b2c-flow--steps-only .b2c-step-card:hover p,
  .b2c-flow.b2c-flow--steps-only .b2c-step-card:focus-visible p {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 767.98px) {
  :root {
    --b2c-radius-card: 22px;
    --b2c-radius-panel: 26px;
    --b2c-card-padding-text-mobile: 22px;
    --b2c-card-padding-photo-mobile: 20px;
  }

  .container,
  .header-shell.container {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }

  .site-header {
    padding-top: 12px;
  }

  .header-shell {
    min-height: 52px;
  }

  .site-header .brand img {
    width: 116px;
    max-width: 116px;
  }

  .header-shell.is-menu-open {
    top: 12px;
    width: min(360px, calc(100vw - 20px));
    height: calc(100dvh - 12px);
    padding: 26px 20px 22px;
  }

  .header-shell.is-menu-open .nav-toggle {
    top: 22px;
    right: 18px;
  }

  .site-nav a,
  .site-nav a.is-active {
    min-height: 48px;
    padding: 13px 0;
  }

  main > section,
  .py-section-100,
  .py-section-80,
  .py-section-60,
  .b2c-home-section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  main .pt-0,
  main section.pt-0,
  section.pt-0 {
    padding-top: 0 !important;
  }

  main .pb-0,
  main section.pb-0,
  section.pb-0 {
    padding-bottom: 0 !important;
  }

  .ash-section-head,
  .assembly-kit-heading,
  .b2c-typical-projects__head,
  .b2c-scenarios-head {
    margin-bottom: 24px;
  }

  .ash-section-title,
  main .ash-section-title.h1-title,
  main .ash-section-title.h2-title,
  main .ash-section-title.h2-title-36,
  main .ash-section-title.main-title,
  main .h2-title,
  main .h2-title-36,
  .b2c-home-heading h2,
  .b2c-typical-projects__head h2,
  .b2c-request-panel__copy h2,
  .lstk-inline-request-card__copy h2 {
    max-width: 100%;
    font-size: clamp(30px, 8.7vw, 34px) !important;
    line-height: 1.08 !important;
    text-wrap: pretty;
  }

  .ash-section-lead,
  main .ash-section-lead,
  main p,
  main li,
  body > section p,
  body > section li {
    font-size: 16px;
    line-height: 1.52;
  }

  main .row,
  body > section .row {
    --bs-gutter-x: 20px;
  }

  .services-item,
  .assembly-include-card,
  .choice-benefit-card,
  .power-item,
  .b2c-step-card {
    min-height: 0 !important;
    padding: 22px !important;
  }

  .power-item__head,
  .choice-benefit-card__top {
    gap: 14px;
  }

  .power-item__title,
  .choice-benefit-card__title,
  .assembly-include-card__title {
    max-width: calc(100% - 62px);
    font-size: 21px !important;
  }

  .power-item__icon {
    --icon-size: 46px;
    width: 52px;
    height: 52px;
  }

  .choice-benefit-card__icon img {
    max-width: 52px;
  }

  .power-item__text-more,
  .choice-benefit-card__text-more,
  .assembly-include-card__list {
    font-size: 15px !important;
    line-height: 1.48;
  }

  div.submain-img {
    min-height: 0;
    margin-top: 24px;
  }

  div.submain-img img,
  img.submain-img {
    max-height: none;
  }

  .proizvodstvo-lstk-hero {
    padding-top: 12px;
    padding-bottom: 50px;
  }

  .proizvodstvo-lstk-hero .main-proizvodstvo-lstk-inner {
    min-height: 520px;
    padding: 28px 22px;
    border-radius: 26px;
  }

  .proizvodstvo-main-wrapper .proizvodstvo-lstk-hero__title span,
  .proizvodstvo-lstk-hero .proizvodstvo-lstk-hero__title span:first-of-type {
    font-size: clamp(32px, 9vw, 38px);
  }

  .proizvodstvo-lstk-hero__lead {
    font-size: 16px;
  }

  .proizvodstvo-lstk-hero .btn,
  .ash-video-feature-card__actions .btn,
  .b2c-home-hero__actions .btn,
  .b2c-home-center .btn {
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }

  .b2c-home-hero__media,
  .ash-video-feature-card {
    min-height: 520px;
    border-radius: 24px;
  }

  .b2c-home-hero__media {
    min-height: 620px;
  }

  .b2c-home-hero__content,
  .ash-video-feature-card__content {
    padding: 28px 22px;
  }

  .b2c-home-hero h1,
  .ash-video-feature-card__title {
    font-size: clamp(31px, 9vw, 36px);
  }

  .b2c-home-hero__motion-toggle {
    position: static;
    align-self: flex-end;
    flex: 0 0 auto;
    min-height: 44px;
    margin-bottom: 18px;
    padding: 9px 14px;
    font-size: 13px;
  }

  .b2c-typical-carousel {
    grid-auto-columns: minmax(280px, 88vw);
  }

  .b2c-typical-card__body,
  .b2c-project-card__body {
    min-height: 0;
    padding: 20px;
  }

  .b2c-build-slide__copy,
  .b2c-build-slide__media,
  .lstk-inline-request-card__content {
    padding: 20px;
  }

  .b2c-flow.b2c-flow--steps-only .b2c-step-card {
    min-height: 0;
  }

  .ash-objects-stat {
    min-height: 0;
  }

  .ash-object-card__title,
  .ash-object-card__works {
    min-height: 0;
    max-height: none;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .ash-object-card__facts {
    gap: 10px;
  }

  .ash-object-card__facts div {
    min-height: 0;
    padding: 12px;
  }

  .contacts-card-grid,
  .contacts-card-grid--main,
  .contacts-company-stats,
  .contacts-document-grid,
  .contacts-details-grid,
  .contacts-social-grid {
    gap: 14px;
  }

  .contacts-card,
  .contacts-company-stat {
    min-height: 0;
  }

  .contacts-request-card__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .contacts-request-card__media img {
    height: 100%;
  }

  .documentation-slide-wrapper {
    min-height: 0;
    padding: 22px;
    border-radius: 22px;
  }

  .young-team-wrapper {
    min-height: 0;
    margin-bottom: 0;
    padding-bottom: 24px;
  }

  .b2c-order-card {
    min-height: 520px;
    padding: 28px 22px;
    border-radius: 26px;
  }

  .b2c-order-card__content {
    min-height: 464px;
  }

  .b2c-faq .accordion-button,
  .b2c-home-section--faq .landing-faq-item summary {
    min-height: 64px;
    padding: 18px 58px 18px 20px;
    font-size: 16px;
    line-height: 1.4;
  }

  .b2c-home-section--faq .landing-faq-item p {
    padding: 0 20px 20px;
  }

  #callbackModal .modal-dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  #callbackModal .modal-content {
    max-height: calc(100dvh - 20px);
    padding: 26px 20px 22px;
    border-radius: 24px;
    overflow-y: auto;
  }

  #callbackModal .callback-modal-close {
    top: 14px;
    right: 14px;
  }

  #callbackModal .site-lead-form .perezvonim-form-body,
  #callbackModal .local-form .perezvonim-form-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #callbackModal .site-lead-form .form-control,
  #callbackModal .local-form .form-control {
    min-height: 52px;
  }

  #callbackModal .site-lead-form textarea.form-control,
  #callbackModal .local-form textarea.form-control {
    min-height: 104px;
  }

  .cookies__wrapper {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: calc(100% - 24px);
    max-width: none;
    margin: 12px auto 0;
    padding: 16px;
  }

  #yaMap {
    height: min(420px, 78vw);
    min-height: 320px;
  }

  footer.site-footer {
    padding-top: 42px;
  }

  .site-footer .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer .footer-contact {
    justify-self: start;
    min-width: 0;
  }

  .site-footer .footer-contact__link {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .container,
  .header-shell.container {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
  }

  .header-shell.is-menu-open {
    width: calc(100vw - 12px);
  }

  main > section,
  .py-section-100,
  .py-section-80,
  .py-section-60,
  .b2c-home-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .b2c-home-hero__media,
  .ash-video-feature-card,
  .proizvodstvo-lstk-hero .main-proizvodstvo-lstk-inner {
    min-height: 500px;
  }

  .b2c-home-hero__media {
    min-height: 620px;
  }

  .b2c-typical-carousel {
    grid-auto-columns: minmax(270px, 91vw);
  }

  .site-footer .footer-phone-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 620px) {
  .b2c-home-hero__media,
  .ash-video-feature-card,
  .proizvodstvo-lstk-hero .main-proizvodstvo-lstk-inner {
    min-height: 420px;
  }

  .b2c-home-hero__content,
  .ash-video-feature-card__content,
  .proizvodstvo-lstk-hero .main-proizvodstvo-lstk-inner {
    padding: 24px;
  }

  .header-shell.is-menu-open {
    padding-top: 22px;
  }

  .site-nav a,
  .site-nav a.is-active {
    min-height: 42px;
    padding: 10px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/*
 * Compact price factors on touch layouts.
 * The desktop cards remain image-led; tablet and mobile become readable rows.
 */
@media (max-width: 991.98px) {
  .b2c-price-factor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .b2c-price-factor,
  .b2c-price-factor:hover,
  .b2c-price-factor:focus,
  .b2c-price-factor:focus-visible {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-height: 156px;
    aspect-ratio: auto;
    align-items: center;
    gap: 8px 16px;
    padding: 14px;
    border: 1px solid var(--b2c-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(35, 58, 120, 0.07);
  }

  .b2c-price-factor__icon,
  .b2c-price-factor:hover .b2c-price-factor__icon,
  .b2c-price-factor:focus .b2c-price-factor__icon,
  .b2c-price-factor:focus-visible .b2c-price-factor__icon {
    position: static;
    grid-column: 1;
    grid-row: 1 / 3;
    width: 132px;
    height: 126px;
    border-radius: 16px;
    object-fit: cover;
    opacity: 1;
    transform: none;
  }

  .b2c-price-factor strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 19px;
    line-height: 1.2;
  }

  .b2c-price-factor span,
  .b2c-price-factor:hover span,
  .b2c-price-factor:focus span,
  .b2c-price-factor:focus-visible span {
    position: static;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--b2c-muted);
    font-size: 14px;
    line-height: 1.42;
    opacity: 1;
    transform: none;
  }

  .b2c-price-factor-grid .b2c-price-factor:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .b2c-price-factor-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .b2c-price-factor,
  .b2c-price-factor:hover,
  .b2c-price-factor:focus,
  .b2c-price-factor:focus-visible {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 116px;
    gap: 6px 14px;
    padding: 13px;
    border-radius: 20px;
  }

  .b2c-price-factor__icon,
  .b2c-price-factor:hover .b2c-price-factor__icon,
  .b2c-price-factor:focus .b2c-price-factor__icon,
  .b2c-price-factor:focus-visible .b2c-price-factor__icon {
    width: 88px;
    height: 88px;
    border-radius: 14px;
  }

  .b2c-price-factor strong {
    font-size: 17px;
    line-height: 1.18;
  }

  .b2c-price-factor span,
  .b2c-price-factor:hover span,
  .b2c-price-factor:focus span,
  .b2c-price-factor:focus-visible span {
    font-size: 13px;
    line-height: 1.36;
  }
}

/* Stop the desktop lead morph from colliding with the tablet hero layout. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .b2c-home-hero__media {
    min-height: 580px;
  }

  .b2c-home-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0;
    padding: 42px 38px;
  }

  .b2c-home-hero h1 {
    max-width: 700px;
    font-size: clamp(38px, 5.2vw, 44px);
    line-height: 1.05;
  }

  .b2c-home-hero p {
    max-width: 560px;
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.45;
  }

  .b2c-home-hero__lead {
    min-height: 0;
  }

  .b2c-home-hero__lead-short {
    display: none;
  }

  .b2c-home-hero__lead-full {
    position: static;
    display: block;
    opacity: 1;
    transform: none;
  }

  .b2c-home-hero__actions {
    align-self: flex-start;
    justify-content: flex-start;
    margin-top: 24px;
  }

  .b2c-home-hero__actions .btn {
    min-width: 190px;
  }
}
