/* ==========================================================================
   Arstileht – single-doctor.php, inc/doctor.php, js/doctor.js
   Stiil: puhas ja kliiniline. Nurgad 2px (kiibid, väljad) ja 4px (nupud, pildid, paneelid).
   Sakala romb ainult väikese märgina (pealkirja silt, loetelutäpid) – mitte dekoratsioonina.
   Värvilised sektsioonid on täislaiuses (box-shadow + clip-path, horisontaalset kerimist ei teki).
   ========================================================================== */

.doctor-page {
  --dp-r-sm: 2px; --dp-r: 4px;
  --dp-plum: var(--color-main, #4D1C46); --dp-blush: #FDEBE7; --dp-peach: #FABA92;
  --dp-muted: #7E6278; --dp-soft: #6E5068; --dp-line: #EBDAD5;
  --dp-romb: url("../img/layout/sakala-romb.svg");
  color: var(--color-text);
}
.dp-container { max-width: 1200px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }

/* --- Ülariba: murdtee + "Kogu meeskond" --- */
.dp-topbar { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.dp-topbar .breadcrumbs { margin: 0; }
.dp-team-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--dp-line); border-radius: var(--dp-r-sm); background: #fff;
  font: 500 15px/20px Montserrat, sans-serif; color: var(--color-main); cursor: pointer;
  transition: border-color .15s ease;
}
.dp-team-toggle:hover, .dp-team.is-open .dp-team-toggle { border-color: var(--color-main); }
.dp-team-toggle svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform .25s ease; }
.dp-team.is-open .dp-team-toggle svg { transform: rotate(180deg); }
.dp-team-count { color: var(--dp-muted); font-weight: 400; }

/* --- Meeskonna paneel (desktop): filtrid paigal, ainult nimekiri kerib --- */
@keyframes dp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes dp-sheet { from { transform: translateY(100%); } to { transform: none; } }
.dp-team-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); box-sizing: border-box;
  display: flex; flex-direction: column; max-height: min(72vh, 680px); overflow: hidden; padding: 0;
  background: #fff; border-radius: var(--dp-r);
  box-shadow: 0 24px 48px rgba(77, 28, 70, .14), 0 0 0 1px rgba(77, 28, 70, .06);
  animation: dp-in .18s ease-out;
}
.dp-team-panel[hidden] { display: none; }
.dp-team-head { display: none; }
.dp-team-backdrop { display: none; }

.dp-team-filters { flex-shrink: 0; padding: 24px 28px 16px; border-bottom: 1px solid #F3E7E3; }
.dp-team-search { position: relative; display: block; margin-bottom: 16px; }
.dp-team-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dp-muted); pointer-events: none; }
.dp-team-search input {
  width: 100%; height: 48px; box-sizing: border-box; margin: 0; padding: 0 16px 0 44px;
  border: 1px solid var(--dp-line); border-radius: var(--dp-r-sm); background: #fff;
  font: 400 16px/24px Montserrat, sans-serif; color: var(--color-main);
  -webkit-appearance: none; appearance: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.dp-team-search input::placeholder { color: var(--dp-muted); opacity: 1; }
.dp-team-search input:focus { outline: none; border-color: var(--color-main); box-shadow: 0 0 0 3px rgba(77, 28, 70, .08); }

.dp-team-chips { transition: opacity .15s ease; }
.dp-team-chips.is-muted { opacity: .45; }
.dp-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dp-filter-row + .dp-filter-row { margin-top: 12px; }
.dp-filter-label { min-width: 72px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dp-muted); }
.dp-filter-sep { width: 1px; height: 24px; margin: 0 6px; background: var(--dp-line); }
.dp-chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--dp-line); border-radius: var(--dp-r-sm); background: #fff;
  font: 500 14px/20px Montserrat, sans-serif; color: var(--color-main); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.dp-chip-btn:hover { border-color: var(--color-main); }
