/* ═══════════════════════════════════════════════════════════════════════════
   Health Queries Module — design tokens inherit from index.css
   :root variables (--primary, --secondary, --tertiary) are already set there.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hq-hero {
  background: linear-gradient(135deg, #e8f1ff 0%, #f5f9ff 55%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  padding: 7.5rem 1.25rem 4rem;
}

.hq-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,104,249,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hq-hero__inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.hq-hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: var(--tertiary);
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.hq-hero__title span { color: var(--primary); }

.hq-hero__sub {
  font-size: 1.05rem;
  color: #4b5563;
  line-height: 1.7;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.hq-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hq-hero__cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(to right, var(--primary), #5ea0fc);
  color: white;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,104,249,.25);
  transition: box-shadow .2s;
}

.hq-hero__cta-primary:hover { box-shadow: 0 6px 20px rgba(0,104,249,.35); }

.hq-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: .95rem;
  border-radius: 10px;
  transition: background .2s;
}

.hq-hero__cta-secondary:hover { background: var(--secondary); }

/* Stats strip below hero */
.hq-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,104,249,.12);
}

.hq-hero-stat { text-align: center; }
.hq-hero-stat__num { font-size: 1.75rem; font-weight: 800; color: var(--primary); line-height: 1; }
.hq-hero-stat__lbl { font-size: .72rem; color: #6b7280; font-weight: 500; margin-top: 3px; }

/* ─── Section wrapper ───────────────────────────────────────────────────── */
.hq-section {
  padding: 3.5rem 1.25rem;
}

.hq-section--alt { background: var(--secondary); }

.hq-section__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hq-section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--tertiary);
  margin-top: .5rem;
}

/* ─── Article card grid ─────────────────────────────────────────────────── */
.hq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

/* Article card */
.hq-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.hq-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,104,249,.13);
  border-color: var(--primary);
}

.hq-card__img-wrap {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--secondary);
  flex-shrink: 0;
}

.hq-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.hq-card:hover .hq-card__img-wrap img { transform: scale(1.04); }

.hq-card__img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2.5rem;
  background: var(--secondary);
}

.hq-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hq-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .75rem;
}

.hq-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tertiary);
}

.hq-card__author-pic {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hq-card__author-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hq-card__date {
  font-size: .7rem;
  color: #9ca3af;
  white-space: nowrap;
}

.hq-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tertiary);
  line-height: 1.4;
  margin-bottom: .6rem;
}

.hq-card__title a { color: inherit; }
.hq-card__title a:hover { color: var(--primary); }

.hq-card__desc {
  font-size: .83rem;
  color: #6b7280;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.hq-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap .2s;
}

.hq-card__read-more:hover { gap: 10px; }

/* ─── Category card grid ────────────────────────────────────────────────── */
.hq-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.hq-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem .75rem 1rem;
  background: white;
  border-radius: 14px;
  border: 1.5px solid #e5eaf5;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: all .25s;
  text-decoration: none;
  cursor: pointer;
}

.hq-cat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(0,104,249,.12);
  transform: translateY(-3px);
}

.hq-cat-card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.hq-cat-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--secondary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.hq-cat-card__name {
  font-size: .8rem;
  font-weight: 700;
  color: var(--tertiary);
  text-align: center;
  line-height: 1.3;
}

/* ─── Loading skeleton ──────────────────────────────────────────────────── */
.hq-skeleton { pointer-events: none; cursor: default; }
.hq-skeleton:hover { transform: none !important; box-shadow: 0 2px 12px rgba(0,0,0,.07) !important; border-color: transparent !important; }

.hq-skel-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f4ff 25%, #e2eaff 50%, #f0f4ff 75%);
  background-size: 200% 100%;
  animation: hq-shimmer 1.5s infinite;
  border-radius: 0;
}

.hq-cat-card.hq-skeleton .hq-skel-img {
  height: 56px;
  width: 56px;
  border-radius: 12px;
}

.hq-skel-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: .6rem;
  background: linear-gradient(90deg, #f0f4ff 25%, #e2eaff 50%, #f0f4ff 75%);
  background-size: 200% 100%;
  animation: hq-shimmer 1.5s infinite;
  width: 90%;
}

.hq-skel-line--sm { width: 55%; height: 9px; }
.hq-skel-line--lg { width: 100%; height: 14px; }

@keyframes hq-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Error / Empty state ───────────────────────────────────────────────── */
.hq-error-state,
.hq-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #9ca3af;
}

.hq-error-state i,
.hq-empty-state i { font-size: 3rem; display: block; margin-bottom: 1rem; color: #d1d5db; }

.hq-error-state p,
.hq-empty-state p { font-size: 1rem; }

/* ─── Breadcrumb ────────────────────────────────────────────────────────── */
.breadcrumb { display:flex; align-items:center; gap:6px; font-size:.82rem; color:#6b7280; margin-bottom:1.1rem; flex-wrap:wrap; }
.breadcrumb a { color:var(--primary); }
.breadcrumb a:hover { text-decoration:underline; }
.breadcrumb .sep { color:#9ca3af; }
.breadcrumb .current { color:var(--tertiary); font-weight:600; }

/* ─── Section label (reuse from brain-tumor page) ───────────────────────── */
.section-label { display:inline-block; padding:4px 14px; background:var(--secondary); color:var(--primary); border-radius:999px; font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; margin-bottom:.75rem; }

/* ─── Category page heading ─────────────────────────────────────────────── */
.hq-cat-hero {
  background: linear-gradient(135deg, #e8f1ff 0%, #f5f9ff 55%, #ffffff 100%);
  padding: 7.5rem 1.25rem 3rem;
}

.hq-cat-hero__inner { max-width: 56rem; margin: 0 auto; }

.hq-cat-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--tertiary);
  margin-top: .5rem;
  line-height: 1.2;
}

.hq-cat-hero__title span { color: var(--primary); }

/* ─── Article detail page layout ────────────────────────────────────────── */
.hq-art-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .hq-art-wrap { grid-template-columns: 1fr; }
  .hq-art__sidebar { order: -1; }
}

/* Article header */
.hq-art-header {
  background: linear-gradient(135deg, #e8f1ff 0%, #f5f9ff 55%, #ffffff 100%);
  padding: 7.5rem 1.25rem 3rem;
}

.hq-art-header__inner { max-width: 52rem; margin: 0 auto; }

.hq-art__h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--tertiary);
  line-height: 1.25;
  margin: .75rem 0 1.25rem;
}

