@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --primary: #0ea5a3;
  --primary-600: #0c8e8c;
  --text-dark: #111827;
  --text-light: #6b7280;
  --text: #1f2937;
  --white: #ffffff;
  --bg: #f7f9fb;
  --card: #ffffff;
  --outline: #e5e7eb;
  --shadow: 0 10px 30px rgba(2, 24, 58, .18);
  --radius: 16px;
}


* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.btn { display:inline-flex; align-items:center; justify-content:center; height: 38px; margin: 6px 6px 6px 0; padding: 0 16px; border-radius: 12px; border: 1px solid var(--outline); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; text-decoration:none; }
.btn:hover { background: #f4f7f7; }
body {
  font-family: "Roboto", sans-serif;
}

.container {
  max-width: 1200px;
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav {
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.link a {
  text-decoration: none;
  color: var(--text-light);
  cursor: pointer;
  transition: 0.3s;
}

.link a:hover {
  color: var(--primary);
}

.header {
  padding: 0 1rem;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.content h1 {
  margin-bottom: 1rem;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-dark);
}

.content h1 span {
  font-weight: 400;
}

.content p {
  margin-bottom: 2rem;
  color: var(--text-light);
  line-height: 1.75rem;
}

.image {
  position: relative;
  text-align: center;
  isolation: isolate;
}

.image__bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 450px;
  width: 450px;
  background-color: var(--primary);
  border-radius: 100%;
  z-index: -1;
}

.image img {
  width: 100%;
  max-width: 475px;
}

.image__content {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2);
}

.image__content__1 {
  transform: translate(calc(-50% - 12rem), calc(-50% - 8rem));
}

.image__content__1 span {
  padding: 10px 12px;
  font-size: 1.5rem;
  color: var(--primary);
  background-color: #defcf4;
  border-radius: 100%;
}

.image__content__1 h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.image__content__1 p {
  color: var(--text-light);
}

.image__content__2 {
  transform: translate(calc(-50% + 8rem), calc(-50% + 10rem));
}

.image__content__2 ul {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.image__content__2 li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-light);
}

.image__content__2 span {
  font-size: 1.5rem;
  color: var(--primary);
}

@media (width < 900px) {
  .nav__links {
    display: none;
  }

  .header {
    padding: 1rem;
    grid-template-columns: repeat(1, 1fr);
  }

  .content {
    text-align: center;
  }

  .image {
    grid-area: 1/1/2/2;
  }
}

body {
  margin: 0;
  background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
}

/* демо-кнопка, можно убрать — в реальном проекте ее заменят .book-btn на карточках */
.demo {
  display: flex;
  justify-content: center;
  padding: 48px;
}

.btn { display:inline-flex; align-items:center; justify-content:center; height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--outline); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; text-decoration:none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }

.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }

/* ================= MODAL (mobile-friendly) ================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal[aria-hidden="false"] { display: block; }

/* блокируем фон при открытой модалке */
body.modal-open {
  overflow: hidden;
  height: 100dvh;           /* фикс под iOS/Android адрес-бар */
  touch-action: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
}

/* ===== диалог: центр на десктопе, ограничение по высоте + скролл тела ===== */
.modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 92vw);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(90dvh, 680px); /* чтобы влезала и прокручивалась */
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;        /* чуть компактнее */
  border-bottom: 1px solid var(--outline);
}
.modal__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 22px);
}
.modal__subtitle {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.modal__close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
}
.modal__close:focus-visible {
  outline: 3px solid rgba(14, 165, 163, .45);
  outline-offset: 2px;
}

/* тело прокручивается, шапка/футер — фиксированные области */
.modal__body {
  padding: 14px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}


@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

label {
  font-weight: 700;
  font-size: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* фикс под iOS: 16px, чтобы не было зума; добавил select */
input, textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 12px;        /* компактнее */
  font: inherit;
  font-size: 16px;
}
textarea {
  min-height: 88px;
  resize: vertical;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--outline);
}
.modal__dialog,
.modal__body {
  overflow-x: hidden;
}


/* подсказки / ошибки */
.helper { font-size: 12px; color: var(--muted); margin-top: 6px; }
.error  { border-color: #ef4444; }

/* ===== Мобильный режим: полноэкранная модалка со «стикнутыми» шапкой/футером ===== */
@media (max-width: 560px) {
  .modal__dialog {
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    transform: none;
    width: 100%;
    height: 100dvh;       /* ровно по экрану */
    max-height: 100dvh;
    border-radius: 0;     /* снимаем скругления */
  }

  .modal__header,
  .modal__footer {
    position: sticky;
    z-index: 2;
    background: var(--card);
  }
  .modal__header { top: 0;    border-bottom: 1px solid var(--outline); }
  .modal__footer { bottom: 0; border-top:    1px solid var(--outline); }

  .modal__body {
    flex: 1;               /* занимает всё между шапкой и футером */
    padding: 12px 14px;    /* компактные отступы */
  }

  .modal__title    { font-size: 17px; }
  .modal__subtitle { font-size: 12px; }
}


html, body { background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; }

/* ====== СЕКЦИЯ СПИСКА ВРАЧЕЙ ====== */
.doctors-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
}