.dp-chip-btn[aria-pressed="true"] { background: var(--color-main); border-color: var(--color-main); color: #FFF4EE; }
.dp-chip-btn:disabled { opacity: .4; cursor: default; }
.dp-chip-btn:disabled:hover { border-color: var(--dp-line); }
.dp-chip-n { font-size: 12px; font-weight: 400; color: var(--dp-muted); }
.dp-chip-btn[aria-pressed="true"] .dp-chip-n { color: rgba(255, 244, 238, .7); }
.dp-chip-btn--staff { border-style: dashed; }
.dp-chip-btn--staff[aria-pressed="true"] { border-style: solid; }

.dp-team-summary { flex-shrink: 0; display: flex; align-items: center; gap: 16px; min-height: 18px; margin-top: 14px; font-size: 13px; line-height: 18px; color: var(--dp-soft); }
.dp-team-reset {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 13px/18px Montserrat, sans-serif; color: var(--color-theme);
  text-decoration: underline; text-underline-offset: 3px;
}

.dp-team-list {
  flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  margin: 0; padding: 20px 28px 36px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
}
.dp-team-cols { columns: 4 200px; column-gap: 40px; }
.dp-team-group { break-inside: avoid; margin-bottom: 20px; }
.dp-team-group-title { margin: 0 0 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dp-muted); }
.dp-team-group ul { list-style: none; margin: 0; padding: 0; }
.dp-team-group a { display: block; padding: 3px 0; font-size: 15px; line-height: 22px; color: var(--color-main); text-decoration: none; transition: color .15s ease; }
.dp-team-group a:hover { color: var(--color-theme); }
.dp-team-group a.is-current { color: var(--color-theme); font-weight: 600; }
.dp-team-group.is-staff a { color: var(--dp-soft); }
.dp-team-group.is-staff a:hover { color: var(--color-theme); }
.dp-team-loading { margin: 0; font-size: 15px; color: var(--dp-soft); }

/* --- Hero --- */
.dp-hero { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: center; padding: 48px 0 88px; }
.dp-photo { grid-column: 1; position: relative; padding: 0 0 40px 32px; }
.dp-photo::before { content: ""; position: absolute; left: 0; bottom: 0; width: 78%; height: 72%; background: var(--dp-blush); border-radius: var(--dp-r); }
.dp-photo img {
  position: relative; display: block; width: 100%; height: auto; aspect-ratio: 550 / 737; object-fit: cover;
  border-radius: var(--dp-r);
}
.dp-intro { grid-column: 3; }
.dp-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dp-muted); }
.dp-eyebrow::before {
  content: ""; width: 8px; height: 8px; flex-shrink: 0; background: var(--color-theme);
  -webkit-mask: var(--dp-romb) center / contain no-repeat;
          mask: var(--dp-romb) center / contain no-repeat;
}
.dp-name { margin: 20px 0 0; font-size: 56px; line-height: 64px; font-weight: 400; color: var(--color-main); }
.dp-subtitle { margin: 16px 0 0; font-size: 22px; line-height: 30px; font-weight: 500; color: var(--dp-soft); }
.dp-services { margin: 8px 0 0; font-size: 16px; line-height: 24px; color: var(--dp-soft); }
.dp-note {
  display: flex; align-items: flex-start; gap: 10px; max-width: 520px; margin: 20px 0 0; padding: 12px 16px;
  border-left: 2px solid var(--color-theme); background: #FDF4F1; border-radius: 0 var(--dp-r) var(--dp-r) 0;
  font-size: 14px; line-height: 20px; color: var(--color-main);
}
.dp-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--color-theme); }
.dp-clinics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.dp-clinics-label { margin-right: 4px; font-size: 14px; line-height: 20px; color: var(--dp-soft); }
.dp-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--dp-line); border-radius: var(--dp-r-sm); background: #fff;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--color-main); text-decoration: none;
}
a.dp-chip:hover { border-color: var(--color-main); color: var(--color-main); }
.dp-chip svg { width: 12px; height: 16px; flex-shrink: 0; }
.dp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }
/* Broneerimisnupp = teema .btn (sama mis päises). Teema .btn-il on fikseeritud laius ja
   ikoon/tekst servades – siin laius sisu järgi, ikoon ja tekst koos keskel. */
.btn.dp-btn { display: inline-flex; align-items: center; width: auto; min-width: 0; justify-content: center; gap: 14px; padding-left: 32px; padding-right: 32px; }
.btn.dp-btn svg, .btn.dp-btn span { margin: 0; }
.dp-contacts { display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 20px; }
.dp-contacts a { color: var(--color-main); text-decoration: none; }
.dp-contacts a[href^="tel:"] { white-space: nowrap; }
.dp-contacts a:first-child { font-weight: 500; }
.dp-contacts a:hover { color: var(--color-theme); }

