/* =====================================================================
   News-Portal, öffentliches Stylesheet
   Astra: Design-Tokens stehen ganz oben (siehe ASTRA-CHECKPOINTS.md).
   RTL ist der Standard (Arabisch), alle Abstände nutzen logische Eigenschaften.
   ===================================================================== */

:root {
  /* Farben */
  --paper: #f9f6ee;
  --paper-2: #eef0e6;
  --surface: #ffffff;
  --ink: #12211a;
  --ink-2: #45524a;
  --ink-3: #82908a;
  --line: #dfe2d3;
  --accent: #14703f;
  --accent-2: #0d4e2c;
  --accent-soft: #e2f0e6;
  --gold: #c9a24a;
  /* Form */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 32px rgba(18, 33, 26, 0.10);
  --shadow-sm: 0 2px 8px rgba(18, 33, 26, 0.07);
  /* Schrift */
  --font-ar-display: "Noto Kufi Arabic", "Cairo", "Tahoma", sans-serif;
  --font-ar-body: "Noto Naskh Arabic", "Amiri", "Times New Roman", serif;
  --font-ar-ui: "IBM Plex Sans Arabic", "Noto Kufi Arabic", "Tahoma", sans-serif;
  --font-en-display: "Source Serif 4", Georgia, serif;
  --font-en-body: "Source Serif 4", Georgia, serif;
  --font-en-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 72ch;
}
html[lang="ar"] { --font-display: var(--font-ar-display); --font-body: var(--font-ar-body); --font-ui: var(--font-ar-ui); }
html[lang="en"] { --font-display: var(--font-en-display); --font-body: var(--font-en-body); --font-ui: var(--font-en-ui); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.container { width: min(100% - 2rem, 1200px); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }
[lang="en"] { font-family: var(--font-en-ui); }

/* ---------- Kopf ---------- */
.topbar { background: var(--ink); color: rgba(255,255,255,.85); font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 1rem; }
.topbar-actions { display: flex; align-items: center; gap: .9rem; }
.topbar-link { opacity: .85; }
.topbar-link:hover { opacity: 1; text-decoration: underline; }
.lang-switch { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .2rem .75rem; font-weight: 600; transition: background .2s; }
.lang-switch:hover { background: rgba(255,255,255,.12); }
.masthead { padding: 1.7rem 0 1.1rem; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 1rem; }
.brand-mark { width: 60px; height: 60px; border-radius: 16px; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.brand-logo { max-height: 72px; width: auto; }
.brand-text { text-align: start; }
.brand-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.01em; }
.brand-tagline { display: block; color: var(--ink-2); font-size: .95rem; margin-top: .2rem; }
.mainnav { position: sticky; top: 0; z-index: 30; background: rgba(249, 246, 238, .94); border-block: 1px solid var(--line); backdrop-filter: blur(10px); }
.mainnav-inner { display: flex; align-items: center; gap: 1rem; min-height: 56px; }
.nav-list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a { display: block; padding: .95rem .9rem; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; }
.nav-list a.active, .nav-list a:hover { border-color: var(--accent); color: var(--accent-2); }
.nav-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding-inline-start: .9rem; background: var(--surface); flex-shrink: 0; }
.nav-search input { border: 0; outline: 0; background: transparent; font: inherit; width: 170px; padding: .5rem 0; color: var(--ink); }
.nav-search button { border: 0; background: transparent; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); border-radius: 50%; }
.nav-search button:hover { color: var(--accent); }

