/* =======================================================
   بخش پزشکان جدید / تازه پیوند
   Compact + Minimal / Scoped to #np-page
======================================================= */

#np-page .recent-doctors-section {
  --rd-accent: color-mix(in srgb, var(--np-ink, #1677c8) 78%, #2f8f7e 22%);
  --rd-accent-soft: color-mix(in srgb, var(--rd-accent) 10%, #ffffff);
  --rd-accent-line: color-mix(in srgb, var(--rd-accent) 22%, transparent);

  width: 100%;
  direction: rtl;
  position: relative;
  overflow: hidden;

  padding: 20px;
  margin: 0 0 24px;

  background: var(--np-card, #ffffff);
  border: 1px solid var(--np-line, #e2e8f0);
  border-radius: var(--np-radius-lg, 16px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* جلوگیری از تأثیر احتمالی استایل‌های کلی قالب */
#np-page .recent-doctors-section,
#np-page .recent-doctors-section * {
  box-sizing: border-box;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
#np-page .recent-doctors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 17px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--np-line, #e2e8f0);
}

#np-page .rd-header-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;

  padding-right: 10px;
  border-right: 3px solid var(--rd-accent);
}

#np-page .recent-doctors-header h3 {
  margin: 0;
  color: var(--np-ink-3, #1e293b);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.45;
}

#np-page .recent-doctors-header p {
  margin: 0;
  overflow: hidden;

  color: var(--np-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#np-page .recent-doctors-header .view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  min-height: 34px;
  padding: 6px 13px;

  color: var(--rd-accent);
  background: var(--rd-accent-soft);
  border: 1px solid var(--rd-accent-line);
  border-radius: 50px;

  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;

  transition: all 0.2s ease;
}

#np-page .recent-doctors-header .view-all:hover {
  color: #fff;
  background: var(--rd-accent);
  border-color: var(--rd-accent);
  transform: translateY(-1px);
}

/* -------------------------------------------------------
   Slider
------------------------------------------------------- */
#np-page .recent-doctors-slider {
  display: flex;
  gap: 12px;

  width: 100%;
  padding: 3px 2px 11px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;

  scrollbar-color: var(--np-line, #cbd5e1) var(--np-paper, #f8fafc);
  scrollbar-width: thin;
}

#np-page .recent-doctors-slider::-webkit-scrollbar {
  height: 5px;
}

#np-page .recent-doctors-slider::-webkit-scrollbar-track {
  background: var(--np-paper, #f8fafc);
  border-radius: 10px;
}

#np-page .recent-doctors-slider::-webkit-scrollbar-thumb {
  background: var(--np-line, #cbd5e1);
  border-radius: 10px;
}

/* -------------------------------------------------------
   Doctor Card
------------------------------------------------------- */
#np-page .recent-doctor-card {
  display: flex;
  flex: 0 0 156px;
  flex-direction: column;
  align-items: center;

  min-width: 156px;
  max-width: 156px;
  min-height: 215px;
  padding: 13px 10px 10px;

  position: relative;
  overflow: hidden;

  color: var(--np-text, #17211f);
  background: #fff;
  border: 1px solid var(--np-line, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);

  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#np-page .recent-doctor-card:hover {
  color: var(--np-text, #17211f);
  border-color: var(--rd-accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

#np-page .recent-doctor-card.is-pro {
  background: linear-gradient(180deg, var(--rd-accent-soft) 0%, #ffffff 34%);
  border-color: var(--rd-accent-line);
}

/* -------------------------------------------------------
   Badge
------------------------------------------------------- */
#np-page .rd-badge {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 20px;
  padding: 2px 6px;

  color: var(--rd-accent);
  background: var(--rd-accent-soft);
  border: 1px solid var(--rd-accent-line);
  border-radius: 6px;

  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

/* -------------------------------------------------------
   Avatar
------------------------------------------------------- */
#np-page .rd-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;

  margin: 3px auto 9px;
  overflow: hidden;

  background: #f1f5f9;
  border: 2px solid #fff;
  border-radius: 50%;
  outline: 1.5px solid var(--rd-accent-line);
}

#np-page .rd-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------
   Information
------------------------------------------------------- */
#np-page .rd-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;

  width: 100%;
  min-width: 0;
  margin-bottom: 9px;
}

#np-page .rd-name {
  width: 100%;
  margin: 0;

  overflow: hidden;

  color: var(--np-ink-3, #0f172a);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#np-page .rd-spec {
  display: -webkit-box;
  min-height: 30px;
  margin: 0;
  overflow: hidden;

  color: var(--np-text-muted, #64748b);
  font-size: 10.8px;
  font-weight: 500;
  line-height: 1.45;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* -------------------------------------------------------
   Location
------------------------------------------------------- */
#np-page .rd-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  width: 100%;
  min-width: 0;
  margin-top: auto;
  padding-top: 6px;

  color: var(--np-text-faint, #94a3b8);
  border-top: 1px dashed var(--np-line, #e2e8f0);

  font-size: 10px;
  line-height: 1.45;
}

#np-page .rd-location svg {
  flex: 0 0 auto;
  opacity: 0.72;
}

#np-page .rd-location span {
  display: block;
  min-width: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------
   CTA
------------------------------------------------------- */
#np-page .rd-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 31px;
  padding: 5px 4px;

  color: var(--rd-accent);
  background: var(--rd-accent-soft);
  border: 1px solid var(--rd-accent-line);
  border-radius: 8px;

  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;

  transition: all 0.2s ease;
}

#np-page .recent-doctor-card:hover .rd-btn {
  color: #fff;
  background: var(--rd-accent);
  border-color: var(--rd-accent);
}

#np-page .rd-empty {
  width: 100%;
  padding: 14px;

  color: var(--np-text-muted, #64748b);
  background: var(--np-paper, #f8fafc);
  border: 1px dashed var(--np-line, #e2e8f0);
  border-radius: 10px;

  font-size: 12px;
  text-align: center;
}

/* -------------------------------------------------------
   Mobile
------------------------------------------------------- */
@media (max-width: 576px) {
  #np-page .recent-doctors-section {
    padding: 15px 13px;
    margin-bottom: 20px;
    border-radius: 18px;
  }

  #np-page .recent-doctors-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 13px;
    padding-bottom: 12px;
  }

  #np-page .recent-doctors-header h3 {
    font-size: 14.5px;
  }

  #np-page .recent-doctors-header p {
    max-width: 190px;
    font-size: 10.8px;
  }

  #np-page .recent-doctors-header .view-all {
    min-height: 31px;
    padding: 5px 10px;
    font-size: 10.5px;
  }

  #np-page .recent-doctors-slider {
    gap: 10px;
    padding-bottom: 9px;
  }

  #np-page .recent-doctor-card {
    flex-basis: 142px;
    min-width: 142px;
    max-width: 142px;
    min-height: 205px;
    padding: 11px 8px 8px;
  }

  #np-page .rd-avatar {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    margin-bottom: 7px;
  }

  #np-page .rd-name {
    font-size: 11.8px;
  }

  #np-page .rd-spec {
    min-height: 29px;
    font-size: 10px;
  }

  #np-page .rd-location {
    padding-top: 5px;
    font-size: 9.5px;
  }

  #np-page .rd-location span {
    max-width: 98px;
  }

  #np-page .rd-btn {
    min-height: 29px;
    font-size: 10px;
  }

  #np-page .rd-badge {
    top: 6px;
    right: 6px;
    font-size: 9px;
  }
}

