/* About / prices / promotions overlays. Loaded after figma.css. */

/* --------------------------------------------------------------------------
   Values — equal-height cards (Качество no longer sticks out)
   extras.css sets align-items:start + overflow:visible on .value-card
   -------------------------------------------------------------------------- */
.values .values__grid {
  align-items: stretch;
}

.values .value-card {
  display: grid;
  grid-template-rows: 52px auto 1fr;
  align-items: start;
  justify-items: center;
  height: 100%;
  min-height: 240px;
  overflow: hidden;
  box-sizing: border-box;
}

.values .value-card__hold {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
}

.values .value-card__hold .value-card__icon,
.values svg.value-card__icon {
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
  max-width: 52px;
  max-height: 52px;
}

.values .values__text strong {
  font-weight: 700;
}

/* About hero: photo flush to page edges. No second rounded cookie / dark plate.
   Black wedges were the Figma PNG canvas (r≈43, #000), not animal corners.
   Desktop/tablet: solid right panel + blur fade; photo crop unchanged. */
.page--about .hero,
.page-template-tpl-about .hero,
.page--about .about-hero {
  --about-hero-share: 0.46;
  --about-hero-pad: var(--container-padding);
  --about-hero-blur: 190px;
  --about-hero-panel: calc(
    (100% - min(100%, var(--container-width))) / 2
    + var(--container-padding)
    + var(--about-hero-share) * (min(100%, var(--container-width)) - 2 * var(--container-padding))
    + var(--about-hero-pad)
  );
  border-radius: 0;
  overflow: hidden;
  background-color: var(--color-bg);
}

.page--about .hero::after,
.page-template-tpl-about .hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--about-hero-panel);
  background-color: var(--color-bg);
  z-index: 1;
  pointer-events: none;
}

.page--about .hero::before,
.page-template-tpl-about .hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  /* Tuck the blur edge under the panel: backdrop-filter draws a dark 1px seam at its edge. */
  right: calc(var(--about-hero-panel) - 24px);
  width: calc(var(--about-hero-blur) + 24px);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--color-bg) calc(100% - 24px));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(to right, transparent, #000 calc(100% - 24px));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 calc(100% - 24px));
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.page--about .hero__media,
.page-template-tpl-about .hero__media,
.page--about .about-hero__media {
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  background: none;
}

.page--about .hero__media::before,
.page--about .hero__media::after,
.page-template-tpl-about .hero__media::before,
.page-template-tpl-about .hero__media::after,
.page--about .about-hero__media::before {
  content: none;
}

.page--about .hero__img,
.page-template-tpl-about .hero__img,
.page--about .about-hero__photo,
.page--about .about-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  border-radius: 0;
  background: none;
}

.page--about .hero__container,
.page-template-tpl-about .hero__container {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.page--about .hero__content,
.page-template-tpl-about .hero__content {
  flex: 0 0 calc(var(--about-hero-share) * 100%);
  width: calc(var(--about-hero-share) * 100%);
  max-width: calc(var(--about-hero-share) * 100%);
  min-width: 0;
  color: var(--color-text);
}

.page--about .hero__text,
.page-template-tpl-about .hero__text,
.page--about .hero .features,
.page-template-tpl-about .hero .features {
  max-width: none;
}

@media (max-width: 1024px) {
  .page--about .hero,
  .page-template-tpl-about .hero {
    --about-hero-share: 0.55;
    --about-hero-blur: 170px;
  }
}

@media (max-width: 768px) {
  .page--about .hero,
  .page-template-tpl-about .hero {
    display: flex;
    flex-direction: column;
    padding-block: 0 var(--space-xl);
  }

  .page--about .hero::before,
  .page--about .hero::after,
  .page-template-tpl-about .hero::before,
  .page-template-tpl-about .hero::after {
    content: none;
  }

  .page--about .hero__media,
  .page-template-tpl-about .hero__media {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    height: 260px;
    flex: none;
  }

  .page--about .hero__img,
  .page-template-tpl-about .hero__img,
  .page--about .about-hero__photo,
  .page--about .about-hero__media img {
    object-position: 25% center;
  }

  .page--about .hero__container,
  .page-template-tpl-about .hero__container {
    display: block;
  }

  .page--about .hero__content,
  .page-template-tpl-about .hero__content {
    flex: none;
    width: 100%;
    max-width: none;
    padding-block-start: var(--space-md);
  }
}

/* About clinic specialties: 14 items, two columns next to photo. */
.page--about .clinic__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-md);
  margin-block: var(--space-md);
}

