/* =============================================================================
   AMAR KHULNA — profiles.css  v2.6.0
   Doctor and blood-donor profile cards and detail pages.
   Fluid responsive layout across 320px – 1920px+ (Portrait & Landscape).
   ============================================================================= */

/* Per-profile colour tokens */
.ak-profile-doctor {
  --profile-ink:  #0f5068;
  --profile-soft: #edf7fa;
  --profile-line: #cce5ee;
  --profile-tint: #d8eef4;
}
.ak-profile-donor {
  --profile-ink:  #a82030;
  --profile-soft: #fff3f5;
  --profile-line: #f0d4da;
  --profile-tint: #fbe4e8;
}

/* ── Profile card ──────────────────────────────────────────────────────────── */
.ak-profile-card {
  border-color: var(--profile-line);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(20,60,45,.06);
  position: relative; min-width: 0; overflow: hidden;
  transition: box-shadow .22s ease, transform .22s ease;
}
.ak-profile-card:hover {
  box-shadow: 0 10px 36px rgba(20,60,45,.12);
  transform: translateY(-3px);
}

/* Coloured top accent bar */
.ak-profile-card::before {
  content: "";
  display: block; height: 5px;
  background: var(--profile-ink);
  border-radius: 20px 20px 0 0;
}

/* Card header */
.ak-profile-card .ak-profile-head {
  display: flex; align-items: center; gap: 16px;
  padding: clamp(16px, 3vw, 24px);
  background: linear-gradient(132deg, var(--profile-soft), #fff);
  border-bottom: 1px solid var(--profile-line);
}

/* Portrait circle */
.ak-profile-portrait {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 82px; height: 82px; overflow: hidden;
  border: 4px solid #fff; border-radius: 50%;
  color: var(--profile-ink); background: var(--profile-tint);
  box-shadow: 0 0 0 1.5px var(--profile-line), 0 4px 14px rgba(20,60,45,.08);
}
.ak-profile-portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%; border-radius: inherit;
}
.ak-profile-portrait > .ak-icon { width: 36px; height: 36px; stroke-width: 1.4; }

/* Intro text */
.ak-profile-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1; }
.ak-profile-kicker { font-size: 12px; color: var(--profile-ink); letter-spacing: .1px; line-height: 1.6; }
.ak-profile-department { font-size: 15px; font-weight: 700; line-height: 1.55; color: var(--profile-ink); overflow-wrap: anywhere; }

/* Blood group pill */
.ak-blood-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--profile-line); border-radius: 12px;
  background: #fff; color: var(--profile-ink); padding: 6px 12px; line-height: 1.3;
}
.ak-blood-pill b { font-family: Arial, sans-serif; font-size: clamp(20px, 4vw, 25px); font-weight: 700; letter-spacing: .2px; }
.ak-blood-pill > .ak-icon { width: 18px; height: 18px; }

/* Card body */
.ak-profile-card .ak-listing-body { padding: clamp(16px, 3vw, 22px); }
.ak-profile-card .ak-listing-badges:empty { display: none; }
.ak-profile-card h3 { font-size: clamp(17px, 2.5vw, 20px); line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; }
.ak-profile-card h3 a:hover { color: var(--profile-ink); }
.ak-profile-card .ak-listing-location {
  font-size: 12px; line-height: 1.75; align-items: flex-start; gap: 6px; margin-bottom: 12px;
}
.ak-profile-card .ak-listing-location .ak-icon { flex-shrink: 0; margin-top: 3px; }
.ak-profile-qualification { font-size: 12px; line-height: 1.75; margin: 0 0 12px; color: #426470; overflow-wrap: anywhere; }

/* Facts inside card */
.ak-profile-facts { display: grid; gap: 10px; margin: 0 0 18px; padding: 12px 0 0; border-top: 1px solid var(--profile-line); }
.ak-profile-facts:empty { display: none; }
.ak-profile-facts > div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.75; }
.ak-profile-facts dt { color: var(--profile-ink); flex-shrink: 0; padding-top: 3px; }
.ak-profile-facts dt .ak-icon { width: 17px; height: 17px; }
.ak-profile-facts dd { margin: 0; color: #3d5c65; overflow-wrap: anywhere; min-width: 0; }

.ak-profile-description { font-size: 13px; line-height: 1.85; color: #5d4e55; margin: 0 0 18px; }

/* Card footer actions */
.ak-profile-card .ak-listing-actions { padding-top: 14px; gap: 10px; flex-wrap: wrap; border-top-color: var(--profile-line); }
.ak-profile-card .ak-listing-actions .ak-text-link { color: var(--profile-ink); font-size: 12.5px; min-height: 42px; }
.ak-profile-card .ak-profile-call {
  width: auto; height: auto; min-height: 42px; padding: 8px 14px;
  gap: 7px; border-radius: 10px;
  background: var(--profile-soft); color: var(--profile-ink);
  font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1.5px solid var(--profile-line);
  transition: box-shadow .18s ease, background .18s ease;
}
.ak-profile-call:hover { box-shadow: inset 0 0 0 1px var(--profile-ink); background: var(--profile-tint); }
.ak-profile-card .ak-listing-tools { gap: 7px; margin-top: 12px; }
.ak-profile-card .ak-tool-button { padding: 8px 11px; color: var(--profile-ink); border-color: var(--profile-line); flex: 1 1 auto; text-align: center; justify-content: center; }
.ak-profile-card .ak-tool-button:hover,
.ak-profile-card .ak-tool-button[aria-pressed="true"] { background: var(--profile-soft); }

/* ── Profile detail page ────────────────────────────────────────────────────── */
.ak-profile-hero {
  padding: clamp(24px, 4vw, 36px) 0 clamp(26px, 4vw, 40px);
  background: linear-gradient(116deg, var(--profile-soft), #fff);
  border-bottom-color: var(--profile-line);
}
.ak-profile-heading { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); padding-top: 12px; }
.ak-profile-heading-copy { min-width: 0; flex: 1; }
.ak-profile-heading h1 { font-size: clamp(22px, 3.8vw, 34px); margin: 8px 0 10px; line-height: 1.42; overflow-wrap: anywhere; }

.ak-profile-portrait-large {
  width: 140px; height: 140px; border-width: 5px; border-radius: 26px;
  box-shadow: 0 0 0 1.5px var(--profile-line), 0 14px 36px rgba(20,60,45,.12);
}
.ak-profile-portrait-large > .ak-icon { width: 60px; height: 60px; }

.ak-profile-heading .ak-tag {
  background: #fff; color: var(--profile-ink);
  border: 1.5px solid var(--profile-line); font-size: 11px; padding: 5px 10px;
}
.ak-profile-specialty { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--profile-ink); font-size: clamp(14px, 2.2vw, 16px); font-weight: 700; overflow-wrap: anywhere; }
.ak-profile-specialty > .ak-icon { width: 20px; height: 20px; flex-shrink: 0; }
.ak-profile-blood-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--profile-ink); margin: 0 0 14px; }
.ak-profile-blood-line .ak-blood-pill { padding: 6px 12px; }
.ak-profile-blood-line .ak-blood-pill b { font-size: 22px; }
.ak-profile-heading .ak-detail-area { font-size: 13px; line-height: 1.75; }
.ak-profile-heading-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.ak-profile-heading-actions .ak-button { background: var(--profile-ink); border-color: var(--profile-ink); min-height: 44px; font-size: 13px; }
.ak-profile-heading-actions .ak-text-link { color: var(--profile-ink); min-height: 42px; font-size: 13px; }

