/*
 * Esdescon responsive layer
 * This file intentionally contains only non-desktop breakpoints.
 */

@media (max-width: 1199px) {
  html {
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

  body.modal-open,
  body.mobile-menu-open {
    overflow: hidden;
  }

  img,
  video,
  iframe,
  svg {
    max-width: 100%;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 24px;
  }

  /* Header and touch-friendly mobile navigation */
  .header_menu {
    width: calc(100% - 32px) !important;
    min-height: 68px;
    margin-top: 8px;
    padding: 10px 16px !important;
    gap: 12px;
  }

  .header_menu > a img {
    width: 128px;
    height: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    width: 44px;
    height: 44px;
    margin-left: auto;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    width: 21px;
    height: 2px;
    background: #111;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header_menu > nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden !important;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 32px rgb(0 0 0 / 14%);
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .header_menu.menu-open > nav {
    max-height: calc(100vh - 96px);
    overflow-y: auto !important;
    opacity: 1;
    visibility: visible;
  }

  .header_menu_list,
  .header_menu_list.active {
    position: static !important;
    left: auto;
    display: flex;
    width: 100%;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    opacity: 1;
  }

  .header_menu_list > li {
    width: 100%;
    border-bottom: 1px solid #ededed;
  }

  .header_menu_list > li:last-child {
    border-bottom: 0;
  }

  .header_menu_list > li > a,
  .header_menu_item > span {
    display: flex !important;
    min-height: 48px;
    padding: 12px !important;
    align-items: center;
    justify-content: flex-start !important;
    border: 0 !important;
    border-radius: 4px !important;
  }

  .header_menu_item > span::after {
    content: "+";
    margin-left: auto;
    font-size: 20px;
    line-height: 1;
  }

  .header_menu_item.submenu-open > span::after {
    content: "−";
  }

  .header_submenu {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 10px 16px;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header_menu_item.submenu-open .header_submenu {
    display: block;
  }

  .header_submenu a {
    min-height: 44px;
    padding: 12px;
    white-space: normal;
  }

  .header_menu > div:last-child {
    gap: 10px;
  }

  .header_menu > div:last-child > a {
    display: none;
  }

  .main_lang {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .lang_list {
    z-index: 30;
  }

  .mobile-menu-toggle:focus-visible,
  .header_menu a:focus-visible,
  .header_menu_item > span:focus-visible,
  .close_static_modal_content:focus-visible {
    outline: 3px solid #104c8a;
    outline-offset: 2px;
  }

  /* Shared content */
  main section,
  footer,
  .static,
  .contacts {
    min-width: 0;
  }

  h1.text-6xl,
  .title-104,
  .section-map__text h2 {
    font-size: clamp(38px, 7vw, 64px) !important;
    letter-spacing: -0.04em;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .mt-30 {
    margin-top: 104px !important;
  }

  .mt-24 {
    margin-top: 64px !important;
  }

  /* Home hero */
  .banner_main_slider {
    height: 720px !important;
    min-height: 620px;
  }

  #banner_slider > .container > .absolute {
    right: 24px;
    left: 24px !important;
    width: auto !important;
    bottom: 32px !important;
    gap: 24px;
  }

  .contents_slider {
    width: min(620px, 72vw);
    height: 180px;
  }

  .banner_thumbs_slider {
    max-width: 250px;
  }

  /* Home multi-column sections */
  main .grid-cols-8 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  main .grid-cols-4,
  #projects-list,
  #foreign-projects-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main .grid-cols-3,
  .media-content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .about_main {
    height: 420px !important;
  }

  .about_main > div {
    gap: 12px;
    padding: 18px !important;
  }

  .about_main > div > div {
    gap: 10px !important;
    font-size: 17px !important;
  }

  .about_main > div > div > span:first-child {
    font-size: 34px !important;
  }

  .partnor {
    width: calc(50% - 5px);
    height: 140px;
    padding: 18px;
  }

  #products_wrapper {
    padding-inline: 24px;
    gap: 24px;
  }

  #left_big_card {
    width: 38% !important;
  }

  #right_column {
    width: 62% !important;
    padding-right: 0 !important;
  }

  #change_slider_content_wrapper > p:nth-child(2) {
    font-size: 34px !important;
  }

  #projects_wrapper .container > .flex > .w-\[15\%\] {
    width: 20% !important;
  }

  #projects_wrapper .container > .flex > .w-\[75\%\] {
    width: 78% !important;
  }

  #projects_wrapper .text-\[61px\] {
    font-size: 44px !important;
  }

  .prSwiper {
    padding-left: 20% !important;
  }

  .docs-page__tabs {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .docs-page__tabs-list {
    width: max-content;
    min-width: 100%;
  }

  .docs-page__tabs-item {
    font-size: 17px;
    white-space: nowrap;
  }

  .docs-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .docs-page__card-container {
    height: 280px;
  }

  /* Director profile */
  .director-profile {
    height: 560px !important;
  }

  .director-profile__media {
    width: 100% !important;
  }

  .director-profile__name {
    left: 24px !important;
    font-size: clamp(38px, 6vw, 58px) !important;
    letter-spacing: 4px !important;
    line-height: 1.05;
  }

  .director-profile__role {
    top: 152px !important;
    right: 24px !important;
    left: 24px;
  }

  .director-profile__summary {
    width: calc(100% - 48px) !important;
  }

  .director-profile__quote {
    right: 24px !important;
    bottom: 24px !important;
    width: 56px !important;
    height: 56px !important;
  }

  /* Static, detail, gallery and contact pages */
  .static > .container > .flex,
  .project_cover + .w-\[49\%\] {
    min-width: 0;
  }

  .static .boxFull {
    padding: 32px;
  }

  .static_modal_content > div {
    max-width: calc(100vw - 64px);
  }

  .static_modal_content_body,
  .post-content,
  .project-content,
  .staticText {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .post-content img,
  .project-content img,
  .staticText img {
    height: auto !important;
  }

  .post-content table,
  .project-content table,
  .staticText table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
  }

  .post-content pre,
  .project-content pre,
  .staticText pre {
    max-width: 100%;
    overflow-x: auto;
  }

  .speedbar .over {
    height: auto;
    overflow-wrap: anywhere;
  }

  .navigation {
    display: flex;
    margin-block: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .navigation .pages {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .navigation .pages a,
  .navigation .pages span,
  .page_next-prev a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .post_photo {
    width: 100% !important;
    height: 480px !important;
  }

  .project_cover {
    height: 600px !important;
  }

  .gallery_wrapper.grid-cols-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .gallery_wrapper a.h-\[800px\] {
    height: 520px !important;
  }

  .contacts {
    padding: 32px 0 0;
  }

  .contacts__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-inline: 0;
  }

  .contacts__card:not(:last-of-type) {
    padding-right: 18px;
  }

  .contact_form > .container {
    padding-inline: 0;
  }

  /* Footer */
  footer .w-\[20\%\],
  footer .w-\[79\%\] {
    width: 100% !important;
  }

  footer .w-\[79\%\] {
    margin-top: 16px;
  }

  footer .bg-\[\#090714\] > .flex > div {
    width: calc(50% - 16px) !important;
    margin-bottom: 28px;
  }

  footer a {
    min-height: 32px;
  }
}

@media (max-width: 767px) {
    .picture.docs-page__card-img img{
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    #sliders_cards_wrapper {
        margin-top: 20px;
    }
  .container {
    padding-inline: 16px;
  }

  .header_menu {
    width: calc(100% - 16px) !important;
    padding-inline: 12px !important;
  }

  .header_menu > a img {
    width: 104px;
  }

  .header_menu > div:last-child {
    order: 2;
  }

  .mobile-menu-toggle {
    order: 3;
    margin-left: 0;
  }

  h1.text-6xl,
  .title-104,
  .section-map__text h2 {
    font-size: clamp(32px, 10vw, 46px) !important;
  }

  .banner_main_slider {
    height: 100svh !important;
    min-height: 600px;
    max-height: 760px;
  }

  #banner_slider > .container > .absolute {
    right: 16px;
    left: 16px !important;
    bottom: 24px !important;
    flex-direction: column;
  }

  #banner_slider > .container > .absolute > div:first-child {
    width: 100%;
  }

  .contents_slider {
    width: 100%;
    height: 205px;
  }

  .content_slider_top p:first-child {
    font-size: 19px !important;
  }

  .content_slide_button {
    min-height: 44px;
    padding-inline: 32px !important;
  }

  .banner_thumbs_slider {
    display: none;
  }

  main .grid-cols-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main .grid-cols-4,
  main .grid-cols-3,
  #projects-list,
  #foreign-projects-list,
  .media-content {
    grid-template-columns: 1fr !important;
  }

  main > section:nth-of-type(2) .w-\[70\%] {
    width: 100% !important;
  }

  .adv_card {
    min-height: 0;
  }

  main > section > .px-\[32px\] {
    padding-inline: 16px !important;
  }

  .about_main {
    height: 460px !important;
    padding: 12px !important;
  }

  .about_main > div {
    flex-direction: column;
    align-items: stretch;
    padding: 12px !important;
  }

  .about_main > div > div {
    width: 100% !important;
    min-height: 64px;
    justify-content: flex-start !important;
    border-right: 0 !important;
    border-bottom: 1px solid #ddd;
  }

  .about_main + .flex {
    flex-direction: column;
  }

  .about_main + .flex > .w-\[30\%\],
  .about_main + .flex > .w-\[70\%\] {
    position: static !important;
    width: 100% !important;
  }

  .about_main + .flex > .w-\[70\%\] {
    margin-top: 24px;
    padding-left: 0 !important;
    border-left: 0 !important;
    font-size: 15px;
  }

  .partnor {
    height: 112px;
  }

  .section-map__text h2 {
    margin-bottom: 16px;
    text-align: left;
  }

  .section-map__text p {
    text-align: left;
    font-size: 14px;
  }

  .work-point-alt {
    display: none;
  }

  #products_wrapper {
    padding-inline: 16px;
    flex-direction: column;
  }

  #left_big_card {
    display: none;
  }

  #right_column {
    width: 100% !important;
    display: block;
  }

  #change_slider_content_wrapper > p:nth-child(2) {
    font-size: 30px !important;
  }

  #change_slider_content_wrapper > .mt-32 a {
    width: 100% !important;
    min-height: 48px;
  }

  #projects_wrapper .container > .flex {
    flex-direction: column-reverse;
  }

  #projects_wrapper .container > .flex > .w-\[15\%\],
  #projects_wrapper .container > .flex > .w-\[75\%\] {
    width: 100% !important;
  }

  #projects_wrapper .container > .flex > .w-\[15\%\] {
    height: 64px;
  }

  #projects_wrapper .container > .flex > .w-\[15\%\] > .absolute {
    top: 16px;
    bottom: auto !important;
  }

  #projects_wrapper .container > .flex > .w-\[75\%\] {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  #projects_wrapper .text-\[61px\] {
    font-size: 34px !important;
    letter-spacing: -1px !important;
  }

  #projects_wrapper .w-\[50\%\] {
    width: 100% !important;
  }

  .prSwiper {
    padding-left: 16px !important;
    padding-right: 16px;
  }

  .prSwiper::before {
    display: none;
  }

  .prSwiper .h-\[320px\] {
    height: 260px !important;
  }

  .prSwiper .text-\[32px\] {
    font-size: 22px !important;
  }

  .partnor_card {
    height: 104px;
    padding: 16px;
  }

  main .py-24 {
    padding-block: 56px !important;
  }

  .media_buttons {
    gap: 16px !important;
  }

  .media_buttons button {
    min-height: 44px;
    font-size: 15px;
  }

  .docs-page__tabs-item {
    font-size: 15px;
  }

  .docs-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-page__card-container {
    height: 240px;
    padding: 14px;
  }

  .project-card .h-\[435px\] {
    height: 360px !important;
  }

  .projects_wrapper + p,
  #projects-empty,
  #foreign-projects-empty {
    margin-bottom: 24px;
  }

  .project-filter,
  .foreign-project-filter {
    min-height: 48px;
  }

  .project-filters {
    gap: 16px !important;
  }

  .project-filters > div {
    width: 100% !important;
  }

  #foreign_projects .flex.flex-wrap.gap-6 > div,
  #projects-list ~ * {
    max-width: 100%;
  }

  .static > .container > .flex {
    flex-direction: column;
  }

  .static > .container > .flex > .w-\[49\%\] {
    position: static !important;
    width: 100% !important;
  }

  .static > .container > .flex > .w-\[49\%\]:last-child {
    height: 280px !important;
    margin-top: 24px;
  }

  .static .boxFull {
    padding: 24px 18px;
  }

  .static .boxFull h2 {
    font-size: 24px;
  }

  .static_modal_content > div {
    width: calc(100vw - 32px) !important;
    max-width: none;
  }

  .static_modal_content_body {
    padding: 72px 20px 32px !important;
    line-height: 1.7 !important;
  }

  .close_static_modal_content {
    top: 8px !important;
    right: 8px !important;
    z-index: 2;
  }

  .post_photo {
    height: 320px !important;
  }

  .gallery_wrapper.grid-cols-4,
  .gallery_wrapper.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .fancy_gallery_card,
  .gallery_wrapper a.h-\[800px\] {
    height: 260px !important;
  }

  .project_cover,
  .project_cover + .w-\[49\%\] {
    position: static !important;
    width: 100% !important;
  }

  .project_cover {
    height: 420px !important;
    margin-bottom: 24px;
  }

  .project_cover + .w-\[49\%\] .text-\[18px\] {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }

  .director-profile {
    height: auto !important;
  }

  .director-profile__grid {
    display: flex !important;
    height: auto !important;
    flex-direction: column;
  }

  .director-profile__media {
    height: min(105vw, 460px);
  }

  .director-profile__content {
    display: flex;
    padding: 32px 20px;
    flex-direction: column;
  }

  .director-profile__name,
  .director-profile__role,
  .director-profile__quote {
    position: static !important;
  }

  .director-profile__name {
    order: 1;
    font-size: clamp(34px, 12vw, 48px) !important;
    letter-spacing: 2px !important;
  }

  .director-profile__role {
    order: 2;
    margin-top: 16px;
  }

  .director-profile__content > .flex {
    display: block;
    order: 3;
    height: auto !important;
  }

  .director-profile__summary {
    width: 100% !important;
    margin-top: 24px;
  }

  .director-profile__summary .get_all_content {
    min-height: 44px;
    margin-top: 16px;
  }

  .director-profile__quote {
    order: 4;
    margin-top: 24px;
  }

  .contacts {
    margin-bottom: 40px;
    padding-top: 24px;
  }

  .contacts__cards {
    grid-template-columns: 1fr;
  }

  .contacts__card,
  .contacts__card:not(:last-of-type) {
    min-width: 0;
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid #e2e3e4;
  }

  .contacts__card-contact a {
    overflow-wrap: anywhere;
  }

  .contact_form > .container {
    padding-inline: 0;
  }

  .contact-title {
    margin: 32px 0;
    font-size: 26px;
  }

  .contact_form form .btn {
    width: 100%;
    min-height: 48px;
    padding-inline: 24px;
  }

  .done {
    width: 100%;
  }

  .speedbar .over {
    font-size: 14px;
    line-height: 1.5;
  }

  .navigation {
    flex-direction: column;
    align-items: stretch;
  }

  .navigation .page_next-prev {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  footer .w-\[79\%\] > .flex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  footer .bg-\[\#090714\] {
    padding: 24px 20px !important;
  }

  footer .bg-\[\#090714\] > .flex {
    flex-direction: column;
  }

  footer .bg-\[\#090714\] > .flex > div {
    width: 100% !important;
    margin-bottom: 24px;
  }

  footer .mt-12 {
    margin-top: 28px !important;
  }
}

@media (max-width: 479px) {
  .header_menu > a img {
    width: 90px;
  }

  .main_lang {
    min-width: 36px;
  }

  .banner_thumbs_slider {
    display: none;
  }

  .contents_slider {
    height: 230px;
  }

  .docs-page__grid,
  .gallery_wrapper.grid-cols-4,
  .gallery_wrapper.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  .docs-page__card-container {
    height: 330px;
  }

  .project_cover {
    height: 320px !important;
  }

  .fancy_gallery_card,
  .gallery_wrapper a.h-\[800px\] {
    height: 300px !important;
  }

  footer .w-\[79\%\] > .flex {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
