/* Doctor detail page styles */
.doctor-detail { padding: 50px 0 70px; background: #f8fafb; }
.doctor-detail__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}
.doctor-detail__photo-side { position: sticky; top: 20px; }
.doctor-detail__photo {
  width: 100%; aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px -25px rgba(22,62,64,0.25);
  margin-bottom: 18px;
}
.doctor-detail__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doctor-detail__photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 140px; color: #d4d8dd;
}
.doctor-detail__card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px -20px rgba(22,62,64,0.18);
}
.doctor-detail__name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #163E40;
  margin-bottom: 6px;
  line-height: 1.3;
}
.doctor-detail__spec {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px;
  color: #226468;
  font-weight: 600;
  margin-bottom: 18px;
}
.doctor-detail__main { min-width: 0; }
.doctor-detail__bio {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px -20px rgba(22,62,64,0.10);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: #163E40;
}
.doctor-detail__bio p { margin: 0 0 14px; }
.doctor-detail__bio h2, .doctor-detail__bio h3 {
  font-size: 19px; margin: 22px 0 12px; color: #163E40; font-weight: 700;
}
.doctor-detail__bio ul, .doctor-detail__bio ol { padding-left: 22px; margin: 12px 0; }
.doctor-detail__bio li { margin-bottom: 6px; }
.doctor-detail__bio a { color: #226468; }

.pd-book {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 18px;
  background: #226468;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.pd-book:hover { background: #155661; transform: translateY(-1px); }
.pd-phone {
  margin-top: 14px;
  font-size: 13px;
  color: #6B7280;
}
.pd-phone a {
  display: inline-flex; align-items: center; gap: 6px;
  color: #226468; font-weight: 600; text-decoration: none; margin-top: 4px;
}

@media (max-width: 991px) {
  .doctor-detail__grid { grid-template-columns: 240px 1fr; gap: 24px; }
  .doctor-detail__bio { padding: 24px; }
}
@media (max-width: 767px) {
  .doctor-detail__grid { grid-template-columns: 1fr; gap: 20px; }
  .doctor-detail__photo-side { position: static; }
  .doctor-detail__photo { max-width: 260px; margin: 0 auto 16px; }
  .doctor-detail__bio { padding: 20px; font-size: 15px; }
  .doctor-detail__name { text-align: center; }
  .doctor-detail__spec { display: flex; justify-content: center; }
}

/* Doctors catalog grid */
.doctors-area { padding: 50px 0 70px; background: #f8fafb; }
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.doctor-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px -20px rgba(22,62,64,0.18);
  transition: transform .15s, box-shadow .15s;
}
.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(22,62,64,0.28);
  color: inherit; text-decoration: none;
}
.doctor-card__photo {
  width: 100%; aspect-ratio: 1;
  background: #f1f5f7;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.doctor-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card__photo i { font-size: 96px; color: #cbd1d6; }
.doctor-card__body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.doctor-card__name {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 17px; font-weight: 700; color: #163E40;
  margin: 0 0 6px; line-height: 1.3;
}
.doctor-card__spec {
  font-size: 13.5px;
  color: #226468;
  font-weight: 600;
  margin-bottom: auto;
}
.doctor-card__cta {
  display: inline-flex; align-items: center; gap: 4px;
  color: #226468;
  font-weight: 600;
  font-size: 13.5px;
  margin-top: 14px;
}
.doctor-card__cta i { transition: transform .15s; }
.doctor-card:hover .doctor-card__cta i { transform: translateX(3px); }

@media (max-width: 575px) {
  .doctors-area { padding: 28px 0 50px; }
  .doctors-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .doctor-card__body { padding: 12px 14px 16px; }
  .doctor-card__name { font-size: 14px; }
  .doctor-card__spec { font-size: 12px; }
  .doctor-card__cta { font-size: 12.5px; margin-top: 10px; }
  .doctor-card__photo i { font-size: 64px; }
}

/* Doctor review gallery */
.doctor-reviews {
  padding: 0 0 70px;
  background: #f8fafb;
}

.doctor-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.doctor-reviews__item {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  appearance: none;
  background: #f4f2ef;
  border: 1px solid #e1e7e7;
  border-radius: 14px;
  box-shadow: 0 10px 30px -20px rgba(22, 62, 64, .18);
  cursor: zoom-in;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.doctor-reviews__item:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 100, 104, .3);
  box-shadow: 0 18px 40px -22px rgba(22, 62, 64, .28);
}

.doctor-reviews__item:focus-visible,
.doctor-reviews__more:focus-visible,
.doctor-reviews-lightbox__close:focus-visible,
.doctor-reviews-lightbox__nav:focus-visible {
  outline: 3px solid rgba(34, 100, 104, .45);
  outline-offset: 3px;
}

.doctor-reviews__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.doctor-reviews__more {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 0;
  padding: 13px 22px;
  appearance: none;
  background: #226468;
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, transform .12s;
}

.doctor-reviews__more:hover {
  background: #6B237A;
  color: #fff;
  transform: translateY(-1px);
}

.doctor-reviews-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw 8vh;
  background: rgba(10, 20, 20, .88);
}

