/* Documents page and independent full-screen image viewer. */
.documents-intro {
  padding: 50px 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  background: var(--gradient-panel);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.documents-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/dental-pattern.svg");
  opacity: 0.28;
  mask-image: linear-gradient(90deg, transparent, #000);
  z-index: -1;
}
.documents-intro h1 {
  font-size: 61px;
  line-height: 1.13;
  font-weight: 400;
  letter-spacing: -2.8px;
  margin-top: 23px;
}
.documents-intro__copy > p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.9;
  color: #718aa0;
  max-width: 540px;
  margin-top: 24px;
}
.documents-intro__actions {
  display: flex;
  align-items: center;
  gap: 23px;
  flex-wrap: wrap;
  margin-top: 27px;
}
.documents-intro__actions .button {
  font-size: 13px;
  min-height: 51px;
  gap: 18px;
  padding-left: 22px;
}
.documents-intro__count {
  font-size: 10px;
  line-height: 1.6;
  color: #899eb0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.documents-intro__count strong {
  font-size: 23px;
  font-weight: 500;
  color: #51a8c0;
  letter-spacing: -0.8px;
}
.document-stack {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 340px;
  height: 340px;
}
.document-stack__sheet {
  position: absolute;
  height: 280px;
  width: auto;
  border-radius: 8px;
  border: 7px solid white;
  box-shadow: 0 12px 30px #3e647428;
  object-fit: contain;
}
.document-stack__sheet--left {
  left: 5px;
  top: 28px;
  transform: rotate(-13deg);
}
.document-stack__sheet--right {
  right: 3px;
  top: 28px;
  transform: rotate(13deg);
}
.document-stack__sheet--front {
  left: 70px;
  top: 5px;
  height: 296px;
  transform: rotate(-2deg);
  z-index: 1;
}
.document-stack__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  bottom: 5px;
  right: -5px;
  z-index: 2;
  background: #ffffffe8;
  backdrop-filter: blur(10px);
  border: 1px solid #fff;
  box-shadow: 0 10px 25px #6e91a91a;
  padding: 16px 22px;
  border-radius: 17px;
  font-size: 12px;
  color: #5b8198;
}
.document-stack__badge .icon {
  width: 25px;
  height: 25px;
  color: #2aa9c6;
  stroke-width: 1.2;
}
.document-stack__sparkle {
  position: absolute;
  right: -13px;
  top: -15px;
  width: 30px;
  height: 30px;
  fill: #9f9aee;
}
.document-catalog {
  padding-top: 49px;
  padding-bottom: 36px;
}
.document-catalog .section-heading h2 {
  font-size: 36px;
  font-weight: 500;
}
.document-catalog .section-heading > div > p:last-child {
  font-size: 14px;
  margin-top: 12px;
}
.document-results {
  font-size: 11px;
  color: #94a5b4;
  white-space: nowrap;
}
.document-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 26px 0 28px;
}
.document-filters button {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #dfebf6;
  border-radius: 30px;
  padding: 12px 17px;
  background: #fff;
  color: #7791a7;
  transition:
    background var(--transition),
    color var(--transition);
}
.document-filters button span {
  font-size: 9px;
  opacity: 0.6;
}
.document-filters button[aria-pressed="true"] {
  background: var(--gradient-action);
  border-color: transparent;
  color: #fff;
}
.document-filters button:hover:not([aria-pressed="true"]) {
  background: #eef9ff;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px 20px;
}
.document-card {
  padding: 12px;
  border: 1px solid #e2edf7;
  border-radius: 24px;
  overflow: hidden;
  background: #fcfeff;
  transition:
    box-shadow var(--transition),
    transform var(--transition);
}
.document-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 25px #6b9ec214;
}
.document-card__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 325px;
  border-radius: 15px;
  background: linear-gradient(135deg, #edf5fb, #f2f8fc);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.document-card__preview > img {
  max-width: 100%;
  height: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 4px 13px #24436915;
  transition: transform 250ms ease;
}
.document-card:hover .document-card__preview > img {
  transform: scale(1.02);
}
.document-card__expand {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 30px;
  border: 1px solid #fff;
  background: #ffffffe8;
  backdrop-filter: blur(8px);
  font-size: 10px;
  color: #368bac;
  white-space: nowrap;
  box-shadow: 0 3px 10px #3b72971a;
}
.document-card__expand .icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}
.document-card__body {
  padding: 18px 9px 9px;
  display: flex;
  flex-direction: column;
  min-height: 175px;
}
.document-card__category {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5ba4b8;
  margin-bottom: 9px;
}
.document-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.35;
}
.document-card h3 a:hover {
  color: #268fb8;
}
.document-card__body > p {
  font-size: 12px;
  color: #92a4b4;
  line-height: 1.6;
  margin-top: 8px;
}
.document-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
  padding-top: 19px;
}
.document-card__bottom > span {
  font-size: 9px;
  color: #a0afbc;
  letter-spacing: 0.3px;
}
.document-card__bottom > a {
  font-size: 11px;
  font-weight: 600;
  color: #3a9dbb;
}
.document-card__bottom > a span {
  font-size: 16px;
  margin-left: 7px;
}
.documents-help {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #deebf6;
  border-radius: 23px;
  padding: 26px 30px;
  margin-top: 0;
  margin-bottom: 10px;
  background: #faffff;
}
.documents-help__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: #e6f8ff;
  color: #37a9c7;
  flex-shrink: 0;
}
.documents-help__icon .icon {
  width: 27px;
  height: 27px;
}
.documents-help > div {
  flex: 1;
}
.documents-help h2 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.7px;
}
.documents-help p {
  font-size: 12px;
  line-height: 1.8;
  color: #8b9eaf;
  margin-top: 6px;
}
.documents-help > a {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.documents-help > a > span {
  font-size: 16px;
  color: #6ca3c4;
  margin-left: 10px;
}
.page-documents .site-footer {
  margin-top: 38px;
}
/* Viewer: native dialog for focus containment and Escape support. */
body.is-document-viewer-open {
  overflow: hidden;
}
.document-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #102238;
  color: #fff;
  overflow: hidden;
}
.document-viewer[open] {
  display: flex;
  flex-direction: column;
}
.document-viewer::backdrop {
  background: #102238f5;
}
.document-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 28px;
  border-bottom: 1px solid #ffffff12;
  flex-shrink: 0;
  background: #14283f;
}
.document-viewer__heading {
  min-width: 0;
  flex: 1;
}
.document-viewer__eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #8baac4;
}
.document-viewer__heading h2 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin-top: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.document-viewer__heading p {
  font-size: 11px;
  color: #91abc1;
  margin-top: 3px;
}
.document-viewer__tools {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}
.document-viewer__tools button,
.document-viewer__tools a {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff18;
  border-radius: 11px;
  background: #ffffff08;
  color: #d9eafa;
  font-size: 21px;
  line-height: 1;
  transition: background var(--transition);
}
.document-viewer__tools button:hover,
.document-viewer__tools a:hover {
  background: #ffffff18;
}
.document-viewer__tools button:disabled {
  opacity: 0.3;
  cursor: default;
}
.document-viewer__tools .document-viewer__scale {
  width: 65px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.document-viewer__tools .document-viewer__close {
  margin-left: 10px;
  font-size: 28px;
}
.document-viewer__main {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 16px 28px 10px;
  align-items: center;
}
.document-viewer__stage {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
}
.document-viewer__image {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: translate(
      calc(-50% + var(--pan-x, 0px)),
      calc(-50% + var(--pan-y, 0px))
    )
    scale(var(--zoom, 1));
  transform-origin: center;
  will-change: transform;
  box-shadow: 0 4px 40px #0003;
}
.document-viewer__stage.is-zoomed {
  cursor: grab;
}
.document-viewer__stage.is-zoomed:active {
  cursor: grabbing;
}
.document-viewer__stage.is-loading::after {
  content: "Загрузка…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #a3bfd2;
  pointer-events: none;
  background: #102238bb;
}
.document-viewer__arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  border: 1px solid #ffffff20;
  background: #ffffff08;
  color: #d5eafb;
}
.document-viewer__arrow:hover {
  background: #ffffff18;
}
.document-viewer__arrow .icon {
  width: 22px;
  height: 22px;
}
.document-viewer__arrow--prev .icon {
  transform: rotate(180deg);
}
.document-viewer__error {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  text-align: center;
  color: #b6c9d9;
  font-size: 13px;
  line-height: 1.8;
  padding: 30px;
}
.document-viewer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 30px;
  flex-shrink: 0;
  font-size: 10px;
  color: #8da7bd;
}
.document-viewer__footer > span:first-child {
  font-variant-numeric: tabular-nums;
  color: #d4e6f5;
  font-size: 12px;
  min-width: 60px;
}
.document-viewer__footer p span {
  padding: 0 9px;
  color: #47637b;
}
.document-viewer__thumbnails {
  display: flex;
  gap: 9px;
  justify-content: center;
  overflow-x: auto;
  flex-shrink: 0;
  max-width: 100%;
  padding: 10px 24px 16px;
  background: #14283f;
  scrollbar-width: thin;
  scrollbar-color: #3d5a74 transparent;
}
.document-viewer__thumbnails button {
  width: 43px;
  height: 58px;
  padding: 3px;
  flex-shrink: 0;
  background: #ffffff12;
  border: 2px solid transparent;
  border-radius: 6px;
  opacity: 0.6;
}
.document-viewer__thumbnails button[aria-current="true"] {
  opacity: 1;
  border-color: #48c3df;
  background: #ffffff20;
}
.document-viewer__thumbnails button:hover {
  opacity: 1;
}
.document-viewer__thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 1200px) {
  .documents-intro {
    padding: 42px 40px;
    gap: 35px;
  }
  .documents-intro h1 {
    font-size: 52px;
  }
  .documents-intro__copy > p:not(.eyebrow) {
    font-size: 14px;
  }
  .document-stack {
    width: 285px;
    height: 300px;
  }
  .document-stack__sheet {
    height: 237px;
    border-width: 6px;
  }
  .document-stack__sheet--front {
    height: 253px;
    left: 59px;
  }
  .document-stack__badge {
    font-size: 11px;
    padding: 14px 17px;
  }
  .document-card__preview {
    height: 285px;
  }
  .document-card h3 {
    font-size: 16px;
  }
  .document-card__body {
    min-height: 175px;
  }
  .documents-help > a {
    font-size: 19px;
  }
}
@media (max-width: 900px) {
  .documents-intro {
    padding: 35px 30px;
    gap: 25px;
    grid-template-columns: 1.3fr 1fr;
  }
  .documents-intro h1 {
    font-size: 44px;
    letter-spacing: -2px;
  }
  .documents-intro__copy > p:not(.eyebrow) {
    font-size: 13px;
  }
  .documents-intro__actions {
    gap: 16px;
  }
  .document-stack {
    width: 240px;
    height: 265px;
  }
  .document-stack__sheet {
    height: 203px;
    border-width: 5px;
  }
  .document-stack__sheet--front {
    height: 220px;
    left: 50px;
  }
  .document-stack__badge {
    padding: 12px 15px;
    font-size: 10px;
    right: 0;
  }
  .document-stack__badge .icon {
    width: 21px;
    height: 21px;
  }
  .document-catalog .section-heading h2 {
    font-size: 31px;
  }
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .document-card__preview {
    height: 315px;
  }
  .documents-help {
    gap: 17px;
    padding: 23px;
  }
  .documents-help h2 {
    font-size: 18px;
  }
  .documents-help p {
    font-size: 11px;
  }
  .documents-help > a {
    font-size: 16px;
  }
}
@media (max-width: 760px) {
  .documents-intro {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 24px;
    gap: 30px;
  }
  .documents-intro h1 {
    font-size: 42px;
    letter-spacing: -2px;
    margin-top: 20px;
  }
  .documents-intro__copy > p:not(.eyebrow) {
    font-size: 13px;
    line-height: 1.9;
    margin-top: 20px;
  }
  .documents-intro__actions {
    gap: 15px;
    margin-top: 23px;
  }
  .documents-intro__actions .button {
    font-size: 12px;
    gap: 15px;
    min-height: 49px;
    padding-left: 19px;
  }
  .document-stack {
    width: 260px;
    height: 270px;
    margin: 8px 0 0;
  }
  .document-stack__sheet {
    height: 210px;
  }
  .document-stack__sheet--front {
    height: 230px;
    left: 56px;
  }
  .document-stack__badge {
    right: -3px;
    bottom: -2px;
  }
  .document-catalog {
    padding-top: 33px;
    padding-bottom: 25px;
  }
  .document-catalog .section-heading {
    flex-wrap: wrap;
    gap: 10px;
  }
  .document-catalog .section-heading h2 {
    font-size: 29px;
  }
  .document-catalog .section-heading > div > p:last-child {
    font-size: 12px;
    max-width: none;
  }
  .document-results {
    font-size: 10px;
  }
  .document-filters {
    gap: 7px;
    margin: 21px 0;
  }
  .document-filters button {
    font-size: 10px;
    gap: 9px;
    padding: 10px 13px;
  }
  .document-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .document-card {
    padding: 11px;
    border-radius: 22px;
  }
  .document-card__preview {
    height: 335px;
  }
  .document-card h3 {
    font-size: 19px;
  }
  .document-card__body {
    padding: 18px 10px 10px;
    min-height: 170px;
  }
  .document-card__body > p {
    font-size: 12px;
  }
  .documents-help {
    padding: 21px;
    gap: 15px;
    flex-wrap: wrap;
  }
  .documents-help__icon {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }
  .documents-help__icon .icon {
    width: 23px;
    height: 23px;
  }
  .documents-help > div {
    flex-basis: calc(100% - 60px);
  }
  .documents-help h2 {
    font-size: 18px;
  }
  .documents-help > a {
    margin-left: 58px;
    font-size: 18px;
  }
  .page-documents .site-footer {
    margin-top: 28px;
  }
  .document-viewer__header {
    gap: 12px;
    padding: 13px 15px;
    flex-wrap: wrap;
  }
  .document-viewer__heading {
    flex-basis: 100%;
    padding-right: 25px;
  }
  .document-viewer__heading h2 {
    font-size: 14px;
    line-height: 1.4;
  }
  .document-viewer__eyebrow {
    font-size: 8px;
  }
  .document-viewer__heading p {
    font-size: 10px;
  }
  .document-viewer__tools {
    width: 100%;
    gap: 7px;
    margin-top: 1px;
  }
  .document-viewer__tools button,
  .document-viewer__tools a {
    width: 33px;
    height: 33px;
    border-radius: 9px;
    font-size: 20px;
  }
  .document-viewer__tools .document-viewer__scale {
    width: 61px;
  }
  .document-viewer__tools .document-viewer__close {
    margin-left: auto;
    width: 34px;
    font-size: 26px;
  }
  .document-viewer__main {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 4px;
    padding: 12px 6px 8px;
  }
  .document-viewer__arrow {
    width: 28px;
    height: 35px;
    border-radius: 10px;
    border-color: transparent;
    background: #ffffff05;
  }
  .document-viewer__arrow .icon {
    width: 18px;
    height: 18px;
  }
  .document-viewer__footer {
    padding: 8px 15px;
    font-size: 9px;
    gap: 10px;
  }
  .document-viewer__footer > p {
    display: none;
  }
  .document-viewer__hint {
    font-size: 8px;
  }
  .document-viewer__thumbnails {
    justify-content: flex-start;
    gap: 7px;
    padding: 9px 15px 13px;
  }
  .document-viewer__thumbnails button {
    width: 36px;
    height: 49px;
  }
}
@media (max-width: 370px) {
  .documents-intro {
    padding-inline: 20px;
  }
  .documents-intro h1 {
    font-size: 35px;
  }
  .documents-intro__actions .button {
    font-size: 11px;
    gap: 12px;
  }
  .document-stack {
    width: 223px;
    height: 247px;
  }
  .document-stack__sheet {
    height: 185px;
  }
  .document-stack__sheet--front {
    height: 204px;
    left: 48px;
  }
  .document-stack__badge {
    font-size: 9px;
    padding: 10px 14px;
  }
  .document-card__preview {
    height: 295px;
  }
  .document-filters button {
    padding: 9px 11px;
    font-size: 9px;
  }
  .documents-help > a {
    font-size: 16px;
  }
  .documents-help {
    padding: 18px;
    gap: 12px;
  }
  .documents-help h2 {
    font-size: 17px;
  }
}

/* Downloadable contract, separate from scanned image viewer. */
.document-card__preview--file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(135deg, #e7faff, #efedff);
  text-align: center;
  color: #526f8c;
  font-size: 14px;
  line-height: 1.8;
  padding: 24px;
}
.document-file-icon {
  display: grid;
  place-items: center;
  width: 90px;
  height: 110px;
  border: 2px solid #b4ddf1;
  border-radius: 15px 30px 15px 15px;
  background: #ffffffc9;
  color: #249fc6;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 10px 25px #6095b515;
}