/* --- Tsitaat: ploomililla riba --- */
.dp-quote {
  position: relative; overflow: hidden; padding: 88px 0;
  background: var(--dp-plum); box-shadow: 0 0 0 100vmax var(--dp-plum); clip-path: inset(0 -100vmax);
}
.dp-quote figure { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; }
.dp-quote figure::before { content: "\201C"; display: block; height: 56px; font-size: 96px; line-height: 60px; font-weight: 300; color: var(--dp-peach); }
.dp-quote blockquote { margin: 16px 0 0; font-size: 30px; line-height: 44px; font-weight: 300; font-style: italic; color: #FFF4EE; }
.dp-quote figcaption { margin-top: 24px; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 244, 238, .7); }

/* --- Sisu: üks loetav veerg --- */
.dp-about { display: block; max-width: 760px; margin: 0 auto; padding: 96px 0; }
.dp-label { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dp-muted); }
.dp-about .dp-label { margin-bottom: 20px; }
.dp-content { font-size: 18px; line-height: 30px; }
.dp-content p { margin: 0 0 12px; }
.dp-content h2, .dp-content h2.about-person-subtitle { margin: 48px 0 16px; font-size: 26px; line-height: 32px; font-weight: 500; color: var(--color-main); }
.dp-content h2 strong { font-weight: inherit; }
.dp-content a { color: var(--color-theme); }
.dp-content a:hover { color: var(--color-main); text-decoration: underline; text-underline-offset: 3px; }
.dp-content ul { list-style: none; margin: 0 0 16px; padding: 0; }
.dp-content ul li { position: relative; margin: 0 0 6px; padding-left: 22px; }
.dp-content ul li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; background: var(--color-theme);
  -webkit-mask: var(--dp-romb) center / contain no-repeat;
          mask: var(--dp-romb) center / contain no-repeat;
}
.dp-show-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: 600 15px/24px Montserrat, sans-serif; color: var(--color-main);
}
.dp-show-more:hover { color: var(--color-theme); }
.dp-show-more svg { width: 14px; height: 14px; }

/* --- Samas meeskonnas: hele roosa riba --- */
.dp-related {
  position: relative; overflow: hidden; padding: 88px 0 96px;
  background: var(--dp-blush); box-shadow: 0 0 0 100vmax var(--dp-blush); clip-path: inset(0 -100vmax);
}
.dp-related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.dp-related-title { margin: 12px 0 0; font-size: 40px; line-height: 48px; font-weight: 400; color: var(--color-main); }
.dp-more { display: inline-flex; align-items: center; gap: 15px; font-size: 18px; line-height: 22px; font-weight: 300; color: var(--color-main); text-decoration: none; }
.dp-more:hover { color: var(--color-theme); }
.dp-more .icon-arrow { width: 22px; height: 22px; flex-shrink: 0; fill: var(--color-arrow); transition: transform .2s ease; }
.dp-more:hover .icon-arrow { transform: translateX(6px); }
.dp-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.dp-card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--color-main); }
.dp-card-img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--dp-r); background: #F3E3E0; }
.dp-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.dp-card:hover .dp-card-img img { transform: scale(1.04); }
.dp-card-name { margin: 0; font-size: 20px; line-height: 26px; font-weight: 500; color: var(--color-main); transition: color .15s ease; }
.dp-card:hover .dp-card-name { color: var(--color-theme); }
.dp-card-role { margin: 4px 0 0; font-size: 15px; line-height: 20px; color: var(--dp-soft); }

/* ==========================================================================
   Tahvel
   ========================================================================== */
@media (max-width: 1199px) {
  .dp-name { font-size: 44px; line-height: 52px; }
  .dp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-team-cols { columns: 3 180px; }
}

/* ==========================================================================
   Mobiil – filter alt üles libiseva lehena (bottom sheet)
   ========================================================================== */