/* گوشی‌های بسیار کوچک */
@media (max-width: 380px) {
  #np-page .recent-doctor-card {
    flex-basis: 134px;
    min-width: 134px;
    max-width: 134px;
  }

  #np-page .recent-doctors-header p {
    max-width: 160px;
  }
}
/* =======================================================
   Final responsive horizontal scroll fix
======================================================= */

/* بخش پزشکان جدید باید کاملاً داخل ستون اصلی باقی بماند */
#np-page .np-recent-doctors-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 16px;
}

/* جلوگیری از بزرگ شدن Grid توسط محتوای Slider */
#np-page .recent-doctors-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* اسکرول افقی */
#np-page .recent-doctors-slider {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  gap: 12px;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  padding: 3px 2px 11px;

  overflow-x: auto;
  overflow-y: hidden;

  direction: rtl;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 2px;

  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: var(--np-line-strong, #c6d3ce) var(--np-paper, #f8fafc);
}

/* کارت‌ها کوچک نشوند و به خط بعد منتقل نشوند */
#np-page .recent-doctors-slider > .recent-doctor-card {
  flex: 0 0 156px;
  width: 156px;
  min-width: 156px;
  max-width: 156px;

  scroll-snap-align: start;
}

/* اسکرول‌بار Chrome، Edge و Safari */
#np-page .recent-doctors-slider::-webkit-scrollbar {
  height: 6px;
}

#np-page .recent-doctors-slider::-webkit-scrollbar-track {
  background: var(--np-paper, #f8fafc);
  border-radius: 999px;
}

#np-page .recent-doctors-slider::-webkit-scrollbar-thumb {
  background: var(--np-line-strong, #c6d3ce);
  border-radius: 999px;
}

#np-page .recent-doctors-slider::-webkit-scrollbar-thumb:hover {
  background: var(--rd-accent, #1677c8);
}

/* دسترسی‌پذیری کیبورد */
#np-page .recent-doctors-slider:focus-visible {
  outline: 2px solid var(--rd-accent, #1677c8);
  outline-offset: 3px;
  border-radius: 10px;
}

/* موبایل */
@media (max-width: 576px) {
  #np-page .recent-doctors-slider {
    gap: 10px;
    padding-bottom: 10px;
  }

  #np-page .recent-doctors-slider > .recent-doctor-card {
    flex-basis: 142px;
    width: 142px;
    min-width: 142px;
    max-width: 142px;
  }
}

/* گوشی‌های بسیار کوچک */
@media (max-width: 380px) {
  #np-page .recent-doctors-slider > .recent-doctor-card {
    flex-basis: 134px;
    width: 134px;
    min-width: 134px;
    max-width: 134px;
  }
}