/* Author + date bar */
.hq-art__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.hq-art__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hq-art__author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary);
}

.hq-art__author-initial-lg {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hq-art__author-name { font-weight: 700; font-size: .9rem; color: var(--tertiary); }
.hq-art__author-qual { font-size: .75rem; color: #9ca3af; }

.hq-art__date { font-size: .82rem; color: #6b7280; display: flex; align-items: center; gap: 6px; }

/* Hero image */
.hq-art__hero-img-wrap {
  max-width: 52rem;
  margin: 0 auto 0;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  max-height: 420px;
}

.hq-art__hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.hq-art__hero-fallback {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--primary);
  font-size: 4rem;
}

/* Article body prose */
.hq-art__body {
  font-size: .95rem;
  line-height: 1.85;
  color: #374151;
}

.hq-art__body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--tertiary);
  margin: 2rem 0 .75rem;
}

.hq-art__body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tertiary);
  margin: 1.75rem 0 .65rem;
}

.hq-art__body h4, .hq-art__body h5, .hq-art__body h6 {
  font-weight: 700;
  color: var(--tertiary);
  margin: 1.5rem 0 .5rem;
}

.hq-art__body p { margin-bottom: 1.1rem; }

.hq-art__body ul, .hq-art__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.hq-art__body ul li { list-style: disc; margin-bottom: .4rem; }
.hq-art__body ol li { list-style: decimal; margin-bottom: .4rem; }

.hq-art__body strong { font-weight: 700; color: var(--tertiary); }
.hq-art__body em { font-style: italic; }

.hq-art__body blockquote {
  border-left: 4px solid var(--primary);
  padding: .75rem 1rem;
  margin: 1.5rem 0;
  background: var(--secondary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--tertiary);
}

.hq-art__body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.hq-art__body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: .88rem;
}

.hq-art__body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Share bar */
.hq-art__share {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.hq-art__share-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--tertiary);
}

.hq-art__share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: white;
  transition: opacity .2s;
}

.hq-art__share-btn:hover { opacity: .85; }
.hq-art__share-btn--linkedin  { background: #0077b5; }
.hq-art__share-btn--whatsapp  { background: #25d366; }
.hq-art__share-btn--facebook  { background: #1877f2; }
.hq-art__share-btn--twitter   { background: #000000; }

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.hq-art__sidebar {
  position: sticky;
  top: 90px;
}

.hq-art__sidebar--empty { display: none; }

/* CTA box in sidebar */
.hq-cta-box {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,104,249,.1);
  border: 1.5px solid var(--secondary);
  text-align: center;
}

.hq-cta-box__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1rem;
}

.hq-cta-box__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--tertiary);
  margin-bottom: .5rem;
}

.hq-cta-box__body {
  font-size: .82rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hq-cta-box__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .6rem;
  transition: opacity .2s;
}

.hq-cta-box__btn:hover { opacity: .88; }

.hq-cta-box__btn--wa { background: #25d366; }

/* Mid-content CTA */
.hq-mid-cta {
  margin: 1.75rem 0;
  border-radius: 14px;
  background: var(--secondary);
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--primary);
}

.hq-mid-cta__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hq-mid-cta__icon {
  font-size: 1.75rem;
  color: var(--primary);
  flex-shrink: 0;
}

.hq-mid-cta__title {
  font-weight: 700;
  color: var(--tertiary);
  font-size: .9rem;
  margin-bottom: .15rem;
}

.hq-mid-cta__sub { font-size: .8rem; color: #6b7280; }

.hq-mid-cta__btn {
  margin-left: auto;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: .82rem;
  white-space: nowrap;
}

/* ─── Loading state for article page ────────────────────────────────────── */
.hq-art__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  color: #6b7280;
  text-align: center;
}

.hq-art__loading i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── "Back to articles" link ───────────────────────────────────────────── */
.hq-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hq-back-link:hover { text-decoration: underline; }

/* ─── Related articles strip ─────────────────────────────────────────────  */
.hq-related { padding: 3rem 1.25rem; background: var(--secondary); }
.hq-related__inner { max-width: 72rem; margin: 0 auto; }
.hq-related__title { font-size: 1.4rem; font-weight: 800; color: var(--tertiary); margin-bottom: 1.5rem; }

/* ─── Responsive tweaks ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hq-hero { padding: 6.5rem 1.25rem 3rem; }
  .hq-art-header { padding: 6.5rem 1.25rem 2rem; }
  .hq-art-wrap { padding: 1.5rem 1rem 3rem; }
  .hq-art__hero-img { height: 240px; }
  .hq-art__hero-img-wrap { max-height: 240px; }
  .hq-hero-stats { gap: 1.5rem; }
  .hq-mid-cta__btn { margin-left: 0; }
}

@media (max-width: 480px) {
  .hq-grid { grid-template-columns: 1fr; }
  .hq-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
