/* ============================================================
   ISMShield Wissen — Article Stylesheet
   Becker Project Consulting GmbH
   Brand: Navy #1B2A4A · Gold #C9A84C · Font: Almarai
   ============================================================ */

:root {
  --navy: #1B2A4A;
  --navy-dark: #0F1A30;
  --navy-light: #2A3B5C;
  --gold: #C9A84C;
  --gold-dark: #A8892F;
  --gold-light: #E5CB7A;
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-muted: #EFF1F5;
  --text: #1A1F2E;
  --text-soft: #4A5168;
  --text-muted: #6B7280;
  --border: #E2E5EC;
  --border-soft: #F0F2F6;
  --success: #2A8E5F;
  --warning: #C9A84C;
  --danger: #B33A3A;

  --font-body: 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Almarai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --content-width: 760px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(27, 42, 74, 0.06);
  --shadow-lg: 0 8px 32px rgba(27, 42, 74, 0.10);
}

/* ---------- Reset & Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }

/* ---------- Site Header ---------- */

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .logo img { height: 36px; }

.site-header nav { display: flex; gap: 28px; align-items: center; }

.site-header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  transition: color 0.2s;
}
.site-header nav a:hover,
.site-header nav a.active { color: var(--gold-light); }

.site-header .cta-button-small {
  background: var(--gold);
  color: var(--navy);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.site-header .cta-button-small:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* ---------- Article Layout ---------- */

.article-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 32px 80px;
}

.breadcrumbs {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.breadcrumbs a { color: var(--text-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs span { color: var(--text); }

.article-header {
  max-width: var(--content-width);
  margin: 0 auto 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.article-meta .reading-time::before { content: "⏱ "; }
.article-meta .date-modified::before { content: "🔄 "; }

/* ---------- Layout: TOC + Body ---------- */

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 260px minmax(0, var(--content-width)) 1fr;
    gap: 48px;
  }
}

/* ---------- TOC (Sticky Sidebar) ---------- */

.article-toc {
  font-size: 14px;
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .article-toc {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 16px;
  }
}

.toc-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-left: 2px solid var(--border);
}

.article-toc li { padding: 4px 0; }

.article-toc a {
  display: block;
  padding: 4px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-soft);
  text-decoration: none;
  transition: all 0.2s;
}
.article-toc a:hover {
  color: var(--navy);
  border-left-color: var(--gold);
}

.article-toc ul ul {
  margin-top: 4px;
  margin-bottom: 4px;
  border-left: none;
  padding-left: 12px;
  font-size: 13px;
}

.toc-cta {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.toc-cta-button {
  display: block;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
}
.toc-cta-button:hover { color: var(--gold-dark); }

/* ---------- Article Body ---------- */

.article-body {
  max-width: var(--content-width);
  font-size: 17px;
  line-height: 1.75;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  margin: 56px 0 16px;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin: 36px 0 12px;
  scroll-margin-top: 100px;
}

.article-body h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 8px;
}

.article-body p { margin: 0 0 18px; color: var(--text); }

.article-body ul, .article-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body ul li::marker { color: var(--gold); }
.article-body ol li::marker { color: var(--gold-dark); font-weight: 700; }

.article-body strong { color: var(--navy); font-weight: 700; }

.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  background: var(--bg-soft);
  font-style: italic;
  color: var(--text-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--navy-dark);
}

.article-body pre {
  background: var(--navy-dark);
  color: #E5E7EB;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}
.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---------- Tables ---------- */

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-body th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
}

.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: #fff;
}

.article-body tr:nth-child(even) td { background: var(--bg-soft); }

/* ---------- CTA Blocks ---------- */

.cta-block {
  margin: 40px 0;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-block.cta-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-top: 4px solid var(--gold);
}

.cta-block.cta-secondary {
  background: var(--bg-soft);
  border: 2px solid var(--border);
}

.cta-block .cta-button {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.cta-block .cta-button:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-block.cta-secondary .cta-button {
  background: var(--navy);
  color: #fff;
}
.cta-block.cta-secondary .cta-button:hover {
  background: var(--navy-light);
}

/* ---------- FAQ ---------- */

.article-body h2#faq + p,
.article-body h2[id*="faq"] ~ h3 {
  position: relative;
}

/* ---------- Author Box ---------- */

.author-box {
  max-width: var(--content-width);
  margin: 56px auto 0;
  padding: 24px;
  background: var(--bg-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}
.author-box strong { color: var(--navy); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #C0C7D6;
  padding: 48px 32px 32px;
  margin-top: 80px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  font-size: 14px;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.site-footer strong { color: #fff; display: block; margin-bottom: 4px; }
.site-footer a { color: var(--gold-light); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- Mobile Adjustments ---------- */

@media (max-width: 1023px) {
  .article-toc {
    background: var(--bg-soft);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 32px;
  }
  .article-toc ul { border-left-color: var(--gold); }
}

@media (max-width: 640px) {
  .site-header { padding: 12px 16px; }
  .site-header nav { gap: 16px; }
  .site-header nav a:not(.cta-button-small) { display: none; }
  .article-wrapper { padding: 16px 16px 60px; }
  .article-body h2 { font-size: 24px; margin-top: 40px; }
  .article-body h3 { font-size: 19px; }
  .cta-block { padding: 24px 20px; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer, .article-toc, .cta-block { display: none; }
  .article-body { max-width: 100%; }
}