.doctor-reviews-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 92vw;
  max-height: 84vh;
  margin: 0;
}

.doctor-reviews-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  background: #f4f2ef;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.doctor-reviews-lightbox__figure--with-caption .doctor-reviews-lightbox__image {
  max-height: calc(84vh - 76px);
}

.doctor-reviews-lightbox__caption {
  max-width: 760px;
  max-height: 64px;
  overflow-y: auto;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.doctor-reviews-lightbox__close,
.doctor-reviews-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  appearance: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.doctor-reviews-lightbox__close:hover,
.doctor-reviews-lightbox__nav:hover {
  background: #226468;
  border-color: #226468;
}

.doctor-reviews-lightbox__close {
  top: 18px;
  right: 18px;
  font-size: 34px;
  font-weight: 300;
}

.doctor-reviews-lightbox__nav {
  top: 50%;
  font-size: 44px;
  font-weight: 300;
  transform: translateY(-50%);
}

.doctor-reviews-lightbox__nav--prev { left: 16px; }
.doctor-reviews-lightbox__nav--next { right: 16px; }

.doctor-reviews-lightbox__counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  padding: 6px 12px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  transform: translateX(-50%);
}

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

  .doctor-reviews-lightbox__nav--prev { left: 8px; }
  .doctor-reviews-lightbox__nav--next { right: 8px; }
}

@media (max-width: 575px) {
  .doctor-reviews {
    padding-bottom: 50px;
  }

  .doctor-reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .doctor-reviews__item {
    border-radius: 12px;
  }

  .doctor-reviews__more {
    width: 100%;
  }

  .doctor-reviews-lightbox {
    padding: 56px 4vw 76px;
  }

  .doctor-reviews-lightbox__figure {
    max-height: min(90vh, calc(100vh - 132px));
  }

  .doctor-reviews-lightbox__image {
    max-height: min(90vh, calc(100vh - 132px));
  }

  .doctor-reviews-lightbox__figure--with-caption .doctor-reviews-lightbox__image {
    max-height: min(calc(90vh - 76px), calc(100vh - 208px));
  }

  .doctor-reviews-lightbox__close,
  .doctor-reviews-lightbox__nav {
    width: 48px;
    height: 48px;
  }

  .doctor-reviews-lightbox__close {
    top: 8px;
    right: 8px;
  }

  .doctor-reviews-lightbox__nav {
    top: auto;
    bottom: 10px;
    transform: none;
  }

  .doctor-reviews-lightbox__nav--prev { left: 10px; }
  .doctor-reviews-lightbox__nav--next { right: 10px; }

  .doctor-reviews-lightbox__counter {
    bottom: 24px;
  }
}