.doctors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.doctors-title {
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0;
}

/* ====== ПАНЕЛЬ ФИЛЬТРОВ (заглушка-верстка) ====== */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filters select {
  background: #fff;
  border: 1px solid var(--outline);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 155px;
  box-shadow: var(--shadow);
}

/* ====== ГРИД КАРТОЧЕК ====== */
.doctors-grid {
  display: grid;
  gap: 18px;
  /* 3 колонки на десктопе; уменьшаем на брейкпоинтах ниже */
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 640px) {
  .doctors-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== КАРТОЧКА ВРАЧА ====== */
.doctor-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.doctor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(2, 24, 58, .10);
}

.doctor-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  /* аватар + контент */
  gap: 14px;
  padding: 16px;
}

/* ====== АВАТАР (SVG-заглушка) ====== */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #eaf3f3;
  background: #eaf7f7;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar svg {
  width: 60%;
  height: 60%;
  fill: var(--primary);
}

/* ====== ТЕКСТЫ ====== */
.doctor-name {
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 2px;
}

.doctor-specialty {
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 8px;
}

.doctor-desc {
  color: var(--muted);
  margin: 0 0 12px;
}

/* ====== КНОПКИ ====== */
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn { display:inline-flex; align-items:center; justify-content:center; height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--outline); background: #fff; color: var(--text); font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; text-decoration:none; }
.btn:hover { background: #f4f7f7; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }

.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }

/* ====== ДОП: фокус для доступности ====== */
.btn:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 165, 163, .45);
  outline-offset: 2px;
}

/* Visually hidden (for a11y) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

/* ====== Basic top nav used on all pages ====== */
.site-nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom:1px solid var(--outline);
  background:#fff;
}
.site-nav__brand { font-weight:800; color:var(--primary); text-decoration:none; }
.site-nav__links { display:flex; gap:12px; }
.site-nav__links a { color:var(--text); text-decoration:none; padding:8px 10px; border-radius:10px; }
.site-nav__links a:hover, .site-nav__links a[aria-current="page"] { background:#f0f5f5; }
.container { padding-left:16px; padding-right:16px; }
.spacer-b { padding-bottom: 24px; }

/* ===== Language Picker (public) ===== */
.lang-picker{
  --lp-bg: rgba(0,0,0,.06);
  --lp-border: rgba(0,0,0,.12);
  --lp-active: #111;
  --lp-active-bg: #fff;
  --lp-shadow: 0 2px 12px rgba(0,0,0,.08);
  --lp-radius: 14px;
  --lp-gap: 1px;

  display: inline-flex;
  align-items: center;
  gap: var(--lp-gap);
  padding: 4px;
  border-radius: calc(var(--lp-radius) + 2px);
  background: var(--lp-bg);
  border: 1px solid var(--lp-border);
  backdrop-filter: blur(6px);
}

.lang-item{
  --pad-x: 13px;
  --pad-y: 6px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--lp-radius);
  text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
  color: rgba(0,0,0,.65);
  line-height: 1;
  transition: transform .12s ease, background-color .12s ease, color .12s ease, box-shadow .12s ease;
  outline: none;
}
.lang-item:hover{ background: rgba(255,255,255,.6); color: #000; }
.lang-item:focus-visible{ box-shadow: 0 0 0 3px rgba(0, 95, 204, .25); }
.lang-item.is-active{ background: var(--lp-active-bg); color: var(--lp-active); box-shadow: var(--lp-shadow); }

@media (prefers-color-scheme: dark){
  .lang-picker{
    --lp-bg: rgba(255,255,255,.06);
    --lp-border: rgba(255,255,255,.14);
    --lp-active: #fff;
    --lp-active-bg: rgba(255,255,255,.08);
    --lp-shadow: 0 4px 16px rgba(0,0,0,.35);
  }
  .lang-item{ color: rgba(255,255,255,.7); }
  .lang-item:hover{ background: rgba(255,255,255,.12); color: #fff; }
}

@media (max-width: 420px){
  .lang-item{ --pad-x: 10px; font-size: 10px; min-width: 40px; }
}

/* Если у nav .site-nav — выровнять вправо */
.site-nav .lang-picker{ margin: 2px; }

