/**
 * Mobile polish for homepage, services, portfolio and about pages.
 * Loaded site-wide; rules are scoped to ≤991 / ≤767 / ≤575.
 */

/* ---------------------------------------------------------------- base */

@media (max-width: 991px) {
  html,
  body {
    overflow-x: hidden;
  }

  .breadcrumb {
    white-space: normal;
    word-break: break-word;
    padding: 8px 0 4px;
  }

  .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .breadcrumb__item,
  .breadcrumb__inner {
    color: #aeb3d8;
  }

  .breadcrumb__inner:hover {
    color: #fff;
  }

  .header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .header__top .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header__top .languages {
    flex: 0 0 auto;
  }

  .mobile-menu-icon {
    flex: 0 0 auto;
  }

  .main-heading {
    letter-spacing: 1.6px;
    word-break: break-word;
  }
}

@media (max-width: 575px) {
  .logo__image {
    width: 140px;
  }

  .btn--main {
    max-width: 100%;
  }
}

/* ---------------------------------------------------------------- hero */

@media (max-width: 991px) {
  .hero,
  body#index .header .hero,
  .hbm-section .hero {
    min-height: 0 !important;
    overflow: visible;
  }

  .hero__image,
  body#index .header .hero__image,
  .hbm-section .hero__image {
    min-height: 0 !important;
  }

  .hero__text {
    position: static !important;
    width: 100% !important;
    padding: 24px 0 40px !important;
    text-align: center;
    transform: none !important;
  }

  .hero__text-heading {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }

  .hero__text-heading b {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    letter-spacing: .04em;
  }

  .hero__btn {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .hero__image {
    display: none;
  }

  .hero__text-heading {
    font-size: 22px;
    line-height: 1.25;
  }

  .hero__text-heading b {
    font-size: 30px;
    line-height: 1.2;
  }

  .hero__text-descr {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
    line-height: 1.55;
  }

  .hero--admin,
  .hero--seo,
  .hero--automation {
    min-height: 0 !important;
    padding: 30px 0 40px;
  }

  .hero--automation .hero__text {
    padding: 0 !important;
    text-align: left;
  }

  .automation-hero {
    display: none;
  }
}

/* ----------------------------------------------------------- homepage */

@media (max-width: 767px) {
  .services {
    padding: 40px 0;
  }

  .services__list {
    justify-content: center;
  }

  .services__item,
  .services__item--wide {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0;
    margin: 0 0 14px;
  }

  .services__title {
    padding: 18px 12px 24px;
    font-size: 15px;
    letter-spacing: 1.2px;
    line-height: 1.35;
  }

  .feature-options {
    margin-top: 0;
    padding: 50px 0 30px;
  }

  .feature-options__inner {
    flex-direction: column;
  }

  .feature-options__descr,
  .feature-options__headings {
    width: 100%;
  }

  .feature-options__link {
    white-space: normal;
  }

  .feature-options__btn {
    width: 100%;
    max-width: 100%;
  }

  .quality__list {
    width: 100%;
  }

  .quality__item {
    width: 100% !important;
    min-height: 0;
    padding: 28px 22px;
    margin: 0 0 12px;
  }

  .portfolio {
    padding: 40px 0;
  }

  .portfolio__new,
  .portfolio__item {
    width: 100%;
    height: 220px;
    margin-bottom: 12px;
  }

  .results {
    padding: 40px 0;
  }

  .results__title {
    letter-spacing: 1.4px;
    font-size: 20px;
  }

  .team {
    padding: 40px 0 30px;
  }

  .profile__name {
    font-size: 24px;
    letter-spacing: 1.4px;
  }

  .profile__position {
    font-size: 18px;
  }

  .advantages {
    padding: 40px 0;
  }

  .footer {
    padding: 40px 0;
  }
}

/* Touch: always show portfolio / service card overlays and copy */

@media (max-width: 991px) {
  .portfolio__item .portfolio__link,
  .portfolio__new .portfolio__link {
    bottom: 0;
    background-image: linear-gradient(to top, rgba(10, 41, 177, .72) 1%, rgba(40, 19, 107, .55));
    box-shadow: none;
  }

  /* Service cards: description as static text under the title */
  .quality__item > a {
    display: block;
    height: 100%;
    text-decoration: none;
  }

  .quality__item .portfolio__link {
    position: static;
    display: block;
    bottom: auto;
    padding: 0 10px 18px;
    background: none !important;
    box-shadow: none !important;
  }

  .quality__item .portfolio__subtitle {
    margin: 0;
    color: #707187;
    font: 400 14px/1.5 "Open Sans", Arial, sans-serif;
    text-align: center;
  }

  .quality__item .services__title {
    padding-bottom: 10px;
  }
}

/* ---------------------------------------------------- services listing */

@media (max-width: 991px) {
  .services .container .container {
    padding-left: 0;
    padding-right: 0;
  }

  .update-about {
    margin-top: 40px;
    padding-bottom: 20px;
  }

  .update-about__heading {
    margin-bottom: 20px;
  }

  .web-descr,
  .marketing-descr,
  .support-descr,
  .specialist-descr,
  .automation-descr {
    margin-bottom: 10px;
  }
}

@media (max-width: 767px) {
  .automation-services {
    margin-top: 30px;
  }
}

/* ---------------------------------------------- service detail pages */

@media (max-width: 991px) {
  .seo-about__item,
  .statistics__item,
  .how-we-work__item {
    width: 100%;
    margin-bottom: 16px;
  }

  .template-totally__image {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .template-totally {
    padding-top: 40px;
  }

  .header-napor .hero__text-descr {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .template-problems__title {
    font-size: 22px;
    letter-spacing: 1.4px;
  }

  .template-purpose__item {
    margin-bottom: 30px;
  }

  .automation-lead,
  .automation-flow,
  .automation-result,
  .automation-cta {
    padding: 45px 0;
  }

  .automation-lead__intro {
    margin-bottom: 28px;
    font-size: 16px;
  }

  .automation-benefits__item,
  .automation-flow__item {
    padding: 24px;
  }

  .automation-result__panel {
    padding: 26px;
  }
}

/* --------------------------------------------------------- calculator */

@media (max-width: 991px) {
  .calculate-wrap {
    display: block;
  }

  .calculate-left-block,
  .calculate-right-block {
    flex-basis: auto;
    width: 100%;
  }

  .final-price {
    width: 100%;
    height: auto;
    margin-top: 24px;
  }

  .packet {
    flex-direction: column;
    gap: 10px;
  }

  .packet-btn {
    width: 100%;
  }

  .packet-btn:nth-child(2) {
    margin: 0;
  }

  .choose-modules-form label {
    flex-basis: 100%;
  }

  .tab {
    float: none;
    display: block;
    margin: 0 0 10px;
  }
}

/* ----------------------------------------------------------- portfolio */

.manufacturer__top {
  padding: 40px 0 60px;
}

.manufacturer__top-inner {
  width: 100%;
}

.portfolio__list--equal {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 15px;
}

.portfolio__list--equal .portfolio__item {
  width: calc(50% - 8px);
  height: 260px;
  margin: 0;
  background-size: cover !important;
  background-position: center !important;
}

@media (max-width: 767px) {
  .manufacturer__top {
    padding: 25px 0 40px;
  }

  .portfolio__list--equal {
    gap: 12px;
  }

  .portfolio__list--equal .portfolio__item {
    width: 100%;
    height: 200px;
  }

  .portfolio__title {
    font-size: 22px;
    letter-spacing: 1.4px;
  }
}

/* Large CMS / category images inside portfolio and service pages */

.page-category #content img,
.page-category .category-description img,
.page-category .container > img,
.portfolio__section img,
.portfolio__homepage img,
.portfolio__cart img,
.gmcatseconddesc img {
  max-width: 100%;
  height: auto;
}

/* Portfolio case pages */

@media (max-width: 991px) {
  .portfolio__responsive-inner {
    flex-direction: column;
    min-height: 0;
    padding: 40px 0;
  }

  .portfolio__responsive-images,
  .portfolio__responsive-descr {
    width: 100%;
  }

  .portfolio__responsive-napor .portfolio__responsive-images img {
    position: static;
    left: auto;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 20px;
  }

  .portfolio__responsive-heading {
    font-size: 28px;
  }

  .portfolio__homepage,
  .portfolio__cart,
  .portfolio__section {
    padding: 40px 0;
  }
}

@media (max-width: 767px) {
  .portfolio__responsive-heading {
    font-size: 24px;
    margin: 10px 0 18px;
  }

  .portfolio__screen {
    box-shadow: 8px 12px 40px rgba(193, 187, 187, .5);
  }
}

/* Product listing cards (portfolio products / modules) */

#products .products,
.products {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prod-about__item,
.product-miniature.prod-about__item {
  width: calc(50% - 8px);
  margin: 0;
  padding: 16px;
  background: #fff;
  box-shadow: 8px 12px 28px rgba(55, 62, 102, .08);
}

.prod-about__item .thumbnail-container {
  display: block;
}

.prod-about__item .product-thumbnail,
.prod-about__item .thumbnail.product-thumbnail {
  display: block;
  margin-bottom: 12px;
}

.prod-about__item .product-thumbnail img,
.prod-about__item .thumbnail.product-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
}

.prod-about__item .product-title {
  margin: 0 0 8px;
  font: 600 16px/1.35 "Open Sans", Arial, sans-serif;
}

.prod-about__item .product-title a {
  color: #373e66;
  text-decoration: none;
}

.prod-about__item .price {
  color: #6e3bff;
  font-weight: 700;
}

@media (max-width: 767px) {
  .prod-about__item,
  .product-miniature.prod-about__item {
    width: 100%;
  }
}

/* --------------------------------------------------------------- about */

@media (max-width: 767px) {
  .about-proof__list b {
    font-size: 28px;
  }

  .about-process__list span {
    font-size: 26px;
  }

  .about-principles__list li {
    width: 100%;
    padding: 24px 20px;
  }

  .about-story,
  .about-capabilities,
  .about-principles,
  .about-process,
  .about-fit,
  .about-portfolio {
    padding-top: 40px;
  }

  .about-cta {
    padding: 50px 0;
  }

  .about-cta__text,
  .about-portfolio__text,
  .about-story__copy p {
    font-size: 15px;
  }
}

/* Carousels that can force horizontal overflow */

@media (max-width: 767px) {
  .owl-carousel,
  .owl-stage-outer {
    max-width: 100%;
    overflow: hidden;
  }

  .template-problems__headings {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

