/* Iran-Chronik – Stylesheet */

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

:root {
  --accent: #1a7a4a;
  --accent-light: #e8f5ee;
  --accent-hover: #155f3a;
  --text: #222222;
  --text-muted: #555555;
  --border: #cccccc;
  --bg: #ffffff;
  --bg-secondary: #f8f8f8;
  --max-width: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Dark Mode ---- */

[data-theme="dark"] {
  --accent: #2ecc71;
  --accent-light: #0d2b1a;
  --accent-hover: #27ae60;
  --text: #e8e8e8;
  --text-muted: #999999;
  --border: #3a3a3a;
  --bg: #1a1a1a;
  --bg-secondary: #242424;
}

[data-theme="dark"] .notice.info {
  border-color: #1e3a5f;
  background: #0d1f35;
  color: #90caf9;
}

[data-theme="dark"] .notice.warning {
  border-color: #5c4700;
  background: #2a2000;
  color: #ffe082;
}

[data-theme="dark"] .search-bar input,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: #2a2a2a;
  border-color: #444;
  color: var(--text);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

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

.site-header {
  background: var(--accent);
  color: #fff;
  padding: 0 1rem;
}

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-title:hover {
  text-decoration: underline;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
}

.site-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---- Header-Controls (Dark Mode + Sprache) ---- */

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-icon {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 4px;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font);
  line-height: 1.4;
  transition: background 0.15s;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.25);
}

.lang-switcher {
  position: relative;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 130px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

.lang-menu.open {
  display: block;
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
}

.lang-menu button:hover {
  background: var(--bg-secondary);
}

.lang-menu button.active {
  font-weight: 700;
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ---- Typografie ---- */

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.9rem; margin-top: 0; }
h2 { font-size: 1.45rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---- Suche ---- */

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.search-bar input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font);
}

.search-bar input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.search-bar button {
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
}

.search-bar button:hover {
  background: var(--accent-hover);
}

#search-results {
  margin-top: 1rem;
}

.search-result-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
  border-bottom: none;
}

/* ---- Kategorien-Grid ---- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.category-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  background: var(--bg-secondary);
  transition: border-color 0.15s, background 0.15s;
}

.category-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.category-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--accent);
}

.category-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- Artikel-Liste ---- */

.artikel-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}

.artikel-liste li {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

.artikel-liste li:last-child {
  border-bottom: none;
}

.artikel-liste a {
  font-weight: 500;
}

.artikel-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* ---- Artikel-Seite ---- */

.artikel-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
}

.artikel-header .kategorie-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.infobox {
  float: right;
  width: 280px;
  margin: 0 0 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  background: var(--bg-secondary);
  overflow: hidden;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
}

.infobox td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.infobox td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  width: 40%;
}

.infobox tr:last-child td {
  border-bottom: none;
}

/* ---- Quellen / Fussnoten ---- */

.quellen {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1rem;
}

.quellen ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.quellen li {
  margin-bottom: 0.35rem;
}

/* ---- Erfahrungsberichte ---- */

.bericht-card {
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 6px 6px 0;
}

.bericht-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.bericht-card blockquote {
  margin: 0;
  font-style: italic;
  color: var(--text);
}

/* ---- Formular ---- */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 600;
}

.btn:hover {
  background: var(--accent-hover);
}

/* ---- Notices ---- */

.notice {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  background: var(--bg-secondary);
}

.notice.info {
  border-color: #90caf9;
  background: #e3f2fd;
}

.notice.warning {
  border-color: #ffe082;
  background: #fffde7;
}

/* ---- Breadcrumb ---- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 0.3rem;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }

  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  h1 { font-size: 1.5rem; }
}

/* ---- Gedenkseite-Karte ---- */

.category-card--memorial {
  border-color: #4a6fa5;
  background: #f0f4f9;
  grid-column: 1 / -1;
}

.category-card--memorial h3 {
  color: #2c4a6e;
}

.category-card--memorial:hover {
  border-color: #2c4a6e;
  background: #e4ecf5;
}

[data-theme="dark"] .category-card--memorial {
  border-color: #4a6fa5;
  background: #0e1a27;
}

[data-theme="dark"] .category-card--memorial h3 {
  color: #7aafd4;
}

[data-theme="dark"] .category-card--memorial:hover {
  background: #152233;
}

/* ---- RTL (Farsi) ---- */

[dir="rtl"] body {
  font-family: "Tahoma", "Arial", sans-serif;
}

[dir="rtl"] .site-header .inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .site-nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .header-controls {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .bericht-card {
  border-left: none;
  border-right: 3px solid var(--accent);
  border-radius: 6px 0 0 6px;
}

[dir="rtl"] .breadcrumb {
  direction: rtl;
}

[dir="rtl"] .infobox {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

[dir="rtl"] .artikel-meta {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .quellen ol {
  padding-left: 0;
  padding-right: 1.25rem;
}
