/* Doctor page — scoped styles (prefix: doctor-page__) */

.doctor-page {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.doctor-page__banner {
  position: relative;
  height: var(--inner-page-banner-height);
  min-height: var(--inner-page-banner-min-height);
  overflow: hidden;
  z-index: 0;
}

.doctor-page__banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
  filter: saturate(0.98) contrast(1.02) brightness(0.9);
  transform: scale(1.05);
  transform-origin: center top;
}

.doctor-page__banner-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      820px 320px at 15% 20%,
      rgba(51, 78, 94, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 420px at 85% 30%,
      rgba(152, 131, 131, 0.2),
      transparent 56%
    ),
    linear-gradient(
      180deg,
      rgba(51, 78, 94, 0.38) 0%,
      rgba(51, 78, 94, 0.18) 48%,
      rgba(255, 255, 255, 0.96) 100%
    );
}

.doctor-page__banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(126px + clamp(20px, 3.5vh, 56px)) 18px 26px;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.doctor-page__banner-title {
  margin: 0;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(26px, 2.8vw + 14px, 46px);
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  max-width: 28ch;
}

.doctor-page__banner-subtitle {
  margin: 0;

  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
  font-size: clamp(15px, 0.6vw + 13px, 18px);
}

.doctor-page__banner-content .doctor-page__eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.doctor-page__body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(
      ellipse 78% 52% at 100% 8%,
      var(--bg-spot-mint) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 65% 48% at 0% 92%,
      var(--bg-spot-warm) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 55%, #f4f7f9 100%);
  padding: 56px 0 0;
}

.doctor-page__inner {
  position: relative;
  z-index: 1;
  padding: 56px 0 88px;
  display: flex;
  flex-direction: column;
  gap: 54px;
}

.doctor-page__plaque {
  width: 100%;
  margin: 0;
}

.doctor-page__plaque-wrap {
  margin-top: -14px;
  margin-bottom: 12px;
}

.doctor-page__plaque-shell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 78, 94, 0.1);
  box-shadow: 0 22px 55px rgba(8, 42, 58, 0.12);
  background:
    radial-gradient(
      720px 320px at 18% 10%,
      rgba(120, 224, 238, 0.22) 0%,
      transparent 58%
    ),
    radial-gradient(
      720px 320px at 82% 30%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgba(8, 42, 58, 0.86) 0%,
      rgba(11, 74, 95, 0.88) 28%,
      rgba(22, 95, 108, 0.88) 52%,
      rgba(18, 78, 90, 0.88) 78%,
      rgba(10, 38, 48, 0.88) 100%
    );
  color: rgba(255, 255, 255, 0.9);
}

.doctor-page__plaque-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.doctor-page__plaque-item {
  padding: 16px 16px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 102px;
}

.doctor-page__plaque-item:last-child {
  border-right: 0;
}

.doctor-page__plaque-title {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
}

.doctor-page__plaque-text {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.doctor-page__plaque-link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  width: fit-content;
}

.doctor-page__plaque-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.doctor-page__plaque-nav {
  display: none;
}

@media (max-width: 860px) {
  .doctor-page__plaque-track {
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .doctor-page__plaque-item {
    scroll-snap-align: start;
  }

  .doctor-page__plaque-nav {
    display: grid;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(10, 38, 48, 0.55);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    z-index: 3;
  }

  .doctor-page__plaque-nav--prev {
    left: 10px;
  }

  .doctor-page__plaque-nav--next {
    right: 10px;
  }
}

.doctor-page__back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(15, 23, 42, 0.78);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(51, 78, 94, 0.08);
}

.doctor-page__back:hover {
  background: rgba(255, 255, 255, 0.92);
}

.doctor-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
}

@media (min-width: 981px) {
  .doctor-profile {
    gap: 0;
  }

  .doctor-profile__content {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
  }

  .doctor-profile__card {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 1px solid rgba(51, 78, 94, 0.1) !important;
  }
}

