/* ═══════════════════════════════════════════════════════════════════════════
   Befino - Article Page Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f8fafe;
  --surface: #ffffff;
  --surface-glass: rgba(255,255,255,0.78);
  --text: #1a1a2e;
  --text-muted: #4a4a68;
  --text-soft: #6a7391;
  --primary: #2196f3;
  --primary-light: #42a5f5;
  --primary-dark: #1e88e5;
  --teal: #009688;
  --navy: #0f1d37;
  --badge-bg: #e3f2fd;
  --badge-text: #1565c0;
  --line: rgba(33,150,243,0.12);
  --shadow: 0 4px 24px rgba(33,150,243,0.08);
  --shadow-lg: 0 24px 70px rgba(20,63,117,0.2);
  --radius: 24px;
  --radius-md: 18px;
  --container: 1180px;
  --nav-h: 84px;
  --ease: 240ms ease;
}

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

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(66,165,245,0.18), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(33,150,243,0.12), transparent 24%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  overflow-x: hidden;
}

body::before, body::after {
  content: ""; position: fixed; width: 28rem; height: 28rem; border-radius: 999px;
  filter: blur(70px); z-index: -2; pointer-events: none; opacity: 0.38;
}
body::before { top: -10rem; left: -10rem; background: rgba(33,150,243,0.28); }
body::after { right: -10rem; top: 34rem; background: rgba(0,150,136,0.16); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(33,150,243,0.3); outline-offset: 4px; }

.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  border: none; border-radius: 999px; padding: 0.85rem 1.4rem; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: transform var(--ease), box-shadow var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(33,150,243,0.28);
}
.btn-primary:hover { box-shadow: 0 16px 36px rgba(33,150,243,0.35); }

/* ── Navigation (same as main site) ── */
.nav-wrap { position: sticky; top: 0; z-index: 50; padding-top: 1rem; }
.nav {
  position: relative; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  gap: 1.2rem; height: var(--nav-h); padding: 0 1rem 0 1.3rem; border-radius: 999px;
  transition: background var(--ease), box-shadow var(--ease), backdrop-filter var(--ease), border-color var(--ease);
  border: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,0.72); backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(33,150,243,0.12); border-color: rgba(255,255,255,0.58);
}
.logo { display: inline-flex; align-items: center; }
.logo-mark { height: 2.45rem; width: auto; filter: drop-shadow(0 10px 18px rgba(33,150,243,0.2)); }
.nav-links { display: flex; justify-content: center; gap: 1.55rem; color: var(--text-muted); font-weight: 600; }
.nav-links a { position: relative; padding: 0.35rem 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-dark)); transform: scaleX(0); transition: transform var(--ease);
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,0.9); color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}

@media (max-width: 768px) {
  .nav { grid-template-columns: auto auto auto; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.active {
    display: flex; flex-direction: column; position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(18px); border-radius: var(--radius-md);
    padding: 1rem; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.8);
  }
  .nav-links.active a { padding: 0.75rem 0; }
}

/* ── Article Layout ── */
.article-page { padding-top: 2rem; padding-bottom: 6rem; }
.article-header { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.article-header .eyebrow {
  display: inline-block; padding: 0.4rem 0;
  color: var(--text-soft); font-size: 0.9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.article-header h1 {
  margin: 1.2rem 0 1rem; font-size: clamp(2.4rem,5vw,3.8rem); line-height: 1.05;
  letter-spacing: -0.04em; font-weight: 800;
}
.article-header p {
  margin: 0; color: var(--text-muted); font-size: 1.15rem; line-height: 1.75;
}
.article-meta {
  display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.5rem;
  color: var(--text-soft); font-size: 0.88rem;
}
.article-meta span { display: flex; align-items: center; gap: 0.4rem; }

/* ── Article Content ── */
.article-content { max-width: 720px; margin: 0 auto; }
.article-content h2 {
  margin: 2.5rem 0 1rem; font-size: clamp(1.6rem,3vw,2.2rem); line-height: 1.2;
  letter-spacing: -0.03em; font-weight: 800;
}
.article-content h3 {
  margin: 2rem 0 0.75rem; font-size: clamp(1.2rem,2.5vw,1.5rem); line-height: 1.3;
  letter-spacing: -0.02em; font-weight: 700;
}
.article-content p { margin: 0 0 1.25rem; line-height: 1.85; color: var(--text-muted); }
.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.5rem; color: var(--text-muted); line-height: 1.85;
}
.article-content li { margin-bottom: 0.5rem; }
.article-content strong { color: var(--text); font-weight: 700; }

/* ── Info Box ── */
.info-box {
  background: linear-gradient(135deg, rgba(33,150,243,0.04), rgba(0,150,136,0.04));
  padding: 1.5rem; border-radius: var(--radius-md); margin: 1.5rem 0;
  border: 1px solid rgba(0,0,0,0.05);
}
.info-box h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.75rem; color: var(--text); }
.info-box p:last-child { margin-bottom: 0; }

