/* ============================================================
   Water Softener Guides — YourBizTools
   Article-specific styles. Loaded AFTER ../styles.css, so it
   reuses the :root variables (--blue, --teal, --ink, etc.).
   ============================================================ */

/* ---- Guides hub hero (reuses .hero gradient from styles.css) ---- */
.guides-intro { max-width: 68ch; }
.guides-intro p { color: #eaf6fb; }

/* ---- Guides hub card grid ---- */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-top: 1.75rem;
  padding-bottom: .5rem;
}
@media (min-width: 640px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .guide-grid { grid-template-columns: 1fr 1fr 1fr; } }

.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--body);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.guide-card:hover,
.guide-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18,34,43,.14);
  border-color: var(--accent);
  color: var(--body);
}
.guide-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--soft-bg); color: var(--teal-dark);
  display: grid; place-items: center; margin-bottom: .9rem; flex: none;
}
.guide-card-icon svg { width: 26px; height: 26px; }
.guide-card h3 { margin: 0 0 .4rem; font-size: 1.12rem; }
.guide-card p { margin: 0 0 1rem; font-size: .93rem; color: var(--muted); }
.guide-card-more { margin-top: auto; font-weight: 700; color: var(--blue); font-size: .92rem; }

/* ---- Article layout ---- */
.guide-article { padding-top: 1.5rem; padding-bottom: 1rem; }
.guide-article .article-inner { max-width: 74ch; margin: 0 auto; }
.guide-article h1 { font-size: clamp(1.6rem, 4vw, 2.15rem); margin-bottom: .5rem; }
.guide-article h2 { font-size: 1.4rem; margin-top: 2rem; }
.guide-article h3 { font-size: 1.12rem; margin-top: 1.5rem; }
.guide-article p, .guide-article li { font-size: 1.02rem; }
.guide-article ul, .guide-article ol { padding-left: 1.25rem; }
.guide-article li { margin-bottom: .4rem; }

.article-meta {
  display: flex; flex-wrap: wrap; gap: .35rem .9rem;
  color: var(--muted); font-size: .88rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.article-meta span:not(:first-child)::before {
  content: "\00b7";
  margin-right: .55rem;
  color: var(--muted);
}

/* ---- Direct-answer / key takeaway callout ---- */
.answer-box {
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}
.answer-box p:last-child { margin-bottom: 0; }
.answer-box .answer-label {
  display: block; text-transform: uppercase; letter-spacing: .04em;
  font-size: .72rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .35rem;
}

/* ---- Generic tip / note callouts (reuses .callout too) ---- */
.note {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .9rem 1.1rem; margin: 1.25rem 0;
}
.note strong { color: var(--ink); }
.note.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.note p:last-child { margin-bottom: 0; }

/* ---- Conversion / data table ---- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
.data-table {
  width: 100%; border-collapse: collapse; min-width: 420px;
  font-size: .95rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.data-table caption { text-align: left; color: var(--muted); font-size: .85rem; padding: 0 0 .5rem; }
.data-table th, .data-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--soft-bg); color: var(--ink); font-weight: 700; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:first-child, .data-table th:first-child { font-weight: 600; }

/* ---- Table of contents ---- */
.toc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1rem 1.15rem; margin: 1.5rem 0;
}
.toc h2 { margin: 0 0 .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc li { margin-bottom: .3rem; }

/* ---- Summary box ---- */
.summary-box {
  background: var(--soft-bg); border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem; margin: 1.75rem 0;
}
.summary-box h2 { margin-top: 0; }
.summary-box ul { margin-bottom: 0; }

/* ---- Back-to-calculator CTA strip ---- */
.calc-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  justify-content: space-between;
  background: linear-gradient(160deg, var(--blue) 0%, var(--teal) 100%);
  color: #fff; border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1.75rem 0;
}
.calc-cta p { margin: 0; color: #eaf6fb; max-width: 46ch; }
.calc-cta .cta-title { color: #fff; font-weight: 800; font-size: 1.1rem; display: block; margin-bottom: .15rem; }
.calc-cta .btn-primary { background: #fff; color: var(--blue-dark); border-color: #fff; white-space: nowrap; }
.calc-cta .btn-primary:hover { background: #eaf6fb; color: var(--blue-dark); }

/* ---- Related guides ---- */
.related-guides { margin: 1.75rem 0; }
.related-guides h2 { font-size: 1.2rem; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.related-list a {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .75rem .95rem; text-decoration: none; color: var(--ink); font-weight: 600;
}
.related-list a:hover { border-color: var(--accent); color: var(--blue); }
.related-list a span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); margin-top: .15rem; }

/* ---- Sources / further reading ---- */
.sources {
  border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem;
}
.sources h2 { font-size: 1.15rem; margin-top: 0; }
.sources ul { padding-left: 1.15rem; }
.sources li { margin-bottom: .5rem; }
.sources a { word-break: break-word; }

/* ---- Educational disclaimer footer note ---- */
.edu-disclaimer {
  background: var(--soft-bg); border-radius: var(--radius-sm);
  padding: .9rem 1.1rem; margin-top: 1.5rem; font-size: .88rem; color: var(--body);
}
.edu-disclaimer strong { color: var(--ink); }

/* ---- Breadcrumb wraps nicely on small screens (styles.css handles base) ---- */
.breadcrumb ol { flex-wrap: wrap; }
