/* ============================================
   TCM CareMap — Shared Styles
   Palette: matches chempumpselect.com
   ============================================ */

:root {
  --ink: #23282e;
  --muted: #5f6b76;
  --line: #e2e6ea;
  --bg: #f6f8f7;
  --card: #ffffff;

  --brand: #e2544b;
  --brand-d: #c24338;
  --teal: #2fbfa5;
  --teal-d: #22a48d;
  --ok: #1d9e78;
  --warn: #b26a00;

  --brand-light: #fdeeed;
  --teal-light: #eaf6f2;
  --teal-chip: #ddf5ef;
  --teal-border: #bfe3d8;
  --brand-border: #f3c9c4;

  --gradient: linear-gradient(135deg, #e2544b, #2fbfa5);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(20, 40, 70, .05);
  --shadow-md: 0 4px 16px rgba(20, 40, 70, .08);
  --max-w: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-text .tcm { color: var(--brand); }
.logo-text .care { color: var(--teal-d); }
.logo-text .map { color: var(--teal-d); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--brand);
  text-decoration: none;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--brand);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.nav-cta:hover { background: var(--brand-d); text-decoration: none; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient);
  color: #fff;
  padding: 80px 0 72px;
  text-align: center;
}
.hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: 19px;
  opacity: .92;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero .btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #fff;
  color: var(--brand-d);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform .15s, box-shadow .15s;
}
.hero .btn-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  text-decoration: none;
}
.hero .btn-hero svg { width: 18px; height: 18px; }
.hero-note {
  margin-top: 16px;
  font-size: 14px;
  opacity: .8;
}

/* ---------- Section common ---------- */
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--card);
}
.section-title {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.section-sub {
  font-size: 17px;
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ---------- Cards grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon.red { background: var(--brand-light); }
.card-icon.green { background: var(--teal-light); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- How it works ---------- */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.step-item {
  text-align: center;
  padding: 24px 16px;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.step-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step-item p {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Article cards ---------- */
.article-cat {
  margin-bottom: 40px;
}
.article-cat-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card-body {
  padding: 22px;
}
.article-card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.article-card-tag.red { background: var(--brand-light); color: var(--brand); }
.article-card-tag.green { background: var(--teal-chip); color: var(--ok); }
.article-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}
.article-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.article-card-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--gradient);
  color: #fff;
  padding: 48px 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 40px 0;
}
.cta-banner h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}
.cta-banner p {
  font-size: 16px;
  opacity: .9;
  margin-bottom: 24px;
}
.cta-banner .btn-white {
  display: inline-flex;
  padding: 12px 28px;
  background: #fff;
  color: var(--brand-d);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: transform .15s;
}
.cta-banner .btn-white:hover { transform: translateY(-1px); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 280px;
}
.footer-col h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: 14px;
  color: var(--muted);
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ============================================
   FORM PAGE
   ============================================ */

.form-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 40px 0;
  align-items: start;
}

/* Steps sidebar */
.form-steps {
  position: sticky;
  top: 92px;
}
.form-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s;
  font-size: 14px;
  color: var(--muted);
}
.form-step-item:hover { background: var(--brand-light); }
.form-step-item.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.form-step-item.completed {
  color: var(--ok);
}
.form-step-item.completed .step-circle {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--card);
}
.form-step-item.active .step-circle {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.form-step-item .step-label { line-height: 1.3; }

/* Form panel */
.form-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-panel h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-panel .panel-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* Field styles */
.field-group {
  margin-bottom: 24px;
}
.field-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field-label .required { color: var(--brand); margin-left: 2px; }
.field-label .optional { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.45;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(226, 84, 75, .12);
}
textarea { resize: vertical; min-height: 80px; }
textarea::placeholder, input::placeholder { color: #9aa5af; }

/* Radio & Checkbox groups */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-option, .checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 15px;
}
.radio-option:hover, .checkbox-option:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.radio-option.selected, .checkbox-option.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}
.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.radio-option span, .checkbox-option span { line-height: 1.4; }

/* Inline radio row */
.radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.radio-row .radio-option {
  flex: 1;
  min-width: 120px;
  justify-content: center;
  text-align: center;
}

/* Multi-select chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-select {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
  color: var(--ink);
  user-select: none;
}
.chip-select:hover { border-color: var(--teal); }
.chip-select.selected {
  background: var(--teal-chip);
  border-color: var(--teal);
  color: var(--teal-d);
  font-weight: 600;
}
.chip-select.disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Alert boxes */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.alert-red {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-d);
}
.alert-green {
  background: var(--teal-light);
  border: 1px solid var(--teal-border);
  color: var(--ok);
}
.alert-yellow {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* Price display */
.price-box {
  background: var(--teal-light);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.price-box .price {
  font-size: 36px;
  font-weight: 700;
  color: var(--teal-d);
}
.price-box .price-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* Checklist display */
.checklist {
  list-style: none;
  margin: 16px 0;
}
.checklist li {
  padding: 6px 0 6px 28px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

/* Consent items */
.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.consent-item input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-d); }
.btn-secondary {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--bg); }
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Conditional field */
.conditional-field {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--teal);
}

/* Form step visibility */
.form-step-panel { display: none; }
.form-step-panel.active { display: block; }

/* Progress bar mobile */
.form-progress-mobile {
  display: none;
  margin-bottom: 20px;
}
.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  transition: width .3s;
}
.progress-text {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-steps { display: none; }
  .form-progress-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 24px; }
  .form-panel { padding: 24px 18px; }
  .cards-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .radio-row { flex-direction: column; }
}