.doctor-page--matviienko .doctor-profile {
  gap: 0;
}

.doctor-page--matviienko .doctor-profile__content {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
}

.doctor-page--matviienko .doctor-profile__card {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid rgba(51, 78, 94, 0.1);
}

.doctor-profile__content {
  height: 100%;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(51, 78, 94, 0.08);
  box-shadow:
    0 20px 48px rgba(51, 78, 94, 0.055),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doctor-profile__content .doctor-profile__eyebrow {
  margin: 0;
}

.doctor-profile__content .doctor-profile__title {
  margin-top: 2px;
}

.doctor-profile__card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(51, 78, 94, 0.08);
  box-shadow:
    0 20px 48px rgba(51, 78, 94, 0.055),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.doctor-profile__media {
  position: relative;
  /* Баланс: менше висоти, але без агресивного обрізання */
  aspect-ratio: 5 / 5;

  overflow: hidden;
  background: rgba(51, 78, 94, 0.06);
}

.doctor-profile__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

.doctor-profile__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 12%;
  position: relative;
  z-index: 0;
}

.doctor-profile__meta {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.doctor-profile__name {
  margin: 0;
  font-size: clamp(22px, 1.4vw + 16px, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.doctor-profile__role {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.doctor-profile__facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(51, 78, 94, 0.08);
}

.doctor-profile__fact {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(15, 23, 42, 0.84);
  line-height: 1.5;
}

.doctor-profile__fact-label {
  flex: 0 0 auto;
  font-weight: 850;
  color: rgba(15, 23, 42, 0.7);
}

.doctor-profile__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doctor-profile__eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shirt-tone);
}

.doctor-profile__title {
  margin: 0;
  font-size: clamp(24px, 1.8vw + 14px, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.doctor-profile__lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* Expanded profile blocks (used on Matviienko page for now) */
.doctor-profile__description {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.doctor-profile__blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.doctor-profile__blocks--full {
  grid-template-columns: 1fr;
}

.doctor-profile__info-block {
  position: relative;
  padding: 16px 16px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  box-shadow:
    0 16px 38px rgba(8, 42, 58, 0.06),
    0 0 0 rgba(255, 255, 255, 0) inset;
}

.doctor-profile__info-block::before {
  content: none;
}

.doctor-profile__info-block > * {
  position: relative;
  z-index: 1;
}

.doctor-profile__block-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.84);
}

.doctor-profile__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.doctor-profile__specialties {
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.doctor-profile__cta-inline {
  margin-top: 2px;
  padding: 16px 16px;
  border-radius: 10px;
  border: 1px solid rgba(51, 78, 94, 0.12);
  background:
    radial-gradient(
      520px 240px at 15% 0%,
      rgba(120, 224, 238, 0.16),
      transparent 60%
    ),
    radial-gradient(
      520px 240px at 85% 30%,
      rgba(152, 131, 131, 0.14),
      transparent 60%
    ),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(51, 78, 94, 0.055);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
}

.doctor-profile__cta-text {
  margin: 0;
  color: rgba(15, 23, 42, 0.84);
  line-height: 1.55;
  max-width: 54ch;
  font-weight: 650;
}

.doctor-profile__cta-button {
  flex: 0 0 auto;
}

.doctor-profile__experience-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 38, 48, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.doctor-profile__stats {
  padding-top: 10px;
  border-top: 1px solid rgba(51, 78, 94, 0.08);
  display: grid;
  gap: 10px;
}

.doctor-profile__stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.doctor-profile__stat-num {
  font-weight: 900;
  letter-spacing: -0.03em;
  color: rgba(15, 23, 42, 0.9);
  font-size: 20px;
  line-height: 1;
}

.doctor-profile__stat-desc {
  color: rgba(15, 23, 42, 0.62);
  font-weight: 700;
  font-size: 13px;
}

/* Темна плашка з трьома колонками (замість світлих карток) */
.doctor-page__info-plaque {
  margin: 0;
}

.doctor-page--matviienko .doctor-page__contact {
  width: 100vw;
  max-width: none;
  position: relative;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: 64px;
  padding-bottom: 8px;
}

.doctor-page--matviienko .doctor-page__contact .container {
  padding-bottom: 56px;
}

.doctor-page--matviienko .doctor-page__contact .contact-form__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.doctor-page--matviienko .doctor-page__contact .doctor-page__contact-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 78% 52% at 100% 8%,
      rgba(17, 166, 184, 0.14) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 65% 48% at 0% 92%,
      rgba(152, 131, 131, 0.14) 0%,
      transparent 55%
    ),
    radial-gradient(
      980px 420px at 18% 18%,
      rgba(120, 224, 238, 0.12) 0%,
      transparent 58%
    ),
    linear-gradient(
      180deg,
      #f7fbfc 0%,
      rgba(255, 255, 255, 0.86) 55%,
      #f4f7f9 100%
    );
  opacity: 1;
}

.doctor-page--matviienko .doctor-page__contact .contact-form__grid {
  border-color: rgba(51, 78, 94, 0.1);
}

.doctor-page__info-plaque-shell {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 78, 94, 0.1);
  box-shadow: 0 22px 55px rgba(8, 42, 58, 0.12);
  background:
    radial-gradient(
      720px 320px at 18% 10%,
      rgba(120, 224, 238, 0.2) 0%,
      transparent 58%
    ),
    radial-gradient(
      720px 320px at 82% 30%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgba(8, 42, 58, 0.84) 0%,
      rgba(11, 74, 95, 0.86) 28%,
      rgba(22, 95, 108, 0.86) 52%,
      rgba(18, 78, 90, 0.86) 78%,
      rgba(10, 38, 48, 0.86) 100%
    );
  color: rgba(255, 255, 255, 0.9);
}