/* ── Callout Boxes ── */
.callout {
  display: flex; gap: 1rem; padding: 1.25rem; border-radius: var(--radius-md); margin: 1.5rem 0;
  background: var(--surface); border: 1px solid rgba(0,0,0,0.06);
}
.callout-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.5; }
.callout-content { flex: 1; }
.callout-content p { margin: 0; font-size: 0.95rem; line-height: 1.65; }
.callout.tip { background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(16,185,129,0.02)); }
.callout.tip .callout-icon { color: #10b981; }
.callout.warning { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.02)); }
.callout.warning .callout-icon { color: #f59e0b; }
.callout.important { background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02)); }
.callout.important .callout-icon { color: #ef4444; }
.callout.note { background: linear-gradient(135deg, rgba(33,150,243,0.06), rgba(33,150,243,0.02)); }
.callout.note .callout-icon { color: var(--primary); }

/* ── Blockquote ── */
blockquote {
  margin: 2rem 0; padding: 2rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid rgba(0,0,0,0.05);
  font-size: 1.15rem; font-style: italic;
  color: var(--text-muted); line-height: 1.75; text-align: center;
  position: relative;
}
blockquote::before {
  content: """; position: absolute; top: -0.5rem; left: 50%; transform: translateX(-50%);
  font-size: 4rem; line-height: 1; color: var(--primary); opacity: 0.25; font-family: Georgia, serif;
}
blockquote p { margin: 0 0 0.75rem; }
blockquote cite { display: block; font-size: 0.85rem; font-style: normal; font-weight: 600; color: var(--text-soft); margin-top: 0.75rem; }

/* ── Numbered Steps ── */
.steps { counter-reset: step; list-style: none; margin: 1.5rem 0; padding: 0; }
.steps li {
  position: relative; padding: 1rem 1rem 1rem 3.5rem; margin-bottom: 0.75rem;
  background: var(--surface); border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.05);
  counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 0.85rem; font-weight: 700; display: grid; place-items: center;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.06); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--badge-bg); padding: 0.85rem 1rem; text-align: left; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--badge-text); }
td { padding: 0.85rem 1rem; border-top: 1px solid rgba(0,0,0,0.04); }
tr:hover td { background: rgba(33,150,243,0.02); }

/* ── Divider ── */
.divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, rgba(33,150,243,0.15), transparent); margin: 2.5rem 0; }

/* ── Two Column Text ── */
.two-col { columns: 2 300px; column-gap: 2.5rem; margin: 1.5rem 0; }
.two-col p { margin-bottom: 1rem; }

/* ── Icon Cards (row) ── */
.icon-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.icon-card { display: flex; gap: 1rem; padding: 1.25rem; background: var(--surface); border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.05); }
.icon-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.icon-card-content h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.icon-card-content p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ── FAQ Accordion ── */
.faq-list { margin: 1.5rem 0; }
.faq-item { border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.06); margin-bottom: 0.75rem; overflow: hidden; }
.faq-item summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; background: var(--surface); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer { padding: 0 1.25rem 1rem; color: var(--text-muted); line-height: 1.7; }

/* ── Value Cards (for lab values) ── */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 0; }
.value-card {
  padding: 1.25rem; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid rgba(0,0,0,0.06); box-shadow: var(--shadow);
}
.value-card.ok .val { color: #10b981; }
.value-card.warn .val { color: #f59e0b; }
.value-card.crit .val { color: #ef4444; }
.value-card h5 { font-size: 0.8rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.value-card .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: var(--text); }
.value-card .desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }

@media (max-width: 640px) {
  .value-grid { grid-template-columns: 1fr; }
}

/* ── App Banner (fixed aspect ratio, text scales with image) ── */
.app-banner {
  width: 100%; max-width: 720px; margin: 3rem auto; border-radius: var(--radius);
  overflow: hidden; position: relative;
  aspect-ratio: 16 / 7;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.banner-content {
  position: absolute; bottom: 0; left: 0;
  padding: 2rem 2.5rem;
  width: 55%;
  max-width: 400px;
}
.banner-eyebrow {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
  background: rgba(33,150,243,0.08); color: var(--text-soft); font-size: clamp(0.7rem, 0.9vw, 0.85rem); font-weight: 600;
  margin-bottom: 0.75rem; width: fit-content; letter-spacing: 0.02em;
}
.banner-headline {
  font-size: clamp(1.3rem, 3vw, 2.4rem); font-weight: 800; color: #1a1a2e; line-height: 1.2;
  letter-spacing: -0.04em; margin-bottom: 1rem;
  max-width: 100%; word-wrap: break-word;
}
.banner-headline span {
  background: linear-gradient(135deg, #1b7dde, #42a5f5 48%, #0f7d95 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.banner-text { display: none; }
.banner-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff; padding: clamp(0.6rem, 1vw, 0.9rem) clamp(1rem, 1.8vw, 1.5rem); border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(33,150,243,0.3);
  transition: transform var(--ease), box-shadow var(--ease);
  font-size: clamp(0.8rem, 1vw, 1rem); width: fit-content;
  margin-top: 1rem;
}
.banner-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(33,150,243,0.35); }
.banner-cta svg { width: clamp(14px, 1.5vw, 18px); height: auto; flex-shrink: 0; }

@media (max-width: 640px) {
  .app-banner {
    aspect-ratio: 4 / 3;
    background-position: right center;
  }
  .banner-content {
    width: 100%; height: 100%; bottom: 0; left: 0;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 5%;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 60%, rgba(255,255,255,0.98) 100%);
    text-align: center;
  }
  .banner-eyebrow { display: none; }
  .banner-headline { margin-bottom: 6%; font-size: clamp(1.4rem, 7vw, 2rem); color: #000; text-shadow: 0 0 20px rgba(255,255,255,0.9), 0 0 40px rgba(255,255,255,0.7); }
  .banner-cta { margin-top: 5%; font-size: 0.95rem; padding: 0.8rem 1.6rem; }
}

/* ── Related Articles ── */
.related-section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.related-card {
  padding: 1.5rem; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(33,150,243,0.1); }
.related-card h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.related-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.related-card a { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.related-card a:hover { text-decoration: underline; }

/* ── Footer ── */
.footer {
  margin-top: 5rem; padding: 3rem 0; text-align: center;
  border-top: 1px solid var(--line); color: var(--text-soft); font-size: 0.9rem;
}
.footer a { color: var(--primary); font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ── Befino Intro Section ── */
.befino-intro {
  margin-top: 5rem; padding: 6rem 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(66,165,245,0.15), transparent 35%),
    radial-gradient(circle at 85% 30%, rgba(33,150,243,0.1), transparent 30%),
    #fff;
}
.befino-intro-inner {
  max-width: 680px; margin: 0 auto; text-align: center;
}
.befino-intro .eyebrow {
  display: inline-block; padding: 0.4rem 0;
  color: var(--text-soft); font-size: 0.9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.befino-intro-headline {
  margin: 1rem 0 1.5rem; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05;
  letter-spacing: -0.04em; font-weight: 800; color: var(--text);
}
.befino-intro-headline span {
  background: linear-gradient(135deg, #1b7dde, #42a5f5 48%, #0f7d95 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.befino-intro-lead {
  font-size: 1.1rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1.5rem;
}
.befino-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.25rem;
  margin-bottom: 2rem; color: var(--text-soft); font-size: 0.9rem; font-weight: 600;
}
.befino-trust span {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: rgba(255,255,255,0.8); border: 1px solid rgba(33,150,243,0.08);
  box-shadow: var(--shadow);
}
.befino-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.95rem; }

@media (max-width: 640px) {
  .befino-intro { padding: 4rem 0; }
  .befino-trust { gap: 0.5rem 1rem; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-banner-inner { grid-template-columns: 1fr; }
  .banner-left { padding: 2rem 1.5rem; }
  .banner-left::after { display: none; }
  .banner-right { display: none; }
  .nav-links { display: none; }
}
