/*
 * canonical.css
 * Custom styles for the HaloDoctor AI canonical page.
 * Loaded after Bootstrap + halodoctor.css.
 * All classes prefixed with .hd- to avoid CMS collisions.
 */

/* ── CSS CUSTOM PROPERTIES ──────────────────────────────────────────────── */

:root {
  --hd-primary:       #007bff; /* update to exact brand blue if client provides */
  --hd-primary-dark:  #0056b3;
  --hd-text:          #212529;
  --hd-text-muted:    #6c757d;
  --hd-border:        #dee2e6;
  --hd-bg-light:      #f8f9fa;
  --hd-bg-section:    #ffffff;
  --hd-radius:        6px;
  --hd-section-gap:   3rem;
}

/* ── SKIP LINK ──────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--hd-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--hd-radius) var(--hd-radius);
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.1s;
}
.skip-link:focus {
  top: 0;
}

/* ── SITE HEADER ────────────────────────────────────────────────────────── */

.hd-site-header {
  background: #fff;
  border-bottom: 1px solid var(--hd-border);
  padding: 0.875rem 0;
}

.hd-site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hd-logo a {
  text-decoration: none;
}

.hd-logo__text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hd-primary);
  letter-spacing: -0.01em;
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */

.hd-breadcrumb {
  font-size: 0.875rem;
  color: var(--hd-text-muted);
}

.hd-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hd-breadcrumb li {
  display: flex;
  align-items: center;
}

.hd-breadcrumb a {
  color: var(--hd-text-muted);
  text-decoration: none;
}

.hd-breadcrumb a:hover {
  color: var(--hd-primary);
  text-decoration: underline;
}

.hd-breadcrumb span[aria-current="page"] {
  color: var(--hd-text);
}

/* ── MAIN CONTAINER SPACING ─────────────────────────────────────────────── */

#main-content > .container {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* ── SECTIONS ───────────────────────────────────────────────────────────── */

.hd-section {
  border-top: 1px solid var(--hd-border);
  padding-top: var(--hd-section-gap);
  margin-top: var(--hd-section-gap);
}

.hd-section--intro {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.hd-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--hd-text);
}

/* ── LABEL BADGE ────────────────────────────────────────────────────────── */

.hd-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hd-primary);
  background: rgba(0, 123, 255, 0.08);
  border: 1px solid rgba(0, 123, 255, 0.2);
  border-radius: 100px;
  padding: 0.2em 0.75em;
  margin-bottom: 0.75rem;
}

/* ── INTRO SECTION ──────────────────────────────────────────────────────── */

.hd-section--intro h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .hd-section--intro h1 {
    font-size: 2rem;
  }
}

.hd-intro-box {
  background: var(--hd-bg-light);
  border-left: 3px solid var(--hd-primary);
  border-radius: 0 var(--hd-radius) var(--hd-radius) 0;
  padding: 1.25rem 1.5rem;
}

.hd-intro-box p + p,
.hd-intro-box p + ul {
  margin-top: 0.75rem;
}

.hd-intro-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.hd-note {
  font-size: 0.85rem;
  color: var(--hd-text-muted);
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

/* ── CLEAN LIST (no default bullets look) ───────────────────────────────── */

.hd-clean-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.hd-clean-list li {
  padding: 0.3rem 0 0.3rem 1.25rem;
  position: relative;
}

.hd-clean-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--hd-primary);
}

/* ── HOW IT WORKS — STEPS ────────────────────────────────────────────────── */

.hd-steps {
  padding-left: 0;
  list-style: none;
  counter-reset: hd-steps;
}

.hd-steps > li {
  counter-increment: hd-steps;
  padding: 0.75rem 0 0.75rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--hd-border);
}

.hd-steps > li:last-child {
  border-bottom: none;
}

