/* База для reveal-анимаций */
[data-anim="reveal"] {
  --reveal-x: 0; /* js перезапишет по data-anim-dir */
  --reveal-y: 16px;
  --reveal-dur: 700ms;
  --reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  opacity: 0;
  filter: blur(4px);
  transform: translate3d(var(--reveal-x), var(--reveal-y), 0) scale(0.98);
  will-change: transform, opacity, filter;

  transition: transform var(--reveal-dur) var(--reveal-ease),
    opacity var(--reveal-dur) var(--reveal-ease),
    filter var(--reveal-dur) var(--reveal-ease);
}

[data-anim="reveal"].is-inview {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

/* уважение к reduced-motion (js тоже это делает, но дублируем на всякий) */
@media (prefers-reduced-motion: reduce) {
  [data-anim="reveal"] {
    opacity: 1;
    filter: none;
    transform: none;

    transition: none !important;
  }
}

/* ===== Hero: Checkups ===== */

/* ===== Hero: Checkups (1 изображение) ===== */
.service-checkups {
  --hero-h: clamp(280px, 46vw, 532px);
}

.service-hero--checkups {
  padding: clamp(20px, 3vw, 28px) 0;
}

.service-hero--checkups .hero-card {
  position: relative;

  min-height: var(--hero-h);
  overflow: hidden;

  border-radius: 40px 266px 40px 40px;
  background: linear-gradient(97.25deg, #BEE0ED 8.84%, #B2D1DE 48.92%, #8AB8C8 91.28%, #7CA4B5 131.03%);
}
.service-hero--checkups {
    padding-top: 59px;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 12px;
}
.service-hero--checkups
/* одно изображение справа */
.hero-media {
  pointer-events: none;
}

.hero-illustration {
  position: absolute;

  bottom: 0;

  right: 149px;
  width: 26%;
  height: auto;
}

/* адаптив — не ломает сетку и вертикальную линию */
@media (width <= 900px) {
  .service-checkups {
    --hero-h: clamp(380px, 80vw, 520px);
  }

  .hero-illustration {
    right: clamp(8px, 4vw, 18px);
    bottom: clamp(-70px, -21vw, 24px);

    width: clamp(180px, 44vw, 260px);

    transform: rotate(-3deg);
  }
}

/* контейнер секции: можно повесить фон/линии как background-image */
.checks {
  --showcase-h: clamp(520px, 70vh, 760px);
  --veil-w: clamp(420px, 50vw, 760px);
  --gap: clamp(12px, 2.2vw, 22px);
  --card-h: clamp(280px, 28vw, 360px);
  --stagger: 0;
  position: relative;

  padding: clamp(28px, 6vw, 72px) 0;
  overflow-x: clip;
}

/* левая половина: фоновая картинка */
.doctor__grid::after,
.checks::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;

  width: 50%;

  background: var(--bg) left / contain no-repeat;

  pointer-events: none;
  content: "";
}

.checks__list {
  position: relative;

  display: grid;
  justify-content: end;
  align-items: start;
  gap: clamp(12px, 2.2vw, 22px);

  margin: 0;
  padding: 0;
  grid-auto-flow: row;
  grid-auto-rows: calc(var(--card-h) / 2);
  grid-template-columns: repeat(2, clamp(280px, 28vw, 360px));
  justify-items: end;
  list-style: none;
  padding-bottom: calc(var(--card-h) * var(--stagger));
}

.checks__list::before {
  display: block;

  content: "";
  grid-column: 1;
  grid-row: 1 / span 1;
}

.checks__item {
  z-index: 2;
  grid-row: span 2;
}

.checks__item.col--left {
  transform: translateY(calc(var(--card-h) * var(--stagger)));
  will-change: transform;
}

.surface-card {
    border-radius: 53px;
}
.surface-card {
  display: flex;
  flex-direction: column;

  text-decoration: none;
  color: inherit;

  cursor: pointer;
  padding-bottom: clamp(28px, 3.4vw, 38px);
}

.surface-card::after {
  position: absolute;
  right: clamp(22px, 3vw, 30px);
  bottom: 37px;
  left: clamp(22px, 3vw, 30px);

  height: 1px;

  background: color-mix(in srgb, var(--clr-dark-900, #000) 86%, transparent);

  opacity: 0.6;

  content: "";
}

.surface-card::before {
  --arr-w: 54px;
  --arr-h: 13px;
  --svg: url('data:image/svg+xml;utf8,<svg width="54" height="14" viewBox="0 0 54 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M53.5075 6.96512L41.5176 13.8433V8.09967L0.202148 8.09967V5.83057L41.5176 5.83057V0.0869141L53.5075 6.96512Z" fill="black"/></svg>');
  position: absolute;
  right: 21px;
  bottom: 58px;

  width: var(--arr-w);
  height: var(--arr-h);

  background: #000;

  opacity: 0.95;

  transition: transform 0.16s ease, opacity 0.16s ease;

  content: "";

  /* отдельно прописываем свойства, чтобы контролировать размер */
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-position: right 50%;
  mask-position: right 50%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 120% 100%;
  mask-size: 120% 100%;
}

.surface-card:is(:hover, :focus-visible)::before {
  opacity: 1;
  transform: translateX(4px);
}

/* Фокус-кольцо для клавиатуры */
.surface-card:focus-visible {
  outline: 2px solid
    color-mix(in srgb, var(--clr-accent-olive, #999b84) 55%, transparent);
  outline-offset: 3px;
}

/* ширина карточек — берем твои .surface-card, но ограничиваем по высоте */
.checks__item > .surface-card {
  position: relative;

  display: flex;
  flex-direction: column;

  width: clamp(280px, 28vw, 360px);
  max-width: 100%;
  height: clamp(280px, 28vw, 360px);
  min-height: var(--card-h);
  overflow: hidden;
}

.surface-card h3 {
  display: -webkit-box;

  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.surface-card p {
  display: -webkit-box;

  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* ===== адаптив ===== */

/* 1) на планшете — две колонки, но карточки растягиваются на всю ширину колонок */
@media (width <=1100px) {
  .checks__item > .surface-card {
    width: 100%;
    height: auto;
  }

  .checks__item.col--left {
    transform: none;
  }
}

/* 2) на телефоне — одна колонка в исходном порядке (как в HTML) */
@media (width <= 700px) {
  .checks__list {
    justify-content: stretch; /* не прижимать вправо */
    grid-auto-rows: auto;
    grid-template-columns: minmax(0, 1fr); /* одна колонка */
    justify-items: stretch; /* элементы тянутся на всю ширину */
  }

  .checks__list::before {
    display: none;

    height: 0;
  }

  .checks__item > .surface-card {
    width: 100% !important;
    max-width: none;
    height: auto;
  }

  .checks__item {
    transform: none;
    grid-column: 1 / -1; /* занять всю строку */
    grid-row: auto;
  }

  .checks__item.col--left {
    transform: none;
  }
}
.service-hero--checkups--white {
    background-color: #ffffff;
}
.cheks__wrap {
    position: relative;
}
@media screen and (max-width: 900px) {
    .service-hero--checkups {
        padding-left: 0;
        padding-right: 0;
    }
    .hero-subtitle {
        font-size: 16px;
        line-height: 28px;
    }
    .service-hero--checkups .hero-card {
        border-radius: 24px 163px 24px 24px;
        min-height: 324px;
    }
    .hero-text {
        max-width: 272px;
    }
    .service-hero--checkups .hero-illustration {
        width: 128px;
        bottom: 0;
        right: 50px;
    }
    .service-hero--checkups .hero-text {
        margin-top: 23px;
        padding-left: 19px;
        margin-left: 29px;
        padding-bottom: 0;
    }
    .service-hero--checkups .hero-title {
        margin-bottom: 10px;
    }
    .checks {
        padding-top: 51px;
    }
    .checks .container {
        padding-left: 45px;
        padding-right: 39px;
    }
    .checks__item .surface-card {
        padding: 40px 35px;
        border-radius: 40px;
        gap: 5px;
        min-height: 317px;
    }
    .checks__item .surface-card h3 {
        margin-bottom: 0;
    }
    .checks__item .surface-card::before {
        bottom: 48px;
    }
    .checks__list {
        grid-auto-rows: 170px;
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (max-width: 700px) {
    .checks__list {
        grid-auto-rows: auto;
    }
	.hero-text {
        max-width: 232px;
    }
}
@media screen and (min-width: 769px) {
  .site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}