@media (max-width: 480px) {
  .page--about .clinic__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-template-tpl-about .clinic-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-block-start: 24px;
}

.page-template-tpl-about .clinic-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
}

.page-template-tpl-about .clinic-gallery__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 768px) {
  .page-template-tpl-about .clinic-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* Compact CTA on about + promotions. Plus is already hidden in figma.css. */
.page-template-tpl-about .cta,
.page-template-tpl-promotions .cta {
  padding-block: 0 48px;
}

.page-template-tpl-about .cta__banner,
.page-template-tpl-promotions .cta__banner {
  min-height: 180px;
  padding: 28px 40px;
}

.page-template-tpl-about .cta__title,
.page-template-tpl-promotions .cta__title {
  font-size: 28px;
}

.page-template-tpl-about .cta__text,
.page-template-tpl-promotions .cta__text {
  font-size: 16px;
}

.page-template-tpl-about .cta__button,
.page-template-tpl-promotions .cta__button {
  background: #fff;
  color: var(--color-primary-dark, #13706f);
  font-weight: 600;
  font-size: 18px;
}

/* --------------------------------------------------------------------------
   Promotions — H1 one line, no giant intro media, cards under title
   -------------------------------------------------------------------------- */
.page-template-tpl-promotions .promotions {
  padding-block: 24px 64px;
}

.page-template-tpl-promotions .promotions-intro__title {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-primary, #15a3a5);
  white-space: nowrap;
}

.page-template-tpl-promotions .promotions-intro__text {
  max-width: 640px;
  margin-block: 12px 28px;
}

.page-template-tpl-promotions .promotions__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.page-template-tpl-promotions .promotions-intro__media,
.page-template-tpl-promotions .promotions-intro__percent {
  display: none;
}

/* --------------------------------------------------------------------------
   Prices — larger table/category type, hide leftover note
   -------------------------------------------------------------------------- */
.page-template-tpl-prices .prices__categories a {
  font-size: 16px;
  min-height: 56px;
}

.page-template-tpl-prices .prices__panel-title {
  font-size: 22px;
}

.page-template-tpl-prices .prices__table,
.page-template-tpl-prices .prices__table th,
.page-template-tpl-prices .prices__table td {
  font-size: 17px;
}

.page-template-tpl-prices .prices__table th,
.page-template-tpl-prices .prices__table td {
  padding: 12px 16px;
}

.page-template-tpl-prices .prices__layout,
.page-template-tpl-prices .prices__panels,
.page-template-tpl-prices .prices__panel {
  min-width: 0;
}

.page-template-tpl-prices .prices__table tr.prices__group th {
  width: auto;
  text-align: start;
  white-space: normal;
  font-weight: var(--fw-bold);
  color: var(--color-primary-dark);
  background-color: var(--color-surface-soft);
  box-shadow: inset 0 1px 0 var(--color-border);
  padding-top: 28px;
}

.page-template-tpl-prices .prices__table tbody tr.prices__group:first-child th {
  padding-top: 12px;
  box-shadow: none;
}

.page-template-tpl-prices .prices__table-wrap--matrix {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.page-template-tpl-prices .prices__table--matrix {
  width: max-content;
  min-width: 100%;
}

.page-template-tpl-prices .prices__table--matrix th,
.page-template-tpl-prices .prices__table--matrix td {
  width: auto;
  white-space: nowrap;
}

.page-template-tpl-prices .prices__table--matrix thead th:not(:first-child),
.page-template-tpl-prices .prices__table--matrix tbody td {
  text-align: end;
}

.page-template-tpl-prices .prices__table--matrix tbody td {
  font-weight: var(--fw-medium);
  color: var(--color-primary-dark);
}

.page-template-tpl-prices .prices__table--matrix tbody th {
  font-weight: var(--fw-regular);
  color: var(--color-text);
  text-align: start;
}

.page-template-tpl-prices .prices__table--matrix thead th:first-child,
.page-template-tpl-prices .prices__table--matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--color-surface);
  box-shadow: 1px 0 0 var(--color-border);
}

.page-template-tpl-prices .prices__table--matrix thead th:first-child {
  z-index: 2;
  text-align: start;
}

.page-template-tpl-prices .prices__table--matrix tbody tr:hover th {
  background-color: var(--color-surface-soft);
}

.page-template-tpl-prices .prices__note {
  display: none;
}

@media (max-width: 1024px) {
  .page-template-tpl-promotions .promotions__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-template-tpl-about .cta__banner,
  .page-template-tpl-promotions .cta__banner {
    min-height: 160px;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .page-template-tpl-promotions .promotions-intro__title {
    white-space: normal;
  }

  .page-template-tpl-promotions .promotions__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .values .value-card {
    min-height: 0;
  }

  .page-template-tpl-prices .prices__table,
  .page-template-tpl-prices .prices__table th,
  .page-template-tpl-prices .prices__table td {
    font-size: 16px;
  }
}

.prices__note {
  margin-top: 16px;
  font-size: 14px;
  font-style: italic;
  color: #5a6f72;
}

.articles-hub__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  margin: 0;
  flex: none;
}

/* --------------------------------------------------------------------------
   Reviews — louder intro + stats (caption ~2 lines on desktop)
   display:contents lifts title/text so caption can use full row width
   -------------------------------------------------------------------------- */
.page-template-tpl-reviews .reviews-intro__inner {
  align-items: center;
  gap: 16px 52px;
}

.page-template-tpl-reviews .reviews-intro__content {
  display: contents;
}

.page-template-tpl-reviews .reviews-intro__title {
  grid-column: 1;
  grid-row: 1;
}

.page-template-tpl-reviews .reviews-intro__aside {
  grid-column: 2;
  grid-row: 1;
}

.page-template-tpl-reviews .reviews-intro__text {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  margin-block-start: 0;
  font-size: 20px;
  line-height: 1.45;
}

.page-template-tpl-reviews .reviews-stats__icon {
  width: 28px;
  height: 28px;
}

.page-template-tpl-reviews .reviews-stats__value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary);
}

