/* ===========================================================
   DOCTORS HOME — Premium Refined (v4.0.0)
   Scope: .doctors-section-fullwidth only (homepage)
   Fixes:
     · Title balanced 2 lines
     · Card footer stacked vertically (no overflow)
     · Image presentation refined (lighter chrome, no gray bg)
     · Card width responsive (overrides legacy 380px)
   =========================================================== */

.doctors-section-fullwidth {
  --doc-primary: #0066CC;
  --doc-primary-light: #3399FF;
  --doc-primary-dark: #0052A3;
  --doc-cyan: #0891b2;
  --doc-ink: #0a0f1e;
  --doc-ink-2: #1f2937;
  --doc-ink-3: #475569;
  --doc-muted: #64748b;
  --doc-muted-2: #94a3b8;
  --doc-line: rgba(15, 23, 42, 0.08);
  --doc-line-2: #e5e7eb;
  --doc-line-3: #eef2f7;
  --doc-paper: #f8fafc;
  --doc-star: #f59e0b;

  position: relative;
  padding: 110px 0 100px;
  background:
    radial-gradient(900px 540px at 100% 0%, rgba(0, 102, 204, 0.05), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(56, 189, 248, 0.04), transparent 60%),
    #ffffff;
  color: var(--doc-ink);
  overflow: hidden;
}

.doctors-section-fullwidth .doctors-section-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

/* =======================================================
   SECTION HEADER
   ======================================================= */
.doctors-section-fullwidth .doc-section-head {
  margin-bottom: 56px;
}

/* Eyebrow pill — same as finance-eyebrow */
.doctors-section-fullwidth .doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--doc-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-ink-3);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.doctors-section-fullwidth .doc-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--doc-primary);
  box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.5);
  animation: docEyebrowPulse 2.2s ease-out infinite;
}
@keyframes docEyebrowPulse {
  0%   { box-shadow: 0 0 0 0   rgba(0, 102, 204, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 102, 204, 0); }
  100% { box-shadow: 0 0 0 0   rgba(0, 102, 204, 0); }
}

/* Head row */
.doctors-section-fullwidth .doc-head-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: end;
}

.doctors-section-fullwidth .doc-section-title {
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--doc-ink);
  margin: 0;
}
.doctors-section-fullwidth .doc-section-title em {
  display: inline-block;
  font-style: normal;
  background: linear-gradient(135deg, var(--doc-primary) 0%, #0ea5e9 45%, var(--doc-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% 100%;
  animation: docTitleGrad 6s ease-in-out infinite;
}
@keyframes docTitleGrad {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.doctors-section-fullwidth .doc-section-lede {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--doc-muted);
  max-width: 460px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}

/* =======================================================
   CAROUSEL — refine spacing (override legacy)
   ======================================================= */
.doctors-section-fullwidth .doctors-carousel-wrapper {
  position: relative;
  padding: 0 !important;
  margin-top: 0;
}
.doctors-section-fullwidth .doctors-carousel {
  overflow: hidden !important;
  padding: 12px 4px 4px;
  margin: -12px -4px -4px;
}
.doctors-section-fullwidth .doctors-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =======================================================
   DOCTOR CARD — responsive width, refined chrome
   ======================================================= */
.doctors-section-fullwidth .doctor-card {
  /* Override legacy fixed 380px */
  width: calc((100% - 72px) / 4) !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 0 0 calc((100% - 72px) / 4);

  position: relative;
  background: #ffffff;
  border: none !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -12px rgba(15, 23, 42, 0.12);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: auto;
}

.doctors-section-fullwidth .doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), 0 28px 56px -16px rgba(0, 102, 204, 0.28);
}

.doctors-section-fullwidth .doctor-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
}
.doctors-section-fullwidth .doctor-card-link:hover { color: inherit; text-decoration: none !important; }

/* ----- Image area ----- */
.doctors-section-fullwidth .doctor-image {
  position: relative;
  margin: 8px 8px 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef4fb 0%, #e3edf7 100%);
}

.doctors-section-fullwidth .doctor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.5s ease;
  will-change: transform;
}
.doctors-section-fullwidth .doctor-card:hover .doctor-image img {
  transform: scale(1.05);
  filter: saturate(1.06) contrast(1.03);
}

/* Soft bottom gradient for rating chip legibility */
.doctors-section-fullwidth .doctor-image::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 32%;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 15, 30, 0.42) 100%);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.4s ease;
}

/* Top accent line on hover */
.doctors-section-fullwidth .doctor-image::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--doc-primary) 50%, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.doctors-section-fullwidth .doctor-card:hover .doctor-image::before { opacity: 1; }

/* Rating chip */
.doctors-section-fullwidth .doc-rating {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 8px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--doc-ink);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  z-index: 3;
}
.doctors-section-fullwidth .doc-rating i.ti {
  font-size: 13px;
  color: var(--doc-star);
  filter: drop-shadow(0 1px 1px rgba(245, 158, 11, 0.35));
}

/* ----- Info area ----- */
.doctors-section-fullwidth .doctor-info {
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Meta top: branch chip + title text */
.doctors-section-fullwidth .doc-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  min-height: 24px;
}
.doctors-section-fullwidth .doc-branch-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(0, 102, 204, 0.08);
  border: 1px solid rgba(0, 102, 204, 0.15);
  border-radius: 999px;
  color: var(--doc-primary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}