@media (max-width: 899px) {
  .dp-container { padding: 0 20px; }
  .dp-topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .dp-team-toggle { width: 100%; justify-content: space-between; min-height: 48px; }

  .dp-team-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 1001;
    max-height: 88vh; border-radius: var(--dp-r) var(--dp-r) 0 0;
    animation: dp-sheet .22s ease-out;
  }
  .dp-team-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 8px 20px 0; background: #fff; }
  .dp-team-title { font-size: 18px; line-height: 24px; font-weight: 500; color: var(--color-main); }
  .dp-team-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--color-main); cursor: pointer; }
  .dp-team-close svg { width: 22px; height: 22px; }
  .dp-team.is-open .dp-team-backdrop { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(23, 26, 30, .4); }
  body.dp-sheet-open { overflow: hidden; }

  .dp-team-filters { padding: 8px 20px 12px; }
  .dp-team-search { margin-bottom: 12px; }
  .dp-filter-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .dp-filter-row::-webkit-scrollbar { display: none; }
  .dp-filter-label { display: none; }
  .dp-chip-btn { flex-shrink: 0; }
  .dp-filter-sep { flex-shrink: 0; }
  .dp-team-summary { margin-top: 10px; }
  .dp-team-list { padding: 12px 20px 36px; }
  .dp-team-cols { columns: 1; }
  .dp-team-group a { display: flex; align-items: center; min-height: 40px; padding: 0; }

  .dp-hero { grid-template-columns: 1fr; padding: 24px 0 40px; }
  .dp-photo, .dp-intro { grid-column: 1; }
  .dp-photo { max-width: 420px; padding: 0 0 24px 16px; }
  .dp-intro { margin-top: 20px; }
  .dp-name { margin-top: 14px; font-size: 34px; line-height: 40px; }
  .dp-subtitle { margin-top: 10px; font-size: 18px; line-height: 24px; }
  .dp-services { font-size: 15px; line-height: 22px; }
  .dp-clinics { margin-top: 20px; }
  .dp-actions { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 24px; }
  .btn.dp-btn { display: flex; width: 100%; box-sizing: border-box; }
  .dp-contacts { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .dp-contacts a { overflow-wrap: anywhere; }

  .dp-quote { padding: 48px 0; }
  .dp-quote figure { text-align: left; }
  .dp-quote blockquote { font-size: 21px; line-height: 32px; }

  .dp-about { padding: 48px 0; }
  .dp-content { font-size: 16px; line-height: 27px; }
  .dp-content h2, .dp-content h2.about-person-subtitle { margin-top: 32px; font-size: 22px; line-height: 28px; }

  .dp-related { padding: 48px 0 56px; }
  .dp-related-head { flex-direction: column; align-items: flex-start; }
  .dp-related-title { font-size: 28px; line-height: 34px; }
  .dp-cards { display: flex; gap: 16px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 8px; scroll-snap-type: x mandatory; }
  .dp-card { flex: 0 0 200px; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  .dp-team-panel { animation: none; }
  .dp-card-img img, .dp-more .icon-arrow { transition: none; }
}

/* Teema lisab lingile hoveril alljoone – arstilehe nuppudel, kiipidel ja kaartidel mitte
   (sisu tekstilingid .dp-content sees jäävad alljoonega) */
.doctor-page a:not(.dp-content a),
.doctor-page a:not(.dp-content a):hover,
.doctor-page a:not(.dp-content a):focus { text-decoration: none; }

/* ==========================================================================
   Meeskonna paneel: arvutis paremalt sisse libisev külgpaneel, mobiilis alt avanev leht.
   Ülal otsing ja filtrid, all tulemused (foto, nimi, eriala) – muutus on kohe näha.
   ========================================================================== */
.dp-team-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dp-team-side { flex-shrink: 0; }
.dp-team-list { position: relative; background: #fff; }
.dp-team-summary { position: relative; z-index: 1; padding-bottom: 6px !important; background: #fff; }
.dp-team-list.is-scrolled {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent);
}
.dp-team-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
@keyframes dp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dp-team-list.is-fresh .dp-team-group { animation: dp-rise .32s cubic-bezier(.2, .7, .3, 1) both; }
.dp-team-list.is-fresh .dp-team-loading { animation: dp-rise .32s ease-out both; }

/* Paneel ja tumendatud taust peavad olema päise (menüü, keelevalik, "Broneeri külastus") peal –
   päisel on kõrge z-index, seega tõstame avatud paneeli kihi maksimumi lähedale (kõik ekraanilaiused) */
body.dp-sheet-open .dp-topbar { z-index: 2147483000; }
body.dp-sheet-open .header, body.dp-sheet-open header { z-index: 0 !important; } /* kui päis on oma kihis */

/* Arvutis: paremalt sisse libisev külgpaneel (terve ekraani kõrgus), taust tumendatud */
@keyframes dp-drawer { from { transform: translateX(100%); } to { transform: none; } }
@media (min-width: 900px) {
  body.dp-sheet-open { overflow: hidden; }
  .dp-team.is-open .dp-team-backdrop { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(23, 26, 30, .4); animation: dp-in .2s ease-out; }
  .dp-team-panel {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 1001;
    width: min(520px, 100vw); max-height: none; border-radius: 0;
    box-shadow: -24px 0 48px rgba(77, 28, 70, .16);
    animation: dp-drawer .26s cubic-bezier(.2, .7, .3, 1);
  }
  .dp-team-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 20px 28px 4px; }
  .dp-team-title { font-size: 22px; line-height: 28px; font-weight: 400; color: var(--color-main); }
  .dp-team-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--color-main); cursor: pointer; }
  .dp-team-close svg { width: 22px; height: 22px; }
  .dp-team-filters { padding: 12px 28px 0; border-bottom: 0; }
  .dp-team-search { margin: 0; }
  .dp-team-side { flex-shrink: 0; padding: 16px 28px; border-bottom: 1px solid #F3E7E3; }
  .dp-filter-label { display: block; flex-basis: 100%; min-width: 0; margin: 0 0 2px; }
  .dp-filter-row + .dp-filter-row { margin-top: 16px; }
  .dp-team-summary { margin: 0; padding: 16px 28px 0; }
  .dp-team-list { padding: 8px 28px 36px; }
  .dp-team-cols { columns: 1; }
}