.page-template-tpl-reviews .reviews-stats__label {
  max-width: 240px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-text);
}

.page-template-tpl-reviews .reviews-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: start;
  gap: var(--space-md) var(--space-lg);
  align-items: start;
}

.page-template-tpl-reviews .reviews-stats__item {
  justify-self: start;
  max-width: 100%;
}

.page-template-tpl-reviews .reviews-stats__item--award {
  padding: 8px 12px 10px;
  background: linear-gradient(165deg, #fffdf6 0%, #ffe9a3 55%, #ffd978 100%);
  border: 1px solid #f0c94d;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 3px 0 #e8b83a,
    0 8px 14px rgba(24, 90, 92, 0.1);
  transform: rotate(-1.2deg);
}

.page-template-tpl-reviews .reviews-stats__item--award .reviews-stats__icon {
  width: 32px;
  height: 32px;
  color: #e2a800;
}

.page-template-tpl-reviews .reviews-stats__item--award .reviews-stats__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary-dark);
}

.page-template-tpl-reviews .reviews-stats__item--award .reviews-stats__label {
  max-width: none;
}

@media (max-width: 1024px) {
  .page-template-tpl-reviews .reviews-intro__content {
    display: block;
  }

  .page-template-tpl-reviews .reviews-intro__title,
  .page-template-tpl-reviews .reviews-intro__text,
  .page-template-tpl-reviews .reviews-intro__aside {
    grid-column: auto;
    grid-row: auto;
  }

  .page-template-tpl-reviews .reviews-intro__text {
    margin-block-start: var(--space-sm);
    font-size: 18px;
  }

  .page-template-tpl-reviews .reviews-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
  }

  .page-template-tpl-reviews .reviews-stats__item--award {
    transform: none;
  }

  .page-template-tpl-reviews .reviews-stats__value {
    font-size: 30px;
  }

  .page-template-tpl-reviews .reviews-stats__item--award .reviews-stats__value {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-template-tpl-reviews .reviews-intro__text {
    font-size: 17px;
  }

  .page-template-tpl-reviews .reviews-stats__value {
    font-size: 28px;
  }

  .page-template-tpl-reviews .reviews-stats__item--award .reviews-stats__value {
    font-size: 18px;
  }

  .page-template-tpl-reviews .reviews-stats__label {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .page-template-tpl-reviews .reviews-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .page-template-tpl-reviews .reviews-stats__item--award {
    padding: 6px 8px 8px;
  }
}
