/* ==========================================================================
   Care Guides — condition PDF library (.kcg-)
   Built on the shared --kc-* design tokens (navy/orange, Inter + Sora).
   ========================================================================== */

.kcg-hero,
.kcg-section,
.kcg-cta { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.kcg-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #001C4C 0%, #06276a 55%, #0a3184 100%);
  color: #fff;
  padding: 96px 0 110px;
}
.kcg-hero__bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255,155,113,.22), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.10), transparent 40%);
  pointer-events: none;
}
.kcg-hero .container { position: relative; z-index: 1; }
.kcg-hero__inner { max-width: 760px; }
.kcg-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,155,113,.16);
  border: 1px solid rgba(255,155,113,.4);
  color: #ffb593;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 15px; border-radius: 999px;
}
.kcg-hero__title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700; line-height: 1.08; text-wrap: balance;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 20px 0 16px;
  color: #fff; /* override global navy h1 colour — the hero sits on a dark ground */
}
.kcg-hero__title span { color: #ff9b71; }
.kcg-hero__sub {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.6; color: rgba(255,255,255,.86);
  max-width: 60ch; margin: 0 0 28px;
}
.kcg-hero__search {
  position: relative; max-width: 560px; margin-bottom: 26px;
}
.kcg-hero__search i {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: #001C4C; font-size: 1rem;
}
.kcg-hero__search input {
  width: 100%; border: 0; border-radius: 999px;
  padding: 17px 24px 17px 50px;
  font-size: 1rem; color: #001C4C;
  background: #fff; box-shadow: 0 10px 34px rgba(0,10,40,.28);
}
.kcg-hero__search input:focus { outline: 3px solid rgba(255,155,113,.6); outline-offset: 2px; }
.kcg-hero__stats {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 22px;
}
.kcg-hero__stats span {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.9);
}
.kcg-hero__stats i { color: #ff9b71; }
.kcg-hero__breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); }
.kcg-hero__breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.kcg-hero__breadcrumb a:hover { color: #ff9b71; }
.kcg-hero__breadcrumb i { margin: 0 8px; font-size: .7rem; }

/* ── Sticky toolbar / filter pills ─────────────────────────────────────── */
.kcg-toolbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--kc-border, #E5E7EB);
  padding: 14px 0;
  margin-top: -34px; /* pull up over hero base */
}
.kcg-toolbar__pills {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin;
}
.kcg-toolbar__pills::-webkit-scrollbar { height: 6px; }
.kcg-toolbar__pills::-webkit-scrollbar-thumb { background: #d7dbe3; border-radius: 999px; }
.kcg-pill {
  --kcg-accent: #001C4C;
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--kc-border, #E5E7EB);
  color: #38415a; font-size: .9rem; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease; white-space: nowrap;
}
.kcg-pill i { color: var(--kcg-accent); }
.kcg-pill:hover { border-color: var(--kcg-accent); transform: translateY(-1px); }
.kcg-pill.is-active {
  background: var(--kcg-accent); border-color: var(--kcg-accent); color: #fff;
}
.kcg-pill.is-active i { color: #fff; }
.kcg-pill__count {
  font-size: .72rem; font-weight: 700;
  background: rgba(0,28,76,.08); color: inherit;
  padding: 2px 8px; border-radius: 999px; line-height: 1.4;
}
.kcg-pill.is-active .kcg-pill__count { background: rgba(255,255,255,.25); }

/* ── Section + result bar ──────────────────────────────────────────────── */
.kcg-section { padding: 40px 0 72px; background: var(--kc-soft-bg, #f8f2ef); }
.kcg-resultbar { color: var(--kc-body, #5E5F63); font-size: .95rem; margin: 6px 0 26px; }
.kcg-resultbar strong { color: #001C4C; }

/* ── Grid + cards ──────────────────────────────────────────────────────── */
.kcg-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.kcg-card {
  --kcg-accent: #001C4C;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--kc-border, #E5E7EB);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--kc-shadow, 0 2px 20px rgba(0,28,76,.08));
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  scroll-margin-top: 90px;
}
.kcg-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--kc-shadow-lg, 0 8px 40px rgba(0,28,76,.14));
  border-color: color-mix(in srgb, var(--kcg-accent) 40%, transparent);
}
.kcg-card__top {
  position: relative;
  padding: 26px 24px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.kcg-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: 16px;
  font-size: 1.6rem; color: var(--kcg-accent);
  background: color-mix(in srgb, var(--kcg-accent) 12%, #fff);
}
.kcg-card__ribbon {
  display: inline-flex; align-items: center; gap: 5px;
  background: #ff9b71; color: #3a1c0c;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: 5px 11px; border-radius: 999px;
}
.kcg-card__body { padding: 18px 24px 10px; flex: 1; }
.kcg-card__cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--kcg-accent);
}
.kcg-card__title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.24rem; font-weight: 700; line-height: 1.25; color: #001C4C;
  margin: 10px 0 8px; text-wrap: balance;
}
.kcg-card__summary { font-size: .93rem; line-height: 1.55; color: var(--kc-body, #5E5F63); margin: 0; }
.kcg-card__meta {
  display: flex; gap: 16px; padding: 0 24px 16px;
  font-size: .8rem; color: #7a8194;
}
.kcg-card__meta i { margin-right: 5px; color: var(--kcg-accent); }
.kcg-card__actions {
  display: flex; gap: 10px; padding: 16px 24px 24px;
  border-top: 1px solid #f0f0f3; margin-top: auto;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.kcg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: .92rem; font-weight: 600;
  padding: 11px 18px; border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: all .18s ease; line-height: 1;
}
.kcg-btn--primary { background: var(--kc-orange-dark, #ff7934); color: #fff; flex: 1; }
.kcg-btn--primary:hover { background: #e9691f; transform: translateY(-1px); color: #fff; }
.kcg-btn--ghost { background: #fff; color: #001C4C; border-color: var(--kc-border, #E5E7EB); }
.kcg-btn--ghost:hover { border-color: var(--kcg-accent); color: var(--kcg-accent); }
.kcg-btn--white { background: #fff; color: #001C4C; }
.kcg-btn--white:hover { background: #f1f1f4; color: #001C4C; }
.kcg-btn--outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.kcg-btn--outline-white:hover { background: rgba(255,255,255,.12); color: #fff; }
.kcg-btn--block { width: 100%; }
.kcg-btn:focus-visible { outline: 3px solid rgba(255,121,52,.5); outline-offset: 2px; }

/* ── Empty / error states ──────────────────────────────────────────────── */
.kcg-empty {
  text-align: center; padding: 60px 20px; color: var(--kc-body, #5E5F63);
}
.kcg-empty i { font-size: 2.6rem; color: #c3c9d6; margin-bottom: 16px; }
.kcg-empty h2 { font-family: 'Sora', 'Inter', sans-serif; color: #001C4C; font-size: 1.4rem; margin: 0 0 8px; }
.kcg-empty p { margin: 0 auto; max-width: 46ch; }
.kcg-empty a { color: var(--kc-orange-dark, #ff7934); font-weight: 600; }
.kcg-empty--page { background: #fff; border-radius: 16px; box-shadow: var(--kc-shadow, 0 2px 20px rgba(0,28,76,.08)); }
.kcg-linkbtn { background: none; border: 0; color: var(--kc-orange-dark, #ff7934); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }

/* ── Closing CTA ───────────────────────────────────────────────────────── */
.kcg-cta { background: #001C4C; color: #fff; padding: 64px 0; }
.kcg-cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.kcg-cta__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: #ff9b71; font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
}
.kcg-cta__text h2 { font-family: 'Sora', 'Inter', sans-serif; font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0 8px; }
.kcg-cta__text p { color: rgba(255,255,255,.82); margin: 0; max-width: 52ch; }
.kcg-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Lead-capture modal ────────────────────────────────────────────────── */
.kcg-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.kcg-modal[hidden] { display: none; }
.kcg-modal__backdrop { position: absolute; inset: 0; background: rgba(0,10,32,.62); backdrop-filter: blur(3px); }
.kcg-modal__dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: #fff; border-radius: 18px; padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(0,10,40,.4);
  animation: kcgIn .28s cubic-bezier(.16,1,.3,1);
}
@keyframes kcgIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.kcg-modal__x {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #f1f1f4; color: #001C4C; cursor: pointer; font-size: 1rem;
}
.kcg-modal__x:hover { background: #e4e4ea; }
.kcg-modal__head { text-align: center; margin-bottom: 22px; }
.kcg-modal__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 16px; margin-bottom: 12px;
  background: rgba(255,155,113,.16); color: var(--kc-orange-dark, #ff7934); font-size: 1.5rem;
}
.kcg-modal__head h2 { font-family: 'Sora', 'Inter', sans-serif; color: #001C4C; font-size: 1.4rem; margin: 0 0 8px; }
.kcg-modal__head p { color: var(--kc-body, #5E5F63); font-size: .92rem; margin: 0; line-height: 1.5; }
.kcg-form { display: flex; flex-direction: column; gap: 14px; }
.kcg-field { display: flex; flex-direction: column; gap: 5px; }
.kcg-field > span { font-size: .84rem; font-weight: 600; color: #001C4C; }
.kcg-field em { color: #8b91a1; font-style: normal; font-weight: 400; }
.kcg-field input {
  border: 1.5px solid var(--kc-border, #E5E7EB); border-radius: 10px;
  padding: 12px 14px; font-size: .95rem; font-family: inherit; color: #001C4C;
}
.kcg-field input:focus { outline: 0; border-color: var(--kc-orange-dark, #ff7934); box-shadow: 0 0 0 3px rgba(255,121,52,.14); }
.kcg-check { display: flex; align-items: flex-start; gap: 10px; font-size: .84rem; color: var(--kc-body, #5E5F63); line-height: 1.45; cursor: pointer; }
.kcg-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--kc-orange-dark, #ff7934); }
.kcg-form__err { background: #fdecec; color: #b3261e; border-radius: 8px; padding: 10px 12px; font-size: .86rem; margin: 0; }
.kcg-form__note { text-align: center; font-size: .78rem; color: #8b91a1; margin: 2px 0 0; }
.kcg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kcg-btn.is-loading { opacity: .7; pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .kcg-hero { padding: 72px 0 88px; }
  .kcg-grid { grid-template-columns: 1fr; gap: 18px; }
  .kcg-cta__inner { flex-direction: column; align-items: flex-start; }
  .kcg-cta__actions { width: 100%; }
  .kcg-cta__actions .kcg-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .kcg-card, .kcg-btn, .kcg-pill { transition: none; }
  .kcg-modal__dialog { animation: none; }
}