/* ---------- Aufmacher ---------- */
.hero-section { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.6rem; margin-block: 1.6rem 2.6rem; }
.hero-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); color: #fff; min-height: 470px; display: grid; box-shadow: var(--shadow); }
.hero-media, .hero-body { grid-area: 1 / 1; }
.hero-media { display: block; }
.hero-media .cover-img, .hero-media .cover-placeholder { width: 100%; height: 100%; min-height: 470px; object-fit: cover; transition: transform .6s ease; }
.hero-card:hover .hero-media .cover-img { transform: scale(1.03); }
.hero-body { align-self: end; padding: 2.2rem; background: linear-gradient(to top, rgba(10, 12, 16, .94) 0%, rgba(10, 12, 16, .6) 55%, rgba(10, 12, 16, 0) 100%); position: relative; }
.hero-kicker { display: flex; align-items: center; gap: .7rem; }
.kicker-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; }
.hero-body .chip { background: rgba(255,255,255,.14); color: #fff; }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.25; margin: .6rem 0; }
.hero-excerpt { color: rgba(255,255,255,.85); max-width: 62ch; font-family: var(--font-body); font-size: 1.08rem; line-height: 1.7; margin: 0 0 1rem; }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-foot .post-meta { color: rgba(255,255,255,.7); }
.hero-cta { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: #fff; border-bottom: 2px solid var(--gold); padding-bottom: .1rem; }
html[dir="rtl"] .hero-cta svg, html[dir="rtl"] .footer-more::after { transform: scaleX(-1); }
.hero-side { display: grid; gap: 1rem; align-content: start; }

/* ---------- Karten ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; display: block; background: var(--paper-2); }
.card-media .cover-img, .card-media .cover-placeholder, .row-media .cover-img, .row-media .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.4; margin: 0; }
.card-title a:hover, .row-title a:hover, .mini-title a:hover { color: var(--accent-2); }
.card-excerpt { color: var(--ink-2); font-family: var(--font-body); font-size: 1rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.card-body .post-meta { margin-top: auto; padding-top: .4rem; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: .15rem .65rem; border-radius: 999px; line-height: 1.6; width: fit-content; }
.chip:hover { background: var(--accent); color: #fff; }
.post-meta { color: var(--ink-3); font-size: .85rem; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.row-card { display: grid; grid-template-columns: 128px 1fr; gap: .95rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.row-media { aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; display: block; background: var(--paper-2); }
.row-body { display: flex; flex-direction: column; gap: .3rem; }
.row-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.45; margin: 0; }
.mini-list { display: grid; }
.mini-card { display: flex; gap: .9rem; padding: .85rem 0; border-top: 1px solid var(--line); align-items: flex-start; }
.mini-card:first-child { border-top: 0; padding-top: .2rem; }
.mini-index { font-family: var(--font-en-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--accent); min-width: 1.4ch; opacity: .85; }
.mini-title { font-family: var(--font-display); font-weight: 700; font-size: .98rem; line-height: 1.45; margin: 0 0 .2rem; }
.cover-placeholder { --ph-hue: 10; background: linear-gradient(135deg, hsl(var(--ph-hue) 30% 20%), hsl(calc(var(--ph-hue) + 35) 40% 36%)); position: relative; display: grid; place-items: center; overflow: hidden; }
.cover-placeholder::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 6px, transparent 6px 18px); }
.cover-placeholder-mark { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 8vw, 5rem); color: rgba(255,255,255,.55); position: relative; }

/* ---------- Startseite ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 2.6rem; margin-bottom: 3rem; align-items: start; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; gap: 1rem; margin: 0 0 1.3rem; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.section-title span { border-inline-start: 4px solid var(--accent); padding-inline-start: .65rem; line-height: 1.2; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.4rem; }
.aside-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin: 0 0 .7rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent); width: fit-content; }
.section-list { list-style: none; margin: 0; padding: 0; }
.section-list a { display: flex; justify-content: space-between; padding: .6rem 0; border-top: 1px solid var(--line); font-weight: 600; }
.section-list li:first-child a { border-top: 0; }
.section-list a:hover { color: var(--accent-2); }
.count { color: var(--ink-3); font-weight: 500; font-family: var(--font-en-ui); }
.aside-about p { color: var(--ink-2); margin: 0 0 .6rem; }
.aside-more, .footer-more { font-weight: 700; color: var(--accent-2); }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--ink-2); }

/* ---------- Artikel ---------- */
.article-header { max-width: 840px; margin-inline: auto; padding-top: 2.2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.article-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.25; margin: .4rem 0; }
.article-lede { font-family: var(--font-body); font-size: 1.2rem; line-height: 1.75; color: var(--ink-2); margin: 0; max-width: 64ch; }
.article-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: center; color: var(--ink-3); font-size: .9rem; margin-top: .5rem; }
.article-author { font-weight: 600; color: var(--ink-2); }
.article-cover { max-width: 1020px; margin: 1.7rem auto; }
.article-cover .cover-img { border-radius: var(--radius-lg); width: 100%; max-height: 580px; object-fit: cover; box-shadow: var(--shadow); }
.article-cover figcaption { text-align: center; color: var(--ink-3); font-size: .85rem; margin-top: .6rem; }
.article-main { max-width: 760px; margin-inline: auto; padding-top: 1rem; }
.prose { font-family: var(--font-body); font-size: 1.2rem; line-height: 1.9; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.2em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); line-height: 1.35; margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.55rem; } .prose h3 { font-size: 1.3rem; } .prose h4 { font-size: 1.1rem; }
.prose img { border-radius: var(--radius); margin: 1.6rem auto; }
.prose figure { margin: 1.6rem 0; } .prose figure img { margin: 0; }
.prose figcaption { font-size: .85rem; color: var(--ink-3); text-align: center; margin-top: .5rem; font-family: var(--font-ui); }
.prose blockquote { border-inline-start: 4px solid var(--accent); padding: .3rem 1.2rem; margin: 1.6rem 0; color: var(--ink-2); font-size: 1.15em; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
html[dir="rtl"] .prose blockquote { border-radius: var(--radius) 0 0 var(--radius); }
.prose ul, .prose ol { padding-inline-start: 1.6rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); margin: 1.6rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; font-family: var(--font-ui); margin: 1.4rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: start; }
.prose-ar { font-family: var(--font-ar-body); }
.notice { background: var(--paper-2); border-inline-start: 4px solid var(--gold); padding: .8rem 1rem; border-radius: 8px; color: var(--ink-2); font-size: .95rem; }
.preview-banner { background: var(--gold); color: var(--ink); font-weight: 700; text-align: center; padding: .6rem; border-radius: 0 0 var(--radius) var(--radius); margin: 0; }
.share-bar { display: flex; gap: .55rem; align-items: center; padding: 1.2rem 0; border-block: 1px solid var(--line); margin-top: 2.2rem; flex-wrap: wrap; }
.share-label { font-weight: 700; margin-inline-end: .4rem; }
.share-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); cursor: pointer; transition: all .2s; padding: 0; }
.share-btn:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.share-btn.copied { color: #fff; background: var(--gold); border-color: var(--gold); }
.related { margin-block: 3rem 1rem; }

/* ---------- Listen und Seiten ---------- */
.list-header { padding-block: 2rem 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.list-kicker { width: 100%; color: var(--accent); font-weight: 700; margin: 0; letter-spacing: .04em; font-size: .85rem; text-transform: uppercase; }
.list-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.list-count { color: var(--ink-3); margin: 0; font-family: var(--font-en-ui); }
.list-page { margin-bottom: 3rem; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2.4rem; }
.page-btn { padding: .6rem 1.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; }
.page-btn:hover:not(.disabled) { border-color: var(--accent); color: var(--accent-2); }
.page-btn.disabled { opacity: .4; }
.page-info { color: var(--ink-3); font-family: var(--font-en-ui); }
.static-page { max-width: 780px; padding-block: 2rem 3rem; }
.static-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0 0 .4rem; }
.static-updated { color: var(--ink-3); font-size: .85rem; margin: 0 0 1.5rem; }
.not-found { text-align: center; padding-block: 4rem 5rem; }
.not-found-code { font-family: var(--font-en-display); font-size: 6rem; font-weight: 800; color: var(--accent); margin: 0; line-height: 1; opacity: .9; }
.not-found h1 { font-family: var(--font-display); margin: .5rem 0; }
.btn-primary { display: inline-block; background: var(--accent); color: #fff; padding: .75rem 1.5rem; border-radius: 999px; font-weight: 700; margin-top: 1rem; }
.btn-primary:hover { background: var(--accent-2); }

/* ---------- Fuß ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); margin-top: 3rem; padding-top: 3.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.25fr; gap: 2.2rem; padding-bottom: 2.6rem; }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--gold); margin: 0 0 .9rem; letter-spacing: .04em; }
.footer-brandline { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #fff; margin: 0 0 .5rem; }
.footer-about p { margin: 0 0 .8rem; line-height: 1.7; }
.footer-more { color: #fff; }
.footer-more::after { content: " ↗"; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact-list li { display: flex; gap: .55rem; align-items: center; }
.footer-contact-list svg { flex-shrink: 0; opacity: .7; }
.social-row { display: flex; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.social-row a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: background .2s; }
.social-row a:hover { background: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.2rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.55); }
.footer-admin { opacity: .55; }
.footer-admin:hover { opacity: 1; }

/* ---------- Responsiv ---------- */
@media (max-width: 960px) {
  .hero-section, .home-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .masthead { padding: 1rem 0 .6rem; }
  .brand-mark { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 12px; }
  .brand-logo { max-height: 52px; }
  .nav-search input { width: 96px; }
  .hero-card, .hero-media .cover-img, .hero-media .cover-placeholder { min-height: 380px; }
  .hero-body { padding: 1.3rem; }
  .prose { font-size: 1.1rem; }
  .row-card { grid-template-columns: 100px 1fr; }
  .topbar-date { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