.doctor-page__info-plaque-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doctor-page__info-plaque-item {
  margin: 0;
  padding: 18px 18px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.doctor-page__info-plaque-item:last-child {
  border-right: 0;
}

.doctor-page__info-plaque-title {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.2;
  /* Вирівнюємо старт тексту по Y між колонками */
  min-height: calc(2 * 1.2em);
  display: flex;
  align-items: flex-end;
}

.doctor-page__info-plaque-text {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.doctor-page__info-plaque-list {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.doctor-page__cta {
  margin: 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      560px 220px at 82% 0%,
      rgba(120, 224, 238, 0.2) 0%,
      transparent 62%
    ),
    radial-gradient(
      720px 320px at 18% 8%,
      rgba(17, 166, 184, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      880px 360px at 14% 0%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgb(8, 42, 58) 0%,
      rgb(11, 74, 95) 28%,
      rgb(22, 95, 108) 52%,
      rgb(18, 78, 90) 78%,
      rgb(10, 38, 48) 100%
    );
  color: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.doctor-page__cta-text {
  margin: 0;
  font-size: clamp(17px, 1.2vw + 14px, 21px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 42ch;
}

.doctor-page__cta .button--primary {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--brand);
  box-shadow: none;
}

.doctor-page__cta .button--primary:hover {
  background: #fff;
  color: var(--brand);
}

@media (max-width: 980px) {
  .doctor-profile {
    grid-template-columns: 1fr;
  }

  /* На мобільному: спершу фото/факти, потім текст */
  .doctor-profile__card {
    order: 1;
  }

  .doctor-profile__content {
    order: 2;
  }
}

@media (max-width: 1024px) {
  .doctor-page__info-plaque-track {
    grid-template-columns: 1fr;
  }

  .doctor-profile__blocks {
    grid-template-columns: 1fr;
  }

  .doctor-profile__cta-inline {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .doctor-profile__cta-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .doctor-page__inner {
    padding: 40px 0 64px;
    gap: 40px;
  }

  .doctor-page__cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .doctor-page__cta .button--primary {
    width: 100%;
    justify-content: center;
  }
}
