/* ==========================================================================
   ZM Dental Studio — Doctor profile page
   ========================================================================== */

.doctor-profile {
  padding-top: calc(var(--space-9) + 4.5rem);
}

.doctor-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-8);
  align-items: stretch;
}

.doctor-hero__photo {
  min-height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  padding: var(--space-1);
  box-sizing: border-box;
}

.doctor-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: transform var(--dur-slow) var(--ease-out);
}

.doctor-hero__photo:hover img {
  transform: scale(1.06);
}

.doctor-hero__info {
  padding-top: var(--space-2);
}

.doctor-hero__badge {
  display: inline-flex;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.doctor-hero__info h1 {
  margin-bottom: 0.5rem;
}

.doctor-hero__exp {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.doctor-hero__bio {
  font-size: 1rem;
  max-width: 60ch;
  margin-bottom: var(--space-5);
}

.doctor-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: var(--space-6);
}

.doctor-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.doctor-checklist svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ---- Experience & education timeline ---- */
.doctor-timeline-wrap {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.doctor-timeline-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.doctor-timeline-cols h3 {
  margin-bottom: var(--space-5);
}

.doctor-timeline {
  position: relative;
  padding-left: var(--space-6);
  border-left: 2px solid var(--line);
}

.doctor-timeline__item {
  position: relative;
  padding-bottom: var(--space-5);
}

.doctor-timeline__item:last-child {
  padding-bottom: 0;
}

.doctor-timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--space-6) * -1 - 5px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--accent);
}

.doctor-timeline__period {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.doctor-timeline__item p {
  font-size: 0.9rem;
  color: var(--muted);
}

.doctor-timeline__more {
  margin-top: var(--space-4);
}

.doctor-timeline__more:focus {
  outline: none;
  box-shadow: none;
}

/* Items revealed by "Показати більше" fade/slide in one after another —
   each gets its stagger delay set inline in JS before .is-revealed lands. */
.doctor-timeline__item.is-timeline-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.doctor-timeline__item.is-timeline-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Doctor services grid ---- */
.doctor-service-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--white);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

.doctor-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.doctor-service-card .icon-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.doctor-service-card .icon-tile img {
  width: 22px;
  height: 22px;
}

.doctor-service-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.doctor-service-card p {
  font-size: 0.88rem;
}

/* Mobile hero: photo spans two rows next to name/badge/experience AND
   the checklist below it (so the checklist tucks right under the
   experience line, no dead gap under the photo) — CTA button breaks out
   full width underneath. Both .doctor-hero__info and .doctor-hero__bottom
   are promoted to display:contents so their children become individual
   grid items placed by name, same trick used for the home "about-teaser". */
@media (max-width: 900px) {
  .doctor-profile {
    padding-top: calc(var(--space-8) + 3.5rem);
  }
  .doctor-hero {
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
      "photo top"
      "photo checklist"
      "cta cta";
    gap: var(--space-3) var(--space-4);
    align-items: stretch;
  }
  .doctor-hero__photo {
    grid-area: photo;
    width: 100%;
    min-height: 320px;
  }
  /* Column is narrow but stretched tall to match the text — contain
     would leave big empty margins here, so cover fills the frame;
     the crop lands on the sides (arms), never top/bottom, so the
     face and feet stay safe. */
  .doctor-hero__photo img {
    object-fit: cover;
    object-position: center top;
  }
  .doctor-hero__info {
    display: contents;
  }
  .doctor-hero__top {
    grid-area: top;
  }
  .doctor-hero__bottom {
    display: contents;
  }
  .doctor-hero__badge {
    padding: 0.35rem 0.8rem;
    font-size: 0.7rem;
    margin-bottom: var(--space-3);
  }
  .doctor-hero__top h1 {
    font-size: 1.25rem;
  }
  .doctor-hero__exp {
    font-size: 0.82rem;
    margin-bottom: 0;
  }
  .doctor-hero__bio {
    display: none;
  }
  .doctor-checklist {
    grid-area: checklist;
    margin-bottom: 0;
  }
  .doctor-hero__bottom .btn {
    grid-area: cta;
    width: 100%;
    justify-content: center;
    margin-top: var(--space-1);
  }
  .doctor-timeline-cols {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .doctor-timeline-wrap {
    padding: var(--space-5);
  }
}
