/* ===== DiKAS Documentation Theme ===== */

:root {
  --dikas-green: #43A047;
  --dikas-green-dark: #2E7D32;
  --dikas-green-light: #E8F5E9;
  --dikas-text: #263238;
  --dikas-text-secondary: #455A64;
  --md-text-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --md-code-font: "JetBrains Mono", "Fira Code", monospace;
}

/* Primary color overrides */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #2E7D32;
  --md-primary-fg-color--light: #43A047;
  --md-primary-fg-color--dark: #1B5E20;
  --md-accent-fg-color: #FF8F00;
  --md-typeset-a-color: #2E7D32;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #43A047;
  --md-primary-fg-color--light: #66BB6A;
  --md-primary-fg-color--dark: #2E7D32;
  --md-accent-fg-color: #FFB300;
  --md-typeset-a-color: #66BB6A;
}

/* ===== Hero Section (Startseite) ===== */
.dikas-hero {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #43A047 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
}

.dikas-hero h1 {
  color: white !important;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.dikas-hero .hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dikas-hero .hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.dikas-hero .hero-badge {
  background: rgba(255,255,255,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.dikas-hero .hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dikas-hero .hero-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
}

.dikas-hero .hero-btn-primary {
  background: white;
  color: #2E7D32;
}

.dikas-hero .hero-btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}

.dikas-hero .hero-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
}

.dikas-hero .hero-btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--dikas-green);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.feature-card .feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  margin: 0 0 0.3rem !important;
  font-size: 1rem;
}

.feature-card p {
  margin: 0 !important;
  font-size: 0.85rem;
  color: #37474F;
}

[data-md-color-scheme="slate"] .feature-card p {
  color: rgba(255,255,255,0.7);
}

a.feature-card,
a.feature-card:hover,
.feature-card a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--md-code-bg-color);
  border-radius: 10px;
}

.stat-item {
  text-align: center;
  padding: 0.5rem 1.5rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dikas-green);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #37474F;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-md-color-scheme="slate"] .stat-label {
  color: rgba(255,255,255,0.7);
}

/* ===== Admonitions Styling ===== */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
}

/* ===== Better Tables ===== */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.md-typeset table:not([class]) th {
  background: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #37474F;
}

/* ===== Logo ===== */
.md-header__button.md-logo img {
  height: 28px;
  width: auto;
}

/* ===== Version Label ===== */
.md-header__topic .md-version-label {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== Header & Tabs Contrast ===== */
[data-md-color-scheme] .md-header {
  color: #fff !important;
}

[data-md-color-scheme] .md-header .md-header__topic .md-ellipsis,
[data-md-color-scheme] .md-header .md-ellipsis {
  color: #fff !important;
  opacity: 1 !important;
}

[data-md-color-scheme] .md-header--lifted .md-header__topic .md-ellipsis {
  color: #fff !important;
  opacity: 1 !important;
}

[data-md-color-scheme] .md-tabs {
  color: #fff !important;
}

[data-md-color-scheme] .md-tabs__link {
  color: rgba(255,255,255,0.9) !important;
  opacity: 1 !important;
}

[data-md-color-scheme] .md-tabs__link--active,
[data-md-color-scheme] .md-tabs__link:hover {
  color: #fff !important;
}

/* ===== Footer ===== */
.md-footer-meta {
  background: #1a1a2e;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .dikas-hero { padding: 2rem 1rem; }
  .dikas-hero h1 { font-size: 1.6rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; gap: 0.5rem; }
  .stat-item { padding: 0.25rem 1rem; }
}

/* ===== Accessible Links ===== */
.md-typeset a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.md-typeset a:hover {
  text-decoration-thickness: 2px;
}

.md-typeset .md-nav a,
.md-typeset .md-header a,
.md-typeset .md-footer a,
.md-typeset .md-tabs a,
.md-typeset .hero-btn,
.md-typeset .feature-card a {
  text-decoration: none;
}

/* ===== Scroll to top ===== */
.md-top {
  background: var(--md-primary-fg-color) !important;
}

/* ===== Print ===== */
@media print {
  .dikas-hero { background: #eee !important; color: #333 !important; }
  .dikas-hero h1 { color: #333 !important; }
}