.doctors-section-fullwidth .doc-branch-tag i.ti {
  font-size: 12px;
  color: var(--doc-primary);
}
.doctors-section-fullwidth .doctor-card:hover .doc-branch-tag {
  background: var(--doc-primary);
  color: #ffffff;
  border-color: var(--doc-primary);
}
.doctors-section-fullwidth .doctor-card:hover .doc-branch-tag i.ti { color: #fff; }

.doctors-section-fullwidth .doc-divider { display: none; }
.doctors-section-fullwidth .doc-title-tag {
  color: var(--doc-muted);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* Doctor name */
.doctors-section-fullwidth .doctor-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: var(--doc-ink);
  margin: 0 0 12px;
  min-height: 2.6em; /* equalize 1-2 line names */
  transition: color 0.3s ease;
}
.doctors-section-fullwidth .doctor-card-link:hover .doctor-name {
  color: var(--doc-primary);
}

/* Expertise tags */
.doctors-section-fullwidth .doctor-expertise {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 26px;
}
.doctors-section-fullwidth .expertise-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--doc-ink-3);
  padding: 3px 9px;
  background: var(--doc-paper);
  border: 1px solid var(--doc-line-2);
  border-radius: 7px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.doctors-section-fullwidth .doctor-card:hover .expertise-tag {
  background: rgba(0, 102, 204, 0.06);
  border-color: rgba(0, 102, 204, 0.18);
  color: var(--doc-primary-dark);
}

/* ----- FOOTER — stacked vertically ----- */
.doctors-section-fullwidth .doctor-card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
  margin-top: auto;
  border-top: none;
}

/* Stats — inline subtle row with icons */
.doctors-section-fullwidth .doctor-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
  font-size: 12.5px;
  color: var(--doc-muted);
  letter-spacing: -0.005em;
}
.doctors-section-fullwidth .stat-item-small {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex-direction: row;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.doctors-section-fullwidth .stat-item-small i.ti {
  font-size: 14px;
  color: var(--doc-primary);
  align-self: center;
  flex-shrink: 0;
  transition: color 0.3s ease;
}
.doctors-section-fullwidth .stat-item-small strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--doc-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.doctors-section-fullwidth .stat-item-small em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-muted);
  letter-spacing: -0.005em;
}
.doctors-section-fullwidth .stat-divider {
  display: none;
}

/* CTA — full-width button, primary */
.doctors-section-fullwidth .btn-doctor-appointment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #ffffff;
  background: #0a0f1e;
  border: none;
  border-radius: 10px;
  text-decoration: none !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease;
  box-shadow:
    0 4px 12px -2px rgba(10, 15, 30, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  line-height: 1.2;
}
.doctors-section-fullwidth .btn-doctor-appointment::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-primary-light) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.doctors-section-fullwidth .btn-doctor-appointment:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: var(--doc-primary);
  box-shadow:
    0 10px 22px -4px rgba(0, 102, 204, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.doctors-section-fullwidth .btn-doctor-appointment:hover::before { opacity: 1; }
.doctors-section-fullwidth .btn-doctor-appointment i.ti {
  font-size: 15px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.doctors-section-fullwidth .btn-doctor-appointment:hover i.ti {
  transform: translate(2px, -2px);
}

/* Empty state */
.doctors-section-fullwidth .doctor-card--empty {
  text-align: center;
  padding: 60px 30px;
  align-items: center;
  justify-content: center;
}
.doctors-section-fullwidth .doctor-card--empty i.ti {
  font-size: 40px;
  color: var(--doc-muted-2);
  margin-bottom: 12px;
}
.doctors-section-fullwidth .doctor-card--empty p {
  color: var(--doc-muted);
  font-size: 14px;
  margin: 0;
}

/* =======================================================
   CONTROLS — bottom row
   ======================================================= */
.doctors-section-fullwidth .doc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 44px;
}

.doctors-section-fullwidth .carousel-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.doctors-section-fullwidth .carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--doc-line-2);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.35s ease;
}
.doctors-section-fullwidth .carousel-indicator.active {
  width: 28px;
  background: linear-gradient(90deg, var(--doc-primary), var(--doc-primary-light));
}

.doctors-section-fullwidth .doc-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.doctors-section-fullwidth .carousel-nav {
  position: static !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;

  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--doc-line-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--doc-ink-2);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.doctors-section-fullwidth .carousel-nav i.ti {
  font-size: 18px;
  color: inherit;
  transition: transform 0.3s ease;
}
.doctors-section-fullwidth .carousel-nav:hover {
  background: var(--doc-primary);
  border-color: var(--doc-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 102, 204, 0.32);
}
.doctors-section-fullwidth .carousel-prev:hover i.ti { transform: translateX(-2px); }
.doctors-section-fullwidth .carousel-next:hover i.ti { transform: translateX(2px); }

/* =======================================================
   Responsive
   ======================================================= */
@media (max-width: 1200px) {
  .doctors-section-fullwidth .doctor-card {
    width: calc((100% - 48px) / 3) !important;
    flex: 0 0 calc((100% - 48px) / 3);
  }
}

@media (max-width: 900px) {
  .doctors-section-fullwidth { padding: 70px 0 60px; }
  .doctors-section-fullwidth .doctors-section-inner { padding: 0 24px; }
  .doctors-section-fullwidth .doc-section-head { margin-bottom: 36px; }
  .doctors-section-fullwidth .doc-head-row { grid-template-columns: 1fr; gap: 18px; }
  .doctors-section-fullwidth .doctor-card {
    width: calc((100% - 24px) / 2) !important;
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .doctors-section-fullwidth .doctors-track { gap: 16px; }
  .doctors-section-fullwidth .doctor-card {
    width: 100% !important;
    flex: 0 0 100%;
  }
  .doctors-section-fullwidth .doctor-info { padding: 16px; }
  .doctors-section-fullwidth .doctor-name { font-size: 17px; min-height: auto; }
  .doctors-section-fullwidth .doc-controls { flex-direction: column-reverse; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .doctors-section-fullwidth *,
  .doctors-section-fullwidth *::before,
  .doctors-section-fullwidth *::after {
    transition: none !important;
    animation: none !important;
  }
}