/* Detail cards */
.ak-profile-detail .ak-content-card { border-color: var(--profile-line); border-radius: 18px; }
.ak-profile-detail .ak-facts > div {
  border-top-color: var(--profile-line);
  grid-template-columns: 148px minmax(0,1fr);
  padding: 14px 0;
}
.ak-profile-detail .ak-facts dd { overflow-wrap: anywhere; }
.ak-self-reported { display: block; font-size: 11px; line-height: 1.75; color: #5a7078; margin-top: 6px; font-weight: 400; }
.ak-profile-detail .ak-contact-list > div > .ak-icon { color: var(--profile-ink); flex-shrink: 0; }
.ak-profile-detail .ak-contact-actions .ak-button { background: var(--profile-ink); border-color: var(--profile-ink); }
.ak-profile-detail .ak-contact-actions .ak-button-outline { background: #fff; color: var(--profile-ink); border-color: var(--profile-line); }
.ak-profile-detail .ak-info-note { background: var(--profile-soft); border-color: var(--profile-line); padding: clamp(14px, 3vw, 20px); }
.ak-profile-detail .ak-info-note p,
.ak-profile-detail .ak-info-note > .ak-icon { color: var(--profile-ink); }
.ak-profile-detail .ak-info-note p { font-size: 13px; line-height: 1.85; }
.ak-profile-detail .ak-profile-contact { border-top: 5px solid var(--profile-ink); scroll-margin-top: 24px; }
.ak-profile-contact .ak-listing-tools { margin-bottom: 20px; }
.ak-profile-detail .ak-tool-button { border-color: var(--profile-line); color: var(--profile-ink); }
.ak-profile-detail .ak-tool-button:hover,
.ak-profile-detail .ak-tool-button[aria-pressed="true"] { background: var(--profile-soft); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .ak-profile-portrait-large { width: 120px; height: 120px; }
}

@media (max-width: 767px) {
  .ak-profile-card .ak-profile-portrait { width: 70px; height: 70px; }
  .ak-profile-heading { align-items: flex-start; flex-wrap: wrap; padding-top: 8px; }
  .ak-profile-heading-copy { flex-basis: 100%; }
  .ak-profile-portrait-large { width: 96px; height: 96px; border-radius: 20px; border-width: 4px; }
  .ak-profile-portrait-large > .ak-icon { width: 44px; height: 44px; }
  .ak-profile-detail .ak-facts > div { grid-template-columns: 112px minmax(0,1fr); gap: 12px; font-size: 13px; }
}

@media (max-width: 600px) {
  .ak-listing-grid:has(.ak-profile-card) { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ak-profile-card .ak-profile-head { flex-wrap: wrap; gap: 12px; }
  .ak-profile-card .ak-profile-portrait { width: 64px; height: 64px; }
  .ak-profile-card .ak-listing-actions { flex-wrap: wrap; }
  .ak-profile-card .ak-profile-call { flex: 1 1 auto; justify-content: center; }
  .ak-profile-detail .ak-facts > div { grid-template-columns: 1fr; gap: 4px; padding: 11px 0; }
  .ak-profile-detail .ak-facts dt { font-weight: 700; font-size: 12px; }
  .ak-profile-heading-actions { width: 100%; }
  .ak-profile-heading-actions .ak-button { flex: 1 1 100%; justify-content: center; }
}