/* Nimekirja rida: väike foto, nimi ja eriala */
.dp-team-group { margin-bottom: 16px; }
.dp-team-group-title { margin: 12px 0 4px; }
.dp-team-group a.dp-person { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--dp-r); }
.dp-team-group a.dp-person:hover { background: #FDF5F8; color: var(--color-main); }
.dp-team-group a.dp-person.is-current { background: #FDF4F1; }
.dp-av { flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: #F3E3E0; }
.dp-av img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dp-person-text { display: flex; flex-direction: column; min-width: 0; }
.dp-person-name { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--color-main); }
.dp-person.is-current .dp-person-name { color: var(--color-theme); }
.dp-person-role { overflow: hidden; font-size: 13px; line-height: 18px; color: var(--dp-soft); white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 899px) {
  .dp-team-filters { padding: 8px 20px 0; border-bottom: 0; }
  .dp-team-search { margin-bottom: 0; }
  .dp-team-side { flex-shrink: 0; padding: 12px 20px; border-bottom: 1px solid #F3E7E3; }
  .dp-team-summary { margin: 0; padding: 12px 20px 0; }
}

@media (prefers-reduced-motion: reduce) { .dp-team-list.is-fresh .dp-team-group, .dp-team-list.is-fresh .dp-team-loading { animation: none; } }

/* Kliiniku kiip avab kaardi uues aknas – väike välislingi ikoon */
.dp-chip .dp-ext { width: 14px; height: 14px; margin-left: 2px; color: var(--dp-muted); transition: color .15s ease, transform .15s ease; }
a.dp-chip:hover .dp-ext { color: var(--color-main); transform: translate(1px, -1px); }
.dp-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Aastaarv koolituste loetelus: väike silt, mitte paks rida */
.dp-content p.dp-year { margin: 24px 0 4px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .08em; color: var(--dp-muted); }
.dp-content p.dp-year strong, .dp-content p.dp-year b { font-weight: inherit; }
.dp-content strong.dp-year, .dp-content b.dp-year { display: inline-block; margin: 12px 0 2px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .08em; color: var(--dp-muted); }
.dp-content h2 + p.dp-year { margin-top: 0; }
.dp-show-more { margin-top: 8px; }
.dp-show-more svg { transition: transform .2s ease; }
.dp-show-more.is-open svg { transform: rotate(180deg); }

/* ==========================================================================
   "Samas meeskonnas" slaider: kõik osakonna inimesed ühes reas, 4 sisu laiuses,
   rida jookseb paremal lehe servani (järgmine kaart paistab). Nupud all paremal.
   ========================================================================== */
/* Rida ulatub mõlemal pool lehe servani: algab sisu joonelt, kerides läheb vasakult lehest välja.
   4 kaarti mahub sisu laiusesse. */
body:has(.doctor-page) { overflow-x: clip; }
.dp-related { overflow: visible; }
.dp-related .dp-cards {
  --dp-track: min(1120px, 100vw - 80px);
  display: flex; gap: 32px; overflow-x: auto; overscroll-behavior-x: contain;
  --dp-gutter: calc((100vw - var(--dp-track)) / 2);
  margin: 0 calc(-1 * var(--dp-gutter)); padding: 0 var(--dp-gutter); scroll-padding: 0 var(--dp-gutter);
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.dp-related .dp-cards::-webkit-scrollbar { display: none; }
.dp-related .dp-cards:focus-visible { outline: 2px solid var(--color-main); outline-offset: 4px; }
.dp-related .dp-card { flex: 0 0 calc((var(--dp-track) - 3 * 32px) / 4); scroll-snap-align: start; }
.dp-slider-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }
.dp-slider-nav[hidden] { display: none; }
/* Tagasihoidlik: Sakala punane nool (#icon-arrow, nagu "Vaata kogu meeskonda") õhukese äärega
   valges nupus, nurgad 4px. Hoveril ainult äär tumeneb – nool paigal. */
.dp-slider-btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--dp-line); border-radius: var(--dp-r); background: rgba(255, 255, 255, .7); color: var(--color-arrow, #E02020); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, opacity .15s ease;
}
.dp-slider-btn .icon-arrow { width: 16px; height: 16px; fill: currentColor; }
.dp-slider-btn--prev .icon-arrow { transform: rotate(180deg); }
.dp-slider-btn:hover { border-color: var(--color-main); background: #fff; }
.dp-slider-btn:disabled { opacity: .35; cursor: default; }
.dp-slider-btn:disabled:hover { border-color: var(--dp-line); background: rgba(255, 255, 255, .7); }

@media (max-width: 1199px) {
  .dp-related .dp-card { flex-basis: calc((var(--dp-track) - 2 * 32px) / 3); }
}
@media (max-width: 899px) {
  .dp-related .dp-cards { gap: 16px; margin: 0 -20px; padding: 0 20px 8px; scroll-padding: 0 20px; }
  .dp-related .dp-card { flex-basis: 200px; }
  .dp-slider-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dp-related .dp-cards { scroll-behavior: auto; }
}

/* Kontrast (WCAG AA): otsinguvälja ja slaideri nuppude piir ≥ 3:1 */
.dp-team-search input { border-color: #9A8093; }
.dp-slider-btn:not(:disabled) { border-color: #9A8093; }
.dp-slider-btn:not(:disabled):hover { border-color: var(--color-main); }

/* Hiirega lohistatav slaider */
.dp-related .dp-cards { cursor: grab; }
.dp-related .dp-cards.is-dragging { cursor: grabbing; scroll-snap-type: none !important; scroll-behavior: auto !important; user-select: none; }
.dp-related .dp-cards.is-dragging * { pointer-events: none; }
/* Slaideri nupud hoveril: sama heleroosa taust nagu teistel hover-kohtadel */
.dp-slider-btn { transition: background-color .2s ease, border-color .2s ease; }
.dp-slider-btn:not(:disabled):hover { background: #FDF5F8; border-color: var(--color-main); }
/* Seotud arstide slaider on roosakal taustal: nupp on poolläbipaistev, hoveril täisvalge + lilla raam, et muutus oleks näha */
.dp-related .dp-slider-btn:not(:disabled) { background: rgba(255, 255, 255, .45); }
.dp-related .dp-slider-btn:not(:disabled):hover { background: #fff; border-color: var(--color-main); box-shadow: 0 4px 14px rgba(77, 28, 70, .12); }

/* "Vaata kogu meeskonda" (teema .link .link-dark): arsti lehe konteiner pärib õhukese kirja (300), siin sama paksus nagu mujal (400);
   hoveril roosaks ja nool liigub paremale nagu teistel noolega linkidel */
.doctor-page .link.dp-more-link { font-weight: 400; transition: color .2s ease; }
.doctor-page .link.dp-more-link span { font-weight: 400; }
.doctor-page .link.dp-more-link .icon-arrow { transition: transform .25s ease; }
.doctor-page .link.dp-more-link:hover { color: var(--color-theme) !important; }
.doctor-page .link.dp-more-link:hover .icon-arrow { transform: translateX(6px); }
@media (prefers-reduced-motion: reduce) { .doctor-page .link.dp-more-link .icon-arrow { transition: none; } }
.doctor-page .link.dp-more-link, .doctor-page .link.dp-more-link:hover, .doctor-page .link.dp-more-link:focus-visible { text-decoration: none; }
