/* =========================================================
   پروتکل تشخیص دوگانه — استایل اصلی
   طراحی: تم پزشکی، راست‌چین، فارسی
   ========================================================= */

:root {
  --teal-900: #0b3d3d;
  --teal-700: #0e6a6a;
  --teal-600: #0f7c7c;
  --teal-50: #ecf6f6;
  --cyan-700: #0e7490;
  --emerald: #0d9488;
  --amber: #d97706;
  --rose: #be123c;
  --ink: #0f2a2a;
  --body: #1d2b2b;
  --muted: #5b7171;
  --line: #d8e6e6;
  --bg: #f4f8f8;
  --bg-alt: #eef4f4;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(11,61,61,.05), 0 8px 24px rgba(11,61,61,.07);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- NAV ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--teal-900); font-size: 1.05rem; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--teal-700); color: #fff; border-radius: 10px; font-size: 1.1rem; }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--body); font-size: .92rem; font-weight: 500; }
.nav-links a:hover { color: var(--teal-700); text-decoration: none; }
.nav-cta { background: var(--teal-700); color: #fff !important; padding: 7px 16px; border-radius: 999px; }
.nav-cta:hover { background: var(--teal-900); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(13,148,136,.18), transparent 60%),
              linear-gradient(160deg, #062e2e 0%, #0e6a6a 60%, #0d9488 120%);
  color: #eafaf8; padding: 84px 0 64px; text-align: center;
}
.eyebrow {
  display: inline-block; padding: 6px 16px; border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; font-size: .82rem; color: #bdf0ea; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 800; line-height: 1.3; letter-spacing: -.5px; }
.for-iran { color: #7fe3d6; }
.hero-sub { margin-top: 14px; font-size: 1.12rem; font-weight: 600; color: #d8f5f0; }
.hero-desc { margin-top: 8px; color: #b9e8e2; font-size: 1rem; }
.hero-cta { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700;
  font-size: .98rem; cursor: pointer; border: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: #fff; color: var(--teal-900); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.hero-stats { margin-top: 46px; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; max-width: 720px; margin-inline: auto; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 18px 10px; }
.stat-num { font-size: 1.9rem; font-weight: 800; color: #7fe3d6; }
.stat-label { font-size: .82rem; color: #cdeee9; }
@media (max-width: 600px) { .hero-stats { grid-template-columns: repeat(2,1fr); } }

/* ---------- SECTIONS ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-kicker { display: inline-block; color: var(--emerald); font-weight: 700; font-size: .85rem; letter-spacing: 1px; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); color: var(--teal-900); font-weight: 800; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: 1.02rem; }

.sub-block { margin-top: 52px; }
.sub-title { font-size: 1.3rem; color: var(--teal-900); margin-bottom: 22px; padding-right: 14px; border-right: 4px solid var(--emerald); }
.muted { color: var(--muted); font-weight: 500; font-size: .9rem; }

/* ---------- GRID ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cards-grid-4 { grid-template-columns: repeat(4,1fr); }
.cards-grid-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px) { .cards-grid, .cards-grid-3 { grid-template-columns: repeat(2,1fr); } .cards-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .cards-grid, .cards-grid-3, .cards-grid-4 { grid-template-columns: 1fr; } }

/* ---------- MODEL CARDS ---------- */
.model-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.model-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.model-head h3 { font-size: 1.08rem; color: var(--teal-900); }
.model-en { color: var(--muted); font-size: .85rem; font-weight: 500; }
.model-card p { font-size: .93rem; margin-bottom: 10px; color: var(--body); }
.mech, .use { font-size: .86rem; color: #41584f; background: var(--teal-50); padding: 10px 12px; border-radius: 10px; }
.use { background: #f0fdf9; }

.badge { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-strong { background: #dcfce7; color: #166534; }
.badge-good { background: #dbeafe; color: #1e40af; }
.badge-weak { background: #fef3c7; color: #92400e; }
.badge-emerging { background: #f3e8ff; color: #6b21a8; }

/* ---------- CHIPS ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--card); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; font-size: .88rem; color: var(--teal-900); font-weight: 500; }

/* ---------- FINDINGS ---------- */
.finding { background: var(--card); border-top: 3px solid var(--emerald); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.finding h4 { color: var(--teal-900); font-size: .98rem; margin-bottom: 8px; }
.finding p { font-size: .86rem; color: var(--muted); }

/* ---------- GUIDELINE CARDS ---------- */
.gl-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; }
.gl-year { font-size: .76rem; font-weight: 700; color: var(--emerald); background: #ecfdf5; padding: 4px 10px; border-radius: 999px; display: inline-block; margin-bottom: 12px; }
.gl-card h3 { color: var(--teal-900); font-size: 1.15rem; }
.gl-sub { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.gl-card ul { list-style: none; }
.gl-card ul li { font-size: .88rem; padding: 6px 0 6px 22px; position: relative; border-top: 1px dashed var(--line); color: var(--body); }
.gl-card ul li:first-child { border-top: none; }
.gl-card ul li::before { content: "✓"; position: absolute; right: 0; color: var(--emerald); font-weight: 700; }

/* ---------- PRINCIPLES ---------- */
.principle { background: var(--card); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.p-emoji { font-size: 2rem; margin-bottom: 8px; }
.principle h4 { color: var(--teal-900); font-size: 1rem; margin-bottom: 8px; }
.principle p { font-size: .86rem; color: var(--muted); }

/* ---------- MEDICATION ALGORITHM ---------- */
.algo { position: relative; }
.stage { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.stage-num { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--teal-700), var(--emerald)); color: #fff; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; }
.stage-body { flex: 1; }
.stage-body h3 { color: var(--teal-900); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stage-time { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--bg-alt); padding: 3px 10px; border-radius: 999px; }
.dual-protocol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.proto { border-radius: 12px; padding: 14px; }
.proto p { font-size: .88rem; margin-top: 6px; }
.urban { background: #eef5ff; border: 1px solid #d4e3ff; }
.rural { background: #fef6ec; border: 1px solid #fde6c8; }
.proto-tag { font-size: .8rem; font-weight: 700; display: block; }
.pass { font-size: .86rem; color: #41584f; background: var(--teal-50); padding: 8px 12px; border-radius: 8px; border-right: 3px solid var(--emerald); }
.warn { color: var(--rose); }
@media (max-width: 680px) { .dual-protocol { grid-template-columns: 1fr; } .stage { flex-direction: column; } }

.callout { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: var(--radius); padding: 22px; margin-top: 28px; }
.callout h4 { color: #92400e; margin-bottom: 12px; }
.callout ul { list-style: none; }
.callout ul li { font-size: .9rem; padding: 6px 22px 6px 0; position: relative; }
.callout ul li::before { content: "•"; position: absolute; right: 4px; color: var(--amber); font-weight: 700; }
.callout-care { background: linear-gradient(135deg, #fdf2f8, #fce7f3); border-color: #fbcfe8; }
.callout-care h4, .callout-care strong { color: #9d174d; }
.callout-iran { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #a7f3d0; }
.callout-iran h4 { color: #065f46; }
.callout p { font-size: .92rem; }

/* ---------- PSYCH INTERVENTIONS ---------- */
.psych { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-top: 3px solid var(--cyan-700); }
.psych h4 { color: var(--teal-900); font-size: 1rem; margin-bottom: 6px; }
.psych p { font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.meta { font-size: .76rem; color: var(--cyan-700); font-weight: 600; background: #ecfeff; padding: 4px 10px; border-radius: 999px; }

/* ---------- LEVELS ---------- */
.level-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.level-tab { background: var(--card); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--teal-900); }
.level-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.level-detail h3 { color: var(--teal-900); font-size: 1.25rem; }
.budget { margin: 10px 0 18px; font-size: 1rem; color: var(--amber); font-weight: 600; }
.blk { color: var(--teal-900); margin: 20px 0 12px; font-size: 1rem; }
.outcomes { display: flex; flex-wrap: wrap; gap: 10px; }
.outcome { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 8px 16px; border-radius: 10px; font-size: .88rem; color: #065f46; font-weight: 500; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
table th { background: var(--teal-700); color: #fff; padding: 12px; text-align: right; font-weight: 600; }
table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--body); }
table tr:nth-child(even) td { background: var(--bg-alt); }
.hidden-costs { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 6px; }
.hc { background: #fff1f2; border: 1px solid #fecdd3; border-radius: 12px; padding: 16px; text-align: center; }
.hc span { font-size: .82rem; color: #9f1239; display: block; margin-bottom: 6px; }
.hc strong { color: var(--rose); font-size: 1.2rem; }
@media (max-width: 680px) { .hidden-costs { grid-template-columns: 1fr; } }

.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.kpi-val { font-size: 2rem; font-weight: 800; color: var(--emerald); }
.kpi-label { font-size: .84rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 680px) { .kpi-row { grid-template-columns: repeat(2,1fr); } }

/* ---------- CAREGIVER ---------- */
.train, .integ { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.train { border-top: 3px solid var(--rose); }
.integ { border-top: 3px solid var(--cyan-700); }
.t-emoji, .i-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.train h4, .integ h4 { color: var(--teal-900); font-size: .98rem; margin-bottom: 8px; }
.train p, .integ p { font-size: .85rem; color: var(--muted); }
.tool-note { margin-top: 16px; background: var(--teal-50); padding: 12px 16px; border-radius: 10px; font-size: .88rem; color: #41584f; border-right: 3px solid var(--emerald); }

.hr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.hr-card h4 { color: var(--teal-900); font-size: .95rem; margin-bottom: 6px; }
.hr-card p { font-size: .84rem; color: var(--muted); margin-bottom: 10px; }

/* ---------- PATIENT SHEET ---------- */
.print-btn-row { text-align: center; margin-bottom: 24px; }
.sheet { background: #fff; border: 2px solid var(--teal-700); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.sheet-title { color: var(--teal-900); font-size: 1.4rem; padding-bottom: 14px; border-bottom: 2px dashed var(--line); margin-bottom: 18px; }
.sheet h4 { color: var(--teal-900); margin: 18px 0 10px; }
.sheet-text { font-size: .95rem; background: var(--bg-alt); padding: 14px 16px; border-radius: 10px; }
.qa { display: grid; gap: 12px; }
.q { display: flex; gap: 12px; background: var(--bg-alt); padding: 14px; border-radius: 10px; }
.qn { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-700); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.q p { font-size: .9rem; }
.refs-list { list-style: none; }
.refs-list li { font-size: .88rem; padding: 6px 18px 6px 0; position: relative; color: var(--body); }
.refs-list li::before { content: "•"; position: absolute; right: 2px; color: var(--emerald); }
.sheet-note { margin-top: 20px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 16px; }
.sheet-note p { font-size: .88rem; color: #41584f; }

/* ---------- DECISION TREE ---------- */
.decision-options { display: flex; gap: 14px; flex-wrap: wrap; }
.dec-opt { background: var(--card); border: 2px solid var(--line); padding: 14px 26px; border-radius: 12px; font-size: .95rem; font-weight: 600; color: var(--teal-900); cursor: pointer; transition: all .15s; }
.dec-opt:hover { border-color: var(--emerald); background: #ecfdf5; }
.tree { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.tree-node { background: var(--teal-700); color: #fff; padding: 12px 20px; border-radius: 12px; display: inline-block; font-weight: 600; margin: 8px 0; }
.tree-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.branch { background: var(--bg-alt); border-radius: 12px; padding: 16px; }
.branch-label { display: inline-block; font-weight: 700; color: var(--teal-900); margin-bottom: 10px; font-size: .9rem; }
.tree-result { display: inline-block; background: #ecfdf5; color: #065f46; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; border: 1px solid #a7f3d0; }
@media (max-width: 680px) { .tree-branches { grid-template-columns: 1fr; } }

/* ---------- TIMELINE ---------- */
.timeline { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.tl-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tl-col h3 { color: #fff; background: linear-gradient(135deg, var(--teal-700), var(--emerald)); padding: 8px 16px; border-radius: 10px; font-size: 1.05rem; margin-bottom: 18px; text-align: center; }
.tl-step { display: flex; gap: 12px; margin-bottom: 16px; }
.tl-n { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.tl-step h4 { color: var(--teal-900); font-size: .92rem; margin-bottom: 2px; }
.tl-step p { font-size: .82rem; color: var(--muted); }
@media (max-width: 880px) { .timeline { grid-template-columns: 1fr; } }

.budget-card { border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.b-low { background: #fef6ec; border-color: #fde6c8; }
.b-mid { background: #eef5ff; border-color: #d4e3ff; }
.b-high { background: #fffbeb; border-color: #fde68a; }
.b-tag { font-size: .82rem; font-weight: 700; display: block; margin-bottom: 10px; color: var(--teal-900); }
.budget-card h4 { color: var(--teal-900); margin-bottom: 8px; }
.budget-card p { font-size: .86rem; color: var(--muted); }

.contacts { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.contact { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.contact:hover { text-decoration: none; border-color: var(--emerald); transform: translateY(-2px); }
.c-num { font-size: 1.7rem; font-weight: 800; color: var(--emerald); }
.c-name { font-size: .9rem; font-weight: 600; color: var(--teal-900); line-height: 1.4; }
.c-name small { color: var(--muted); font-weight: 400; }
@media (max-width: 760px) { .contacts { grid-template-columns: repeat(2,1fr); } }

/* ---------- REFERENCES ---------- */
.ref-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.ref-group > h3 { color: var(--teal-900); font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--teal-50); }
.ref { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.ref:last-child { border-bottom: none; }
.ref-year, .ref-type { font-size: .74rem; font-weight: 700; color: var(--cyan-700); display: inline-block; margin-bottom: 6px; }
.ref h4 { color: var(--teal-900); font-size: .92rem; margin-bottom: 4px; line-height: 1.5; }
.ref p { font-size: .82rem; color: var(--muted); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--teal-900); color: #cdeee9; padding: 40px 0; text-align: center; }
.site-footer p { margin-bottom: 6px; }
.site-footer strong { color: #fff; font-size: 1.05rem; }
.footer-sub { font-size: .88rem; color: #9fd9d2; }
.footer-warn { margin-top: 14px; font-size: .82rem; color: #ffd9a8; max-width: 620px; margin-inline: auto; }

/* ---------- PRINT ---------- */
@media print {
  .site-nav, .hero, .print-btn-row, .site-footer, .section-head, .timeline,
  #etiology, #guidelines, #meds, #levels, #caregiver, #decision, #action, #references,
  .sub-block { display: none !important; }
  body { background: #fff; }
  #sheet.section, #sheet.section-alt { padding: 0; background: #fff; }
  .sheet { border-color: #000; box-shadow: none; }
}
