/* =========================================================================
   Glucoreviews.com — shared design system (loads AFTER Bootstrap 5.3)
   Style: editorial / trustworthy review hub. Newsreader + Inter.
   Palette: clinical teal brand + confident green CTA.
   Mobile-first refinements + sticky CTA. No emoji icons.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,600;6..72,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --gr-ink:        #102a2c;   /* deep teal-charcoal — headings */
  --gr-body:       #273442;   /* slate body text */
  --gr-muted:      #5c6b73;   /* readable muted (passes 4.5:1 on white) */
  --gr-brand:      #0d9488;   /* teal — brand accent + links */
  --gr-brand-dk:   #0f766e;
  --gr-cta:        #16a34a;   /* confident green CTA */
  --gr-cta-dk:     #15803d;
  --gr-cta-darker: #166534;
  --gr-amber:      #f59e0b;   /* star rating */
  --gr-danger:     #dc2626;
  --gr-tint:       #f4faf9;   /* faint teal section background */
  --gr-tint-green: #effaf2;   /* pros card */
  --gr-tint-red:   #fef4f4;   /* cons card */
  --gr-border:     #e3eae9;
  --gr-shadow:     0 1px 2px rgba(16,42,44,.04), 0 8px 24px -12px rgba(16,42,44,.18);
  --gr-shadow-lg:  0 2px 4px rgba(16,42,44,.05), 0 18px 40px -16px rgba(16,42,44,.22);
  --gr-radius:     14px;

  /* Bootstrap overrides */
  --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--gr-body);
  --bs-body-font-size: 1.0625rem;     /* 17px — comfortable long-form read */
  --bs-body-line-height: 1.7;
  --bs-link-color-rgb: 13, 148, 136;
  --bs-link-hover-color-rgb: 15, 118, 110;
  --bs-emphasis-color-rgb: 16, 42, 44;
}

/* ---- Typography ---------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

h1, h2, h3, .navbar-brand, .verdict-score {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  color: var(--gr-ink);
  letter-spacing: -.01em;
}
h1 { font-weight: 700; line-height: 1.12; font-size: clamp(1.85rem, 5vw, 2.9rem); }
h2 { font-weight: 600; line-height: 1.2;  font-size: clamp(1.45rem, 3.5vw, 2rem); }
h3 { font-weight: 600; }
.lead { font-size: clamp(1.05rem, 2.5vw, 1.2rem); color: var(--gr-body); }
.text-muted { color: var(--gr-muted) !important; }

/* Keep long-form prose at a readable measure on large screens */
main section > p { max-width: 70ch; }

/* ---- Links -------------------------------------------------------------- */
a { text-underline-offset: .15em; transition: color .15s ease; }
.text-primary { color: var(--gr-brand) !important; }

/* ---- Disclosure bar ----------------------------------------------------- */
.disclosure-bar {
  background: #fffaf0;
  border-bottom: 1px solid #f4e2bd;
  color: #6b5418;
  font-size: .82rem;
}
.disclosure-bar a { color: var(--gr-brand-dk); font-weight: 600; }

/* ---- Navbar ------------------------------------------------------------- */
.navbar.sticky-top {
  background: rgba(255, 255, 255, .9) !important;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gr-border) !important;
}
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--gr-ink); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --bs-btn-font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 11px;
  padding-inline: 1.15rem;
  min-height: 46px;                  /* >= 44px touch target */
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-success {
  --bs-btn-bg: var(--gr-cta);            --bs-btn-border-color: var(--gr-cta);
  --bs-btn-hover-bg: var(--gr-cta-dk);   --bs-btn-hover-border-color: var(--gr-cta-dk);
  --bs-btn-active-bg: var(--gr-cta-darker); --bs-btn-active-border-color: var(--gr-cta-darker);
  --bs-btn-disabled-bg: var(--gr-cta);   --bs-btn-disabled-border-color: var(--gr-cta);
  box-shadow: 0 6px 16px -6px rgba(22, 163, 74, .55);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(22, 163, 74, .6); }