.hd-steps > li::before {
  content: counter(hd-steps);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--hd-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hd-steps > li ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

/* ── 2-COLUMN GRID ──────────────────────────────────────────────────────── */

.hd-grid-2 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── AUDIENCE CARDS ─────────────────────────────────────────────────────── */

.hd-audience-card {
  background: var(--hd-bg-light);
  border-radius: var(--hd-radius);
  padding: 1.25rem 1.5rem;
}

.hd-audience-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.hd-audience-tag--patients {
  background: rgba(0, 123, 255, 0.1);
  color: var(--hd-primary-dark);
}

.hd-audience-tag--doctors {
  background: rgba(40, 167, 69, 0.1);
  color: #1a7a32;
}

/* ── MINI-CASE CARDS ────────────────────────────────────────────────────── */

.hd-case-card {
  background: var(--hd-bg-light);
  border-radius: var(--hd-radius);
  padding: 1.25rem 1.5rem;
}

.hd-case-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hd-case-card dl {
  margin: 0;
}

.hd-case-card dt {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hd-text-muted);
  margin-top: 0.75rem;
}

.hd-case-card dt:first-child {
  margin-top: 0;
}

.hd-case-card dd {
  margin-left: 0;
  font-size: 0.9rem;
  color: var(--hd-text);
}

/* ── STATS GRID ─────────────────────────────────────────────────────────── */

.hd-stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .hd-stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.hd-stat {
  background: var(--hd-bg-light);
  border-radius: var(--hd-radius);
  padding: 1.25rem 1rem;
  text-align: center;
}

.hd-stat__number {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--hd-primary);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.hd-stat__label {
  display: block;
  font-size: 0.78rem;
  color: var(--hd-text-muted);
  line-height: 1.3;
}

/* ── FAQ LIST (native <details>/<summary>) ──────────────────────────────── */

.hd-faq-list {
  border-top: 1px solid var(--hd-border);
}

.hd-faq-item {
  border-bottom: 1px solid var(--hd-border);
}

/* remove default browser marker */
.hd-faq-question {
  list-style: none;
  display: block;
  padding: 1rem 2.25rem 1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hd-text);
  cursor: pointer;
  position: relative;
  line-height: 1.4;
  transition: color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

/* Firefox */
.hd-faq-question::-moz-list-bullet {
  display: none;
}

/* Webkit */
.hd-faq-question::-webkit-details-marker {
  display: none;
}

.hd-faq-question:hover {
  color: var(--hd-primary);
}

.hd-faq-question:focus-visible {
  outline: 2px solid var(--hd-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* chevron via CSS */
.hd-faq-question::after {
  content: '';
  position: absolute;
  right: 0.4rem;
  top: 1.15rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--hd-text-muted);
  border-bottom: 2px solid var(--hd-text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s, top 0.2s;
}

.hd-faq-item[open] > .hd-faq-question::after {
  top: 1.35rem;
  transform: rotate(225deg);
}

.hd-faq-item[open] > .hd-faq-question {
  color: var(--hd-primary);
}

.hd-faq-answer {
  padding: 0 0 1.25rem 0;
  font-size: 0.9rem;
  color: var(--hd-text);
  line-height: 1.65;
}

/* ── CONTACT GRID ───────────────────────────────────────────────────────── */

.hd-contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hd-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hd-contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hd-text-muted);
}

.hd-contact-value {
  font-size: 0.95rem;
  color: var(--hd-text);
}

.hd-contact-value a {
  color: var(--hd-primary);
  text-decoration: none;
}

.hd-contact-value a:hover {
  text-decoration: underline;
}

/* ── SITE FOOTER ────────────────────────────────────────────────────────── */

.hd-site-footer {
  border-top: 1px solid var(--hd-border);
  background: var(--hd-bg-light);
  padding: 1.5rem 0;
  margin-top: 4rem;
}

.hd-site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--hd-text-muted);
  text-align: center;
}

.hd-site-footer a {
  color: var(--hd-text-muted);
  text-decoration: none;
}

.hd-site-footer a:hover {
  color: var(--hd-primary);
  text-decoration: underline;
}
