/* ==========================================================================
   E-Doctor :: Premium Doctor Showcase + Ranking + Overall Applications
   Scoped entirely under .ed-showcase-section (kept separate from the app's
   global --ed-* theme so this section's own variable names stay local),
   but tonally aligned to the app-wide Red, Blue & Silver system: crimson
   red for the CTA/fee/#1-rank highlight, true navy blue for headings, and
   a clean blue accent (replacing the earlier rose) for badges/metrics —
   the same red-primary / blue-secondary split used everywhere else.
   ========================================================================== */

.ed-showcase-section {
  --dr-red: #b3182f;
  --dr-red-dark: #7a0f21;
  --dr-red-soft: rgba(179, 24, 47, .08);
  --dr-blue: #2f6db0;
  --dr-blue-light: #eaf2fa;
  --dr-blue-soft: rgba(47, 109, 176, .10);
  --dr-navy: #101d30;
  --dr-muted: #5c6673;
  --dr-bg: #f4f6f8;
  --dr-shadow: 0 10px 30px rgba(16, 29, 48, .09);
  --dr-shadow-lift: 0 22px 48px rgba(16, 29, 48, .17), 0 0 0 1px rgba(47, 109, 176, .22), 0 0 34px rgba(47, 109, 176, .22);
  position: relative;
  overflow: hidden;
  background: var(--dr-bg);
  isolation: isolate;
}

/* ---- Right/front cloud background effect: soft, behind everything, never
   intercepts clicks or reduces text contrast ---- */
.ed-showcase-cloud {
  position: absolute;
  inset: -15% -20% -15% 30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 75% 25%, rgba(47, 109, 176, .16), transparent 55%),
    radial-gradient(circle at 95% 70%, rgba(179, 24, 47, .10), transparent 55%),
    radial-gradient(circle at 55% 85%, rgba(255, 255, 255, .9), transparent 60%);
  filter: blur(50px);
}

.ed-showcase-section > .container { position: relative; z-index: 1; }

.ed-showcase-eyebrow {
  display: inline-block;
  background: var(--dr-blue-light);
  color: var(--dr-blue);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.ed-showcase-title { color: var(--dr-navy); font-weight: 700; }
.ed-showcase-sub { color: var(--dr-muted); }

.ed-btn-outline-red {
  border: 1.5px solid var(--dr-red);
  color: var(--dr-red);
  background: transparent;
  border-radius: 999px;
  font-weight: 600;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.ed-btn-outline-red:hover { background: var(--dr-red); color: #fff; box-shadow: 0 8px 20px var(--dr-red-soft); }

/* ---- Doctor showcase slider ---- */
.ed-doc-showcase { position: relative; z-index: 1; padding: 0 .5rem; }
.ed-doc-viewport { overflow: hidden; border-radius: 22px; }
.ed-doc-track {
  display: flex;
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.ed-doc-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(var(--doc-cols, 4), 1fr);
  gap: 1.25rem;
  padding: .35rem;
  align-items: stretch;
}

.ed-doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .56));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 20px;
  padding: 1.5rem 1.15rem 1.25rem;
  box-shadow: var(--dr-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.ed-doc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--dr-blue-soft), var(--dr-red-soft));
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 0;
}
.ed-doc-card:hover,
.ed-doc-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--dr-shadow-lift);
  color: inherit;
}
.ed-doc-card:hover::before { opacity: 1; }
.ed-doc-card:hover .ed-doc-photo img { transform: scale(1.1); }
.ed-doc-card:hover .ed-doc-rating { color: var(--dr-red); text-shadow: 0 0 14px rgba(179, 24, 47, .35); }
.ed-doc-card > * { position: relative; z-index: 1; }

