/* ========================================================
   Medical Department Details Page Styles
   Scoped styles for department content and doctor grid.
   Direction is completely inherited from the global project screen.
   ======================================================== */

.department-details-page {
  padding-block: 2.5rem 1rem;
  background-color: #ffffff;
}

/* Sections General */
.department-section {
  margin-bottom: 2.5rem;
}

/* Department Titles & Subtitles */
.department-section-title {
  font-family: var(--font-family-display, 'IBM Plex Sans Arabic', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #101828;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.department-section-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #475467;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Rich-text content */
.department-rich-content {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: #344054;
  margin-bottom: 2.5rem;
}

.department-rich-content p {
  margin-bottom: 1.25rem;
}

.department-rich-content p:last-child {
  margin-bottom: 0;
}

.department-rich-content strong {
  font-weight: 600;
  color: #101828;
}

.department-rich-content ul,
.department-rich-content ol {
  padding-inline-start: 1.5rem;
  margin-bottom: 1.25rem;
}

.department-rich-content li {
  margin-bottom: 0.5rem;
}

/* Doctors Section */
.department-doctors-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

/* 6-Column Responsive Doctor Cards Grid */
.department-doctors-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Doctor Card */
.department-doctor-card {
  background: #ffffff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.03);
  padding: 1.75rem 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 170px;
}

.department-doctor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(16, 24, 40, 0.08), 0 2px 6px -2px rgba(16, 24, 40, 0.04);
  border-color: #d0d5dd;
}

/* Doctor Avatar */
.doctor-avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #ffffff;
  flex-shrink: 0;
}

.doctor-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Doctor Name */
.doctor-name {
  font-family: var(--font-family-display, 'IBM Plex Sans Arabic', sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #101828;
  margin-top: 1rem;
  margin-bottom: 0;
  line-height: 1.4;
  word-break: break-word;
}

/* Last Updated Date */
.department-last-updated {
  margin-top: 3.5rem;
  font-size: 0.875rem;
  color: #667085;
  line-height: 1.5;
}

/* Prevent duplicate footer last-update on department details page */
.department-details-page ~ .margin-bottom-16,
body:has(.department-details-page) > .margin-bottom-16 {
  display: none !important;
}

/* ========================================================
   Responsive Breakpoints
   Large Desktop: 6 cols
   Medium Desktop: 4 cols
   Tablet: 3 cols
   Mobile: 2 cols
   Small Mobile: 1-2 cols
   ======================================================== */

@media (max-width: 1200px) {
  .department-doctors-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.125rem;
  }
}

@media (max-width: 991px) {
  .department-details-page {
    padding-block: 2rem 3rem;
  }

  .department-doctors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .doctor-avatar-wrapper {
    width: 74px;
    height: 74px;
  }

  .department-section-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 767px) {
  .department-doctors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .department-doctor-card {
    padding: 1.5rem 0.5rem 1rem;
    min-height: 155px;
  }

  .doctor-avatar-wrapper {
    width: 68px;
    height: 68px;
  }

  .doctor-name {
    font-size: 0.875rem;
    margin-top: 0.75rem;
  }

  .department-last-updated {
    margin-top: 2.5rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 420px) {
  .department-doctors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .department-doctor-card {
    padding: 1.25rem 0.375rem 0.875rem;
  }

  .doctor-avatar-wrapper {
    width: 60px;
    height: 60px;
  }

  .doctor-name {
    font-size: 0.8125rem;
  }
}
