/* ===========================================================================
   DoseSave — Design System
   Medical Physics · Radiology · Nuclear Medicine · Radiation Safety
   =========================================================================== */

:root {
  /* Color system */
  --bg:           #0b1220;
  --bg-soft:      #0f1a2e;
  --surface:      #ffffff;
  --surface-2:    #f5f8fc;
  --surface-3:    #eaf1f9;
  --ink:          #0e1726;
  --ink-2:        #38465c;
  --ink-3:        #6b7a90;
  --line:         #dde6f1;

  /* Brand — deep medical teal/blue + radiation amber accent */
  --brand:        #0c7c9b;
  --brand-700:    #086179;
  --brand-900:    #073c4c;
  --brand-soft:   #e2f2f7;
  --accent:       #f6a623;   /* radiation amber */
  --accent-soft:  #fdf0d8;
  --danger:       #d64545;
  --ok:           #1f9d6b;

  --radius:       14px;
  --radius-sm:    9px;
  --shadow-sm:    0 1px 2px rgba(11,18,32,.06), 0 1px 3px rgba(11,18,32,.05);
  --shadow:       0 10px 30px -12px rgba(11,18,32,.18);
  --shadow-lg:    0 30px 60px -20px rgba(11,18,32,.30);

  --maxw:         1140px;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif:   "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.18; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }

/* ---------- Language toggle visibility ---------- */
html[data-lang="tr"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-tr { display: none !important; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 76px 0; }
.section--tight { padding: 48px 0; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 26px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.28rem;
  color: #123a63; letter-spacing: -.01em; font-family: var(--font-serif); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 46px; height: 32px; flex: 0 0 auto; }
.brand b { color: var(--brand); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-2); font-weight: 550; font-size: .96rem; padding: 8px 13px; border-radius: 8px;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--brand-700); }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-left: 8px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700;
  padding: 6px 13px; color: var(--ink-3);
}
.lang-switch button.on { background: var(--brand); color: #fff; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 78% -10%, rgba(12,124,155,.30), transparent 60%),
    radial-gradient(800px 460px at 10% 110%, rgba(246,166,35,.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: #eaf2fb;
}
.hero .container { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 100px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.5rem); max-width: 16ch; margin: 0 0 20px; }
.hero p { color: #b9c8dc; font-size: 1.18rem; max-width: 56ch; margin: 0 0 30px; }
.hero .eyebrow { color: var(--accent); }
.hero-rings { position: absolute; right: -120px; top: -80px; width: 620px; opacity: .5; z-index: 1; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 1rem;
  padding: 13px 24px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px -8px rgba(12,124,155,.7); }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { background: rgba(255,255,255,.06); color: #eaf2fb; border-color: rgba(255,255,255,.22); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-line { background: #fff; color: var(--brand-700); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-line:hover { border-color: var(--brand); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe0ee; }
.card .ico { width: 46px; height: 46px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-700);
  display: grid; place-items: center; margin-bottom: 16px; }
.card h3 { font-size: 1.16rem; margin: 0 0 8px; }
.card p { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* Article cards */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-card a { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card a:hover { text-decoration: none; }
.post-card .thumb { aspect-ratio: 16/9; width: 100%; }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; align-self: flex-start;
}
.tag.amber { color: #9a6510; background: var(--accent-soft); }
/* Category group colors (article index) */
.tag-doz      { color: #0c5a73; background: #d8eef4; }
.tag-goruntu  { color: #4b3a8c; background: #e7e2f6; }
.tag-artefakt { color: #8a4b1e; background: #f4e4d5; }
.tag-qc       { color: #1f6a4a; background: #d7efe2; }
.tag-temel    { color: #44566a; background: #e3e9f0; }
.tag-dms      { color: #8a3a5a; background: #f4dde6; }
/* Group subheading on the article index */
.grp-head { margin: 40px 0 18px; padding-left: 14px; border-left: 4px solid var(--brand); }
.grp-head h3 { font-size: 1.45rem; margin: 0 0 4px; letter-spacing: -.01em; }
.grp-head p { margin: 0; color: var(--ink-3); font-size: .95rem; }
.grp-head:first-of-type { margin-top: 8px; }
.grp-doz      { border-left-color: #0c7c9b; }
.grp-goruntu  { border-left-color: #6a54c8; }
.grp-artefakt { border-left-color: #c07a3e; }
.grp-qc       { border-left-color: #2f9a6a; }
.grp-temel    { border-left-color: #7a8aa0; }
.grp-dms      { border-left-color: #b85580; }
.post-card h3 { font-size: 1.22rem; margin: 0 0 10px; }
.post-card p { color: var(--ink-2); font-size: .96rem; margin: 0 0 16px; }
.post-meta { margin-top: auto; font-size: .85rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }

/* Stat row */
.stat { text-align: center; padding: 8px; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.stat .lbl { color: var(--ink-3); font-size: .92rem; margin-top: 2px; }

/* ---------- Section headings ---------- */
.sec-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 12px; }
.sec-head p { color: var(--ink-2); font-size: 1.08rem; margin: 0; }

/* ---------- Bands ---------- */
.band-soft { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark {
  background: radial-gradient(900px 400px at 80% 0%, rgba(12,124,155,.35), transparent 60%), var(--bg);
  color: #dce7f3;
}
.band-dark h2 { color: #fff; }
.band-dark p { color: #aebfd2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); color: #9fb0c6; padding: 56px 0 30px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #cfdcec; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #9fb0c6; font-size: .95rem; }
.site-footer a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; font-size: .85rem; flex-wrap: wrap; }

/* ===========================================================================
   Article (long-form) styling
   =========================================================================== */
.article-hero { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 54px 0 40px; }
.article-hero .container { max-width: 820px; }
.breadcrumb { font-size: .86rem; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-3); }
.article-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin: 12px 0 16px; }
.article-hero .lede { font-size: 1.18rem; color: var(--ink-2); margin: 0; }
.article-meta { margin-top: 22px; font-size: .9rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.article-wrap { max-width: 820px; margin: 0 auto; padding: 50px 22px 30px; }
.prose { font-size: 1.09rem; color: #1c2737; }
.prose h2 { font-size: 1.62rem; margin: 48px 0 16px; padding-top: 8px; }
.prose h3 { font-size: 1.24rem; margin: 32px 0 10px; color: var(--brand-900); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose figure { margin: 30px 0; }
.prose figcaption { font-size: .88rem; color: var(--ink-3); margin-top: 10px; text-align: center; }

.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface-2);
  border-radius: 10px; padding: 18px 22px; margin: 26px 0; font-size: 1rem;
}
.callout.amber { border-left-color: var(--accent); background: var(--accent-soft); }
.callout .ttl { font-weight: 700; margin-bottom: 6px; color: var(--brand-900); }
.callout.amber .ttl { color: #8a5a08; }
.callout.clinic { border-left-color: #2f9a6a; background: #eef7f1; }
.callout.clinic .ttl { color: #1f6a4a; display: flex; align-items: center; gap: 7px; }
.callout.clinic .ttl::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2f9a6a; display: inline-block; }

.keybox {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin: 26px 0; box-shadow: var(--shadow-sm);
}
.keybox .ttl { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 12px; }

.deftable, .prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--surface-3); color: var(--ink); font-weight: 700; font-size: .9rem; }
.prose tbody tr:hover { background: var(--surface-2); }

.formula {
  font-family: var(--font-serif); font-size: 1.25rem; text-align: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 24px 0; color: var(--brand-900);
}

/* References */
.references { margin: 46px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); }
.references h2 { font-size: 1.3rem; margin: 0 0 14px; }
.references ol { padding-left: 22px; font-size: .94rem; color: var(--ink-2); }
.references li { margin-bottom: 12px; }
.references a { word-break: break-word; }

.disclaimer { font-size: .86rem; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px; margin: 30px 0 0; }

.toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 0 0 34px; }
.toc .ttl { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--brand-700); text-decoration: none; }

/* page intro for simple pages */
.page-hero { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 60px 0 46px; }
.page-hero .container { max-width: 760px; }
.page-hero h1 { font-size: clamp(2rem,4vw,2.8rem); margin: 0 0 14px; }
.page-hero p { font-size: 1.12rem; color: var(--ink-2); margin: 0; }

/* ---------- Photographs / figures ---------- */
.ph { margin: 30px 0; }
.ph-frame {
  aspect-ratio: 16/10; width: 100%; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--g, linear-gradient(135deg,#0c7c9b,#073c4c));
  box-shadow: var(--shadow-sm); position: relative;
}
.ph-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph figcaption { font-size: .85rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.ph figcaption a { color: var(--brand-700); }
.ph figcaption .lic { color: var(--ink-3); }

/* hero photo in modality pages */
.mod-hero-photo .ph-frame { aspect-ratio: 21/9; }

/* Modality hub cards with image */
.mod-card { padding: 0; overflow: hidden; }
.mod-card a { display: flex; flex-direction: column; height: 100%; color: inherit; }
.mod-card a:hover { text-decoration: none; }
.mod-card .ph-frame { aspect-ratio: 16/9; border: 0; border-radius: 0; box-shadow: none; }
.mod-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.mod-card h3 { font-size: 1.16rem; margin: 0 0 8px; }
.mod-card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 14px; }
.mod-card .go { margin-top: auto; font-size: .85rem; font-weight: 650; color: var(--brand-700); }

/* spec grid inside modality articles */
.specs { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin: 26px 0; }
.spec { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.spec .k { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 5px; }
.spec .v { font-size: 1.02rem; color: var(--ink); font-weight: 600; }
.spec .v small { display: block; font-weight: 400; color: var(--ink-3); font-size: .85rem; margin-top: 3px; }

/* inline citation superscript */
sup.cite { font-size: .68em; line-height: 0; }
sup.cite a { color: var(--brand-700); text-decoration: none; font-weight: 700; }
sup.cite a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-toggle { display: block; }
  .lang-switch { margin-left: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .hero .container { padding-top: 64px; padding-bottom: 70px; }
}
