/* HealthLogicRX.com — Main Stylesheet */

:root {
  --navy:        #0B3D91;
  --navy-dark:   #082d6b;
  --navy-light:  #1a4fa8;
  --teal:        #00B4D8;
  --teal-light:  #CAF0F8;
  --bg:          #F0F4F8;
  --white:       #ffffff;
  --text:        #1A2332;
  --text-muted:  #6B7280;
  --border:      #E2E8F0;
  --red:         #DC2626;
  --red-bg:      #FEF2F2;
  --red-border:  #FECACA;
  --amber:       #D97706;
  --amber-bg:    #FFFBEB;
  --amber-border:#FDE68A;
  --green:       #059669;
  --green-bg:    #ECFDF5;
  --green-border:#A7F3D0;
  --blue-bg:     #EFF6FF;
  --blue-border: #BFDBFE;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:   0 10px 25px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.06);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
               Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--teal); }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .4rem; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar__logo-icon {
  width: 32px;
  height: 32px;
}

.navbar__logo span { color: var(--teal); }

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
}

.navbar__nav a {
  display: block;
  padding: .5rem .9rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}

.navbar__nav a:hover {
  color: var(--navy);
  background: var(--blue-bg);
}

.navbar__cta {
  background: var(--navy);
  color: var(--white) !important;
  border-radius: 20px;
  padding: .45rem 1.1rem !important;
  font-weight: 600 !important;
  transition: background .2s !important;
}

.navbar__cta:hover {
  background: var(--navy-light) !important;
  color: var(--white) !important;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #0e5fa0 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(0,180,216,.25);
  border: 1px solid rgba(0,180,216,.5);
  color: var(--teal-light);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 780px;
  margin: 0 auto 1rem;
}

.hero h1 span { color: var(--teal); }

.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.hero__badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  padding: .4rem .9rem;
  border-radius: 20px;
  font-size: .82rem;
  color: rgba(255,255,255,.85);
}

/* ── Section Titles ───────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .4rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 2.5rem;
}

/* ── Pillar Tags ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 20px;
}

.tag--p1 { background: #EDE9FE; color: #6D28D9; }
.tag--p2 { background: #FEF3C7; color: #92400E; }
.tag--p3 { background: #D1FAE5; color: #065F46; }

/* ── Article Cards ────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card__banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.card__banner--p1 { background: linear-gradient(135deg, #1e3a5f, #2563EB); }
.card__banner--p2 { background: linear-gradient(135deg, #78350F, #D97706); }
.card__banner--p3 { background: linear-gradient(135deg, #064E3B, #059669); }

.card__body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card__tag { margin-bottom: .7rem; }
.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: .6rem;
}

.card__excerpt {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.1rem;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}

.card__meta {
  font-size: .78rem;
  color: var(--text-muted);
}

.card__link {
  font-size: .83rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.card__link:hover { color: var(--teal); }

/* ── Pillars Section ──────────────────────────────────────── */
.pillars { background: var(--white); padding: 4rem 0; border-top: 1px solid var(--border); }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }

.pillar-item {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.pillar-item--p1 { background: #F5F3FF; border-color: #DDD6FE; }
.pillar-item--p2 { background: #FFFBEB; border-color: #FDE68A; }
.pillar-item--p3 { background: #ECFDF5; border-color: #A7F3D0; }

.pillar-item__icon { font-size: 2rem; margin-bottom: .75rem; }
.pillar-item__title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.pillar-item__desc { font-size: .87rem; color: var(--text-muted); line-height: 1.6; }

/* ── Article Page Layout ──────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #0e5fa0 100%);
  color: var(--white);
  padding: 3.5rem 0 2.5rem;
}

.article-hero .tag { margin-bottom: 1rem; }

.article-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  max-width: 760px;
  margin-bottom: 1rem;
}

.article-hero__meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  flex-wrap: wrap;
}

.article-hero__meta span { display: flex; align-items: center; gap: .3rem; }

.article-body {
  padding: 2.5rem 0 4rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin: 2.2rem 0 .8rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--teal-light);
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 .6rem;
}

.article-content p {
  font-size: .97rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 68ch;
}

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  font-size: .97rem;
}

.article-content li { margin-bottom: .5rem; line-height: 1.7; }

.article-content strong { color: var(--text); }

/* ── Callout Boxes ────────────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.callout__title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}

.callout p { font-size: .92rem; line-height: 1.7; margin: 0; max-width: none; }

.callout--danger {
  background: var(--red-bg);
  border-color: var(--red);
}
.callout--danger .callout__title { color: var(--red); }

.callout--warning {
  background: var(--amber-bg);
  border-color: var(--amber);
}
.callout--warning .callout__title { color: var(--amber); }

.callout--info {
  background: var(--blue-bg);
  border-color: var(--navy);
}
.callout--info .callout__title { color: var(--navy); }

.callout--success {
  background: var(--green-bg);
  border-color: var(--green);
}
.callout--success .callout__title { color: var(--green); }

/* ── Safety Brief (prominent top-of-article) ──────────────── */
.safety-brief {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}

.safety-brief__label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .5rem;
}

.safety-brief p {
  font-size: .93rem;
  line-height: 1.7;
  color: #7F1D1D;
  margin: 0;
  max-width: none;
}

/* ── Bottom Line Box ──────────────────────────────────────── */
.bottom-line {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.bottom-line__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .5rem;
}

.bottom-line p { color: rgba(255,255,255,.9); line-height: 1.75; font-size: .97rem; margin: 0; max-width: none; }

/* ── Comparison Table ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--white);
}

thead tr { background: var(--navy); color: var(--white); }
thead th {
  padding: .85rem 1.1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
tbody td { padding: .8rem 1.1rem; vertical-align: top; line-height: 1.55; }
tbody td:first-child { font-weight: 600; color: var(--navy); }

/* ── Decision Matrix ──────────────────────────────────────── */
.scenarios { display: grid; gap: 1rem; margin: 1.5rem 0; }

.scenario {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.scenario__badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.scenario--a .scenario__badge { background: #EDE9FE; }
.scenario--b .scenario__badge { background: #D1FAE5; }
.scenario--c .scenario__badge { background: #FEF3C7; }
.scenario--d .scenario__badge { background: #FCE7F3; }

.scenario__title { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.scenario__body { font-size: .9rem; color: var(--text-muted); line-height: 1.65; }

/* ── Questions Block ──────────────────────────────────────── */
.questions {
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.questions__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.questions ol {
  padding-left: 1.5rem;
  font-size: .93rem;
  line-height: 1.75;
  color: var(--text);
}

.questions li { margin-bottom: .7rem; }

/* ── Sidebar (TOC + Quick Facts) ──────────────────────────── */
.sidebar { position: sticky; top: 84px; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.sidebar-card__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.toc-list { list-style: none; padding: 0; }
.toc-list li { border-bottom: 1px solid var(--border); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: block;
  padding: .45rem 0;
  font-size: .85rem;
  color: var(--text-muted);
  transition: color .15s, padding-left .15s;
}
.toc-list a:hover { color: var(--navy); padding-left: .4rem; }

.quick-facts-list { list-style: none; padding: 0; }
.quick-facts-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
  gap: .5rem;
}
.quick-facts-list li:last-child { border-bottom: none; }
.quick-facts-list .label { color: var(--text-muted); flex-shrink: 0; }
.quick-facts-list .value { font-weight: 600; text-align: right; }

/* ── Fast Facts / Compare Box ─────────────────────────────── */
.fast-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.fast-facts__col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.fast-facts__header {
  padding: .8rem 1.2rem;
  font-weight: 700;
  font-size: .92rem;
  color: var(--white);
  text-align: center;
}

.fast-facts__header--a { background: var(--navy); }
.fast-facts__header--b { background: #1E6E5E; }

.fast-facts__body { padding: 1rem 1.2rem; }
.fast-facts__row {
  display: flex;
  justify-content: space-between;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .86rem;
  gap: .5rem;
}
.fast-facts__row:last-child { border-bottom: none; }
.fast-facts__row .label { color: var(--text-muted); }
.fast-facts__row .value { font-weight: 600; text-align: right; }

/* ── About Page ───────────────────────────────────────────── */
.about-section { padding: 4rem 0; }
.about-section:nth-child(even) { background: var(--white); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

.principles-list { list-style: none; padding: 0; }
.principles-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: .75rem;
}
.principles-list li .icon { font-size: 1.5rem; flex-shrink: 0; }
.principles-list li .text strong { display: block; font-size: .93rem; margin-bottom: .2rem; }
.principles-list li .text span { font-size: .86rem; color: var(--text-muted); line-height: 1.55; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: .75rem;
}

.footer__brand span { color: var(--teal); }

.footer__desc { font-size: .87rem; line-height: 1.7; max-width: 320px; }

.footer__heading {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: .9rem;
}

.footer__links { list-style: none; padding: 0; }
.footer__links li { margin-bottom: .45rem; }
.footer__links a {
  font-size: .87rem;
  color: rgba(255,255,255,.65);
  transition: color .15s;
}
.footer__links a:hover { color: var(--teal); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

.footer__disclaimer {
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  font-size: .8rem;
  line-height: 1.65;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.2rem;
}

/* ── Utility ──────────────────────────────────────────────── */
.section-padding { padding: 4rem 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.text-muted { color: var(--text-muted); }
.badge-inline {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  margin-left: .3rem;
  vertical-align: middle;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { opacity: .4; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .fast-facts { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .navbar__nav .hide-mobile { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  .scenario { grid-template-columns: 1fr; }
  .scenario__badge { display: none; }
}
