/* ═══════════════════════════════════════════════════════════════════════
   LiverDecoded — /guidelines/ index page
   Design system inherited from /tags/
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────────────── */
:root {
  --green:       #1a4a35;
  --green-mid:   #2d6a4f;
  --green-light: #e8f3ee;
  --amber:       #b8762a;
  --amber-light: #fdf0dc;
  --teal:        #1d5f6e;
  --teal-light:  #e3f2f5;
  --plum:        #4a2d6b;
  --plum-light:  #f0ebf8;
  --slate:       #2b4363;
  --slate-light: #eaeff6;
  --text:        #2d3748;
  --text-muted:  #64748b;
  --bg:          #faf8f3;
  --bg-card:     #ffffff;
  --border:      #e5e0d8;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover:0 6px 24px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ─── Nav ─────────────────────────────────────────────────────────────── */


/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #2d6a4f 60%, #1d5f6e 100%);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(184,118,42,0.12) 0%, transparent 50%);
}
.hero-breadcrumb {
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  position: relative;
}
.hero-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.hero-breadcrumb a:hover { color: #fff; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 14px;
  position: relative;
}
.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.82);
  max-width: 660px;
  margin: 0 auto 28px;
  line-height: 1.7;
  position: relative;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  position: relative;
}
.hero-stat {
  text-align: center;
  color: rgba(255,255,255,0.9);
}
.hero-stat strong {
  display: block;
  font-size: 26px;
  font-family: 'Playfair Display', serif;
  color: #74c69d;
  line-height: 1;
  margin-bottom: 3px;
}
.hero-stat span { font-size: 12px; letter-spacing: 0.5px; opacity: 0.75; }

/* ─── Search ──────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
#search {
  width: 100%;
  padding: 13px 18px 13px 42px;
  border-radius: 50px;
  border: none;
  font-size: 14.5px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  background: rgba(255,255,255,0.97);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
#search::placeholder { color: #94a3b8; }

/* ─── Filter Tabs ─────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 58px;
  z-index: 90;
}
.filter-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 14px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.filter-btn:hover { color: var(--green); }
.filter-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ─── Main Content ────────────────────────────────────────────────────── */
main { max-width: 1100px; margin: 0 auto; padding: 48px 24px 72px; }

/* ─── Category Section ────────────────────────────────────────────────── */
.cat-section {
  margin-bottom: 56px;
  transition: opacity 0.25s;
}
.cat-section.hidden { display: none; }
.cat-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cat-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 4px;
}
.cat-header-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Guideline Cards Grid ────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.gl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.gl-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
}
.gl-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #c8c0b4;
}

/* accent strips per category */
[data-cat="masld"] .gl-card::before    { background: var(--amber); }
[data-cat="portal"] .gl-card::before   { background: var(--teal); }
[data-cat="treatment"] .gl-card::before { background: var(--green-mid); }

/* ─── Card Header Row ─────────────────────────────────────────────────── */
.gl-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gl-org-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1;
}
.org-aasld  { background: var(--green-light); color: var(--green); }
.org-easl   { background: var(--teal-light);  color: var(--teal); }
.org-baveno { background: var(--plum-light);  color: var(--plum); }
.org-aga    { background: var(--slate-light);  color: var(--slate); }

.gl-doc-type {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.gl-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  font-weight: 500;
}

/* ─── Card Title & Description ────────────────────────────────────────── */
.gl-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.gl-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* ─── Key Stat Callout ────────────────────────────────────────────────── */
.gl-key-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
}
.gl-key-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  flex-shrink: 0;
}
.gl-key-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ─── Card Footer / CTA ──────────────────────────────────────────────── */
.gl-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

/* ─── FDA Accelerated Approval Badge ─────────────────────────────────── */
.gl-fda-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffe69c;
}

/* ─── No Results ──────────────────────────────────────────────────────── */
#no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  display: none;
}
#no-results svg { margin-bottom: 12px; opacity: 0.4; }

/* ─── Coming-soon Teaser ─────────────────────────────────────────────── */
.coming-soon {
  margin-top: 48px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
}
.coming-soon h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 8px;
}
.coming-soon p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto;
}
.coming-soon-list {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.coming-soon-list span {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--green-light);
  color: var(--green-mid);
  border: 1px solid #b7ddc8;
}

.nav__logo {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
}
.nav__logo span { color: var(--green-glow); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #0f2d1f;
  color: rgba(255,255,255,0.62);
  padding: 56px 24px 32px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__brand p {
  font-size: 13.5px;
  line-height: 1.72;
  margin: 12px 0 18px;
}

.footer__socials {
  display: flex;
  gap: 10px;
}
.footer__social {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: background 0.18s, color 0.18s;
}
.footer__social:hover { background: rgba(255,255,255,0.14); color: #fff; }

.footer__col h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 16px;
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__col ul li a {
  font-size: 13.5px;
  color: rgba(255,255,255,0.62);
  transition: color 0.15s;
}
.footer__col ul li a:hover { color: var(--green-glow); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links a:not(.btn-nav) { display: none; }
  .hero { padding: 36px 16px 32px; }
  .hero-stats { gap: 20px; }
  main { padding: 32px 16px 48px; }
  .cards-grid { grid-template-columns: 1fr; }
  .gl-date { margin-left: 0; }
  .gl-card-head { gap: 6px; }
}

/* ─── Animations ──────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cat-section { animation: fadeUp 0.4s ease both; }
.cat-section:nth-child(2) { animation-delay: 0.05s; }
.cat-section:nth-child(3) { animation-delay: 0.10s; }
.cat-section:nth-child(4) { animation-delay: 0.15s; }
