/* Bare legacy service templates have a canonical URL, but no WordPress body classes. */
@media (max-width: 1279px) {
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/ekzamen-nok/"]) ul.stages-list.flex.flex--wrap {
    margin-inline: 0;
  }
}
@media (min-width: 768px) and (max-width: 1279px) {
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/ekzamen-nok/"]) .stages-list .service__item__btn > a.btn.btn--blue.js--popup-link {
    min-width: 0;
    max-width: 100%;
  }
}
@media (max-width: 767px) {
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/kak-poluchit-sertifikat-na-selskohozyajstvennye-i-pishhevye-produkty-v-rossii/"]) main .first-screen__descr h1,
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/tehnicheskoe-osvidetelstvovanie-detskoj-ili-sportivnoj-ploshhadki/"]) main .first-screen__descr h1 {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 1200px) {
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/deklaraciya-gostr/"]) .gs-mobile-drawer[aria-hidden="true"],
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/deklaraciya-sootvetstvia-tr-ts/"]) .gs-mobile-drawer[aria-hidden="true"],
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/haccp/"]) .gs-mobile-drawer[aria-hidden="true"],
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/pasport-bezopasnosti-produkcii/"]) .gs-mobile-drawer[aria-hidden="true"],
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/sertifikat-sootvetstviya-ts-tr/"]) .gs-mobile-drawer[aria-hidden="true"],
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/tehnicheskie-usloviya/"]) .gs-mobile-drawer[aria-hidden="true"] {
    display: none;
  }
}

/* Preserve all six service diagram cards and their authored line breaks on phones. */
@media (max-width: 600px) {
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-visual {
    display: block;
    min-height: 0;
    padding-top: 0;
  }
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-docs-stage {
    width: 100%;
    height: auto;
  }
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-docs-map {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-doc {
    width: 100%;
    align-self: stretch;
  }
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-doc-stack {
    height: auto;
  }
  html:has(head > link[rel="canonical"][href="https://gkstandart.com/uslugi/"]) .gks-services-page .svc-doc br {
    display: initial;
  }
}