.btn-success:active { transform: translateY(0); }
.btn-lg { font-size: 1.075rem; min-height: 54px; }
.btn:focus-visible { outline: 3px solid rgba(13, 148, 136, .45); outline-offset: 2px; box-shadow: none; }

/* ---- Cards -------------------------------------------------------------- */
.card { border-radius: var(--gr-radius); }
.card.shadow, .card.shadow-sm { box-shadow: var(--gr-shadow) !important; border: 1px solid var(--gr-border) !important; }
.card.bg-light { background: var(--gr-tint) !important; }

/* Review index cards behave like a clickable surface */
main .row .card.h-100 { transition: transform .18s ease, box-shadow .18s ease; }
main .row .card.h-100:hover { transform: translateY(-3px); box-shadow: var(--gr-shadow-lg) !important; }

/* ---- Star rating & verdict --------------------------------------------- */
.star-rating { color: var(--gr-amber); }
.verdict-score { color: var(--gr-cta) !important; font-feature-settings: "tnum"; }

/* ---- Section rhythm ----------------------------------------------------- */
main section { scroll-margin-top: 90px; }

/* ---- Pros / Cons cards (replaces emoji headings) ------------------------ */
.proscons-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.proscons-head svg { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }
.card ul.fs-6 { padding-left: 1.15rem; }
/* Tint the surrounding card based on the heading it contains (:has, baseline 2023+) */
.card:has(.proscons-head--pro) { background: var(--gr-tint-green) !important; border-color: #cdeccf !important; }
.card:has(.proscons-head--con) { background: var(--gr-tint-red)   !important; border-color: #f6d6d6 !important; }
.pro-item  { margin-bottom: .4rem; }
.con-item  { margin-bottom: .4rem; }
.pro-item::marker { color: var(--gr-cta); }
.con-item::marker { color: var(--gr-danger); }

/* ---- Footer ------------------------------------------------------------- */
footer.bg-dark { background: #0c2123 !important; }
footer a.text-light { opacity: .82; padding: .15rem 0; transition: opacity .15s ease; }
footer a.text-light:hover { opacity: 1; text-decoration: underline; }

/* =========================================================================
   MOBILE STICKY CTA  (review pages) — shown below lg breakpoint
   ========================================================================= */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: none;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--gr-border);
  box-shadow: 0 -8px 24px -16px rgba(16, 42, 44, .4);
  transform: translateY(110%);
  transition: transform .28s ease;
}
.mobile-cta.is-visible { transform: translateY(0); }
.mobile-cta .mc-inner { display: flex; align-items: center; gap: .75rem; max-width: 720px; margin: 0 auto; }
.mobile-cta .mc-label { line-height: 1.15; min-width: 0; }
.mobile-cta .mc-label strong { display: block; color: var(--gr-ink); font-size: .95rem; }
.mobile-cta .mc-label span { font-size: .76rem; color: var(--gr-muted); }
.mobile-cta .btn { flex: 0 0 auto; margin-left: auto; }

@media (max-width: 991.98px) {
  .has-mobile-cta .mobile-cta { display: block; }
  body.has-mobile-cta { padding-bottom: 84px; }   /* reserve space, no content hidden */
}

/* ---- Mobile spacing & touch tuning ------------------------------------- */
@media (max-width: 575.98px) {
  main.container { padding-top: 1.75rem !important; padding-bottom: 2rem !important; }
  .container { padding-inline: 1.05rem; }
  .navbar .container { padding-inline: 1.05rem; }
  .navbar-brand { font-size: 1.3rem; }
  /* Let the nav CTA shrink gracefully instead of overflowing on 360px */
  .navbar .btn { padding-inline: .8rem; font-size: .9rem; }
  .card-body { padding: 1.15rem; }
  main section { margin-bottom: 2.25rem !important; }
}

/* ---- Accessibility: motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .mobile-cta { transition: none; }
}