.ed-doc-available {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  background: rgba(47, 109, 176, .95); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .02em;
  border-radius: 999px; padding: .22rem .55rem;
  box-shadow: 0 4px 10px rgba(47, 109, 176, .35);
}
.ed-doc-photo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  margin-bottom: .7rem; border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .14);
}
.ed-doc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ed-doc-name { font-weight: 700; color: var(--dr-navy); font-size: .95rem; margin-bottom: .1rem; }
.ed-doc-name i { color: var(--dr-blue); font-size: .8rem; margin-left: .15rem; }
.ed-doc-specialty { color: var(--dr-muted); font-size: .78rem; margin-bottom: .1rem; }
.ed-doc-qualification { color: var(--dr-muted); font-size: .72rem; margin-bottom: .35rem; }
.ed-doc-rating { color: #c9862f; font-weight: 600; font-size: .8rem; transition: color .3s ease, text-shadow .3s ease; margin-bottom: .4rem; }
.ed-doc-rating .bi-star { color: #d8dee8; }
.ed-doc-meta-row { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin-bottom: .5rem; }
.ed-doc-pill {
  background: rgba(15, 23, 42, .05); border-radius: 999px;
  padding: .2rem .55rem; font-size: .68rem; color: var(--dr-navy);
  display: inline-flex; align-items: center; gap: .25rem;
}
.ed-doc-pill.is-online { background: var(--dr-blue-soft); color: var(--dr-blue); }
.ed-doc-hospital { font-size: .7rem; color: var(--dr-muted); margin-bottom: .5rem; }
.ed-doc-fee { color: var(--dr-red); font-weight: 700; font-size: .85rem; margin-top: auto; }
.ed-doc-fee span { color: var(--dr-muted); font-weight: 400; font-size: .68rem; }
.ed-doc-cta {
  display: block; margin-top: .65rem; width: 100%;
  background: var(--dr-red); color: #fff; border: none; border-radius: 12px;
  padding: .5rem; font-weight: 600; font-size: .8rem; line-height: 1.4;
  transition: background .25s ease, transform .2s ease;
}
.ed-doc-card:hover .ed-doc-cta { background: var(--dr-red-dark); }

.ed-doc-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
  display: flex; align-items: center; justify-content: center;
  color: var(--dr-navy); transition: background .25s ease, color .25s ease;
}
.ed-doc-nav:hover { background: var(--dr-blue); color: #fff; }
.ed-doc-nav.prev { left: -6px; }
.ed-doc-nav.next { right: -6px; }
.ed-doc-nav[hidden] { display: none; }

.ed-doc-dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1.4rem; }
.ed-doc-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: rgba(15, 23, 42, .15); transition: background .25s ease, width .25s ease;
}
.ed-doc-dots button.active { background: var(--dr-blue); width: 22px; border-radius: 6px; }

/* ---- Overall Applications stat ---- */
.ed-stat-panel {
  display: flex; align-items: center; gap: 1.4rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .5));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .65); border-radius: 24px;
  padding: 1.75rem 2.25rem; box-shadow: var(--dr-shadow);
  max-width: 560px; margin: 0 auto; position: relative; overflow: hidden;
}
.ed-stat-panel::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(120deg, var(--dr-red-soft), var(--dr-blue-soft));
}
.ed-stat-icon {
  width: 62px; height: 62px; border-radius: 16px; flex-shrink: 0;
  background: var(--dr-red); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: 0 10px 22px rgba(179, 24, 47, .35); position: relative; z-index: 1;
}
.ed-stat-number { font-size: 2.5rem; font-weight: 800; color: var(--dr-red); line-height: 1; position: relative; z-index: 1; }
.ed-stat-label { color: var(--dr-navy); font-weight: 600; font-size: .88rem; position: relative; z-index: 1; }

/* ---- Doctor ranking ---- */
.ed-rank-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .56));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .65); border-radius: 20px;
  padding: 1.25rem; box-shadow: var(--dr-shadow); height: 100%;
}
.ed-rank-card-head {
  display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--dr-navy);
  margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid rgba(15, 23, 42, .08);
}
.ed-rank-card-head i { color: var(--dr-red); font-size: 1.05rem; }
.ed-rank-row {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .4rem; border-radius: 12px;
  text-decoration: none; color: inherit; transition: background .25s ease;
}
.ed-rank-row:hover { background: var(--dr-blue-soft); color: inherit; }
.ed-rank-num {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(15, 23, 42, .06);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .74rem;
  color: var(--dr-navy); flex-shrink: 0;
}
.ed-rank-row:first-child .ed-rank-num { background: var(--dr-red); color: #fff; }
.ed-rank-photo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ed-rank-info { flex: 1; min-width: 0; }
.ed-rank-name { font-weight: 600; font-size: .82rem; color: var(--dr-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-rank-meta { font-size: .7rem; color: var(--dr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-rank-score { font-weight: 700; font-size: .8rem; color: var(--dr-blue); flex-shrink: 0; white-space: nowrap; text-align: right; }
.ed-rank-empty { color: var(--dr-muted); font-size: .82rem; padding: .5rem; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .ed-stat-panel { padding: 1.4rem 1.6rem; }
}
@media (max-width: 575px) {
  .ed-doc-card { padding: 1.1rem .85rem 1rem; }
  .ed-stat-panel { flex-direction: column; text-align: center; max-width: 100%; }
  .ed-doc-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-doc-track { transition: none; }
  .ed-doc-photo img, .ed-doc-card { transition: none; }
}
