/* ── DOCTOR & CLINIC DETAIL PAGES ──
   Shared by _doctor.html and _clinic.html. Uses tokens from css/style.css. */

.detail {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}

/* ── Shared section ── */
.doctor-section,
.clinic-section {
  margin-top: 44px;
}
.doctor-section h2,
.clinic-section h2 {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.section-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* ── Doctor hero ── */
.doctor-hero {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
/* Doctor detail image — 200×214 (≈0.93:1, near-square, slightly portrait). */
.doctor-hero-avatar {
  width: 116px;
  aspect-ratio: 200 / 214;
  border-radius: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 600;
  color: #fff;
  object-fit: cover;
  object-position: center; /* overridden inline by the stored focal point */
}
.doctor-hero-avatar--photo {
  background: var(--border);
}
.doctor-hero-copy h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.doctor-hero-spec {
  font-size: 15px;
  color: var(--red-text);
  font-weight: 500;
  margin-top: 4px;
}
.doctor-hero-qual {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.doctor-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}
.doctor-stat {
  font-size: 13px;
  color: var(--ink-soft);
}
.doctor-stat strong {
  color: var(--ink);
  font-weight: 600;
}
.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.spec-chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--red-text);
  background: var(--red-light);
  border: 1px solid var(--red-mid);
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s;
}
.spec-chip:hover {
  background: var(--red-mid);
}

.doctor-bio {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── Practice locations (doctor page) ── */
.practice-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.practice-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.practice-card:hover {
  border-color: var(--red-mid);
  box-shadow: 0 2px 10px rgba(238, 66, 57, 0.06);
}
.practice-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.practice-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.practice-card-type {
  font-size: 11px;
  color: var(--ink-mute);
  white-space: nowrap;
}
.practice-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 6px;
}
.practice-card-city {
  font-size: 12px;
  color: var(--ink-soft);
}
.practice-card-fee {
  font-size: 12px;
  font-weight: 600;
  color: var(--red-text);
  background: var(--red-light);
  padding: 2px 8px;
  border-radius: 5px;
}
.practice-card-schedule {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.practice-card-schedule svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Doctor rows (clinic page & category page) ── */
.doctor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doctor-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.doctor-row:hover {
  border-color: var(--red-mid);
  background: #fffafa;
}
/* Doctor card image — 124×124 (1:1 square). */
.doctor-row-avatar {
  width: 48px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  object-fit: cover;
  object-position: center; /* overridden inline by the stored focal point */
}
.doctor-row-avatar--photo {
  background: var(--border);
}
.doctor-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.doctor-row-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.doctor-row-spec {
  font-size: 12.5px;
  color: var(--ink-soft);
}
.doctor-row-schedule {
  font-size: 12px;
  color: var(--ink-mute);
}
.doctor-row-fee {
  font-size: 13px;
  font-weight: 600;
  color: var(--red-text);
  white-space: nowrap;
}
.doctor-row-chev {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--ink-mute);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── App CTA band ── */
.app-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--red-light);
  border: 1px solid var(--red-mid);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 32px;
}
.app-cta--secondary {
  background: #fafafa;
  border-color: var(--border);
}
.app-cta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.app-cta-text strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.app-cta-text span {
  font-size: 13px;
  color: var(--ink-soft);
}
.app-cta .btn {
  flex-shrink: 0;
}

/* ── Clinic hero ── */
.clinic-hero-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-text);
}
.clinic-hero h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.15;
}
.clinic-hero-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 12px;
  line-height: 1.55;
}
.clinic-hero-address svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clinic-map-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
  margin-top: 8px;
}
.clinic-map-link:hover {
  text-decoration: underline;
}

/* ── Clinic gallery ──
   Detail carousel images are 320×222 (≈1.44:1, landscape). */
.clinic-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.clinic-photo {
  aspect-ratio: 320 / 222;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}
.clinic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* overridden inline by the stored focal point */
  display: block;
}

/* ── Amenities ── */
.amenity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 16px;
}
.amenity-chip {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: #f6f6f6;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ── TRUST LAYER ── */

/* Freshness line — sits in the hero. Confirmed (recent) gets a green check. */
.trust-fresh {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 14px;
}
.trust-fresh svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--ink-mute);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust-fresh--confirmed {
  color: #15803d;
}
.trust-fresh--confirmed svg {
  stroke: #15803d;
}
.trust-fresh strong {
  font-weight: 600;
}
.trust-fresh a {
  color: var(--ink-soft);
  text-decoration: underline;
}
.trust-fresh a:hover {
  color: var(--red);
}

/* Trust section at the foot of doctor/clinic pages. */
.trust-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Human-loop process line. */
.trust-loop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.trust-loop svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Report-incorrect-info control + form. */
.trust-report {
  margin-top: 18px;
}
.trust-report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.trust-report-toggle:hover {
  color: var(--red);
}
.trust-report-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust-report-form {
  margin-top: 14px;
  max-width: 460px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Native [hidden] must win over display:flex above. */
.trust-report-form[hidden] {
  display: none;
}
.trust-report-intro {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.trust-report-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.trust-report-form select,
.trust-report-form textarea {
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink);
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  width: 100%;
  resize: vertical;
}
.trust-report-form select:focus,
.trust-report-form textarea:focus {
  outline: none;
  border-color: var(--red-mid);
}
.trust-report-submit {
  align-self: flex-start;
}
.trust-report-status {
  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 16px;
}
.trust-report-status a {
  color: var(--red);
}
.trust-report-done {
  font-size: 13px;
  color: #15803d;
  font-weight: 500;
  line-height: 1.5;
}

/* data-accuracy explainer page. */
.accuracy-hero h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.accuracy-lead {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-top: 12px;
  max-width: 640px;
}
.accuracy-p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-top: 8px;
  max-width: 680px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .detail {
    padding: 28px 24px 48px;
  }
  .practice-list {
    grid-template-columns: 1fr;
  }
  .clinic-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .doctor-hero {
    gap: 16px;
  }
  .doctor-hero-avatar {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }
  .doctor-hero-copy h1,
  .clinic-hero h1 {
    font-size: 23px;
  }
  .app-cta {
    padding: 18px 20px;
  }
}

@media (max-width: 520px) {
  .clinic-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .app-cta .btn {
    width: 100%;
    justify-content: center;
  }
}
