/* flexiDok — Brand Theme (Navy + Teal) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand palette — abgeleitet aus Onepager & Präsentation */
  --fd-navy: #2c3e50;
  --fd-navy-tint: #415162;
  --fd-navy-shade: #273746;
  --fd-navy-deep: #1a2733;
  --fd-navy-darkest: #0f1820;
  --fd-teal: #18bc9c;
  --fd-teal-shade: #15a589;
  --fd-teal-light: #2fc3a6;
  --fd-steel: #5a8fa6;
  --fd-steel-deep: #34788f;

  /* Info (Links) — aus dem Design System (Peter River) */
  --fd-info: #3498db;
  --fd-info-shade: #2e86c1;
  --fd-info-tint: #48a2df;

  --fd-surface: #ecf0f1;
  --fd-card: #ffffff;
  --fd-border: #e1e6e9;
  --fd-text: #2c3e50;
  --fd-text-secondary: #7b8a8b;
}

/* Light scheme */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #2c3e50;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #15a589;
  --md-default-bg-color: #ecf0f1;
  --md-default-fg-color: #2c3e50;
  --md-default-fg-color--light: #7b8a8b;
  --md-typeset-a-color: #3498db;
  --md-code-bg-color: #ecf0f1;
  --md-code-fg-color: #2c3e50;
}

/* Dark scheme */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1a2733;
  --md-accent-fg-color: #18bc9c;
  --md-default-bg-color: #0f1820;
  --md-default-fg-color: #e2e8f0;
  --md-default-fg-color--light: #94a3b8;
  --md-typeset-a-color: #48a2df;
  --md-code-bg-color: #16242f;
  --md-code-fg-color: #e2e8f0;
  --md-footer-bg-color: #16242f;
}

h1, h2, h3, h4, h5, h6,
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600;
}

.md-typeset h1 {
  color: var(--fd-navy) !important;
  border-bottom: 2px solid var(--fd-border);
  padding-bottom: 0.4em;
}

/* Teal-Akzent vor h2 — dezenter Markenhinweis */
.md-typeset h2::before {
  content: "";
  display: inline-block;
  width: 0.28em;
  height: 0.85em;
  margin-right: 0.45em;
  vertical-align: -0.07em;
  background: var(--fd-teal);
  border-radius: 2px;
}

[data-md-color-scheme="slate"] .md-typeset h1 {
  color: #cbd5e1 !important;
  border-bottom-color: #1f3340;
}

.md-header {
  background: var(--fd-navy) !important;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

.md-tabs {
  background: var(--fd-navy-shade) !important;
}

.md-typeset a {
  color: var(--fd-info) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.md-typeset a:hover {
  color: var(--fd-info-shade) !important;
  text-decoration: underline;
}

[data-md-color-scheme="slate"] .md-typeset a {
  color: var(--fd-info-tint) !important;
}

.md-typeset code {
  background: #ecf0f1;
  color: #2c3e50;
  border: 1px solid #e1e6e9;
  border-radius: 4px;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background: #16242f;
  color: #7fe3d2;
  border-color: #1f3340;
}

.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  background: var(--fd-card) !important;
  border: 1px solid var(--fd-border) !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ol > li:hover {
  border-color: var(--fd-teal) !important;
  box-shadow: 0 4px 12px rgba(24, 188, 156, 0.12);
  transform: translateY(-2px);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li {
  background: #16242f !important;
  border-color: #1f3340 !important;
}

.md-typeset .admonition,
.md-typeset details {
  border-left: 4px solid var(--fd-teal);
  border-radius: 4px;
}

.md-typeset table:not([class]) th {
  background: #e6f6f1;
  color: #0f766e;
  font-weight: 600;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #143b36;
  color: #7fe3d2;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b4bcc2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7b8a8b; }

::selection { background: rgba(24, 188, 156, 0.20); }

/* ===== Hero Section ===== */
.fd-hero {
  position: relative;
  background:
    radial-gradient(1100px 620px at 88% 10%, rgba(24,188,156,.20), transparent 60%),
    radial-gradient(820px 520px at 6% 96%, rgba(90,143,166,.22), transparent 60%),
    linear-gradient(180deg, #1a2733 0%, #0f1820 100%);
  padding: 1rem 1.75rem 2.25rem;
  margin: 1rem 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15,23,42,0.18);
}

/* Feines Raster-Overlay — wie im Onepager-Hero, rein per CSS */
.fd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 82%);
  pointer-events: none;
}

/* ===== Hero Topbar ===== */
.fd-hero__topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.fd-hero__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.fd-hero__brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.fd-hero__brand-text {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.fd-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fd-hero__meta-link {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.fd-hero__meta-link:hover {
  color: #fff !important;
}

.fd-hero__version {
  background: rgba(24,188,156,0.14);
  border: 1px solid rgba(24,188,156,0.32);
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  color: #6fe3cd;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Hero Inner Content ===== */
.fd-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.5rem 0 0.25rem;
  text-align: center;
}

.fd-hero h1.fd-hero__title,
.fd-hero__title {
  color: #fff !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem !important;
  border: none !important;
  padding: 0 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-family: 'Inter', sans-serif !important;
}

/* h2-Akzent gilt nicht im Hero-Titel */
.fd-hero__title::before { content: none !important; }

.fd-hero__subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* Search trigger — full width, clicking opens MkDocs Material's built-in search */
.fd-hero__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 0.7rem 1.25rem;
  margin: 0 0 1.25rem;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.fd-hero__search:hover,
.fd-hero__search:focus {
  background: rgba(255,255,255,0.14);
  border-color: rgba(24,188,156,0.45);
  outline: none;
}

.fd-hero__search svg {
  width: 17px;
  height: 17px;
  fill: rgba(255,255,255,0.6);
  flex-shrink: 0;
}

.fd-hero__search-text {
  flex: 1;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fd-hero__search-kbd {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  padding: 0.05rem 0.45rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

/* Quick links — single row */
.fd-hero__links {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.fd-hero__links::-webkit-scrollbar { display: none; }

.fd-hero__link {
  background: transparent !important;
  border: none;
  color: rgba(255,255,255,0.75) !important;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.82rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.fd-hero__link:hover {
  background: rgba(24,188,156,0.18) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* ===== Feature Cards Grid ===== */
.fd-home-section {
  background: var(--md-default-bg-color);
  padding: 2.5rem 1rem;
  border-bottom: 1px solid var(--fd-border);
}

[data-md-color-scheme="slate"] .fd-home-section {
  border-bottom-color: #1f3340;
}

.fd-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1500px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .fd-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .fd-cards-grid { grid-template-columns: 1fr; }
}

.fd-cards-grid--3col { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .fd-cards-grid--3col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .fd-cards-grid--3col { grid-template-columns: 1fr; }
}

.fd-cards-grid--2col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 540px) {
  .fd-cards-grid--2col { grid-template-columns: 1fr; }
}

.fd-home-section__group {
  max-width: 1500px;
  margin: 0 auto;
}

.fd-home-section__group + .fd-home-section__group {
  margin-top: 2.5rem;
}

.fd-home-section__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--fd-navy);
  margin: 0 0 1rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Teal-Markenstrich vor den Sektionstiteln */
.fd-home-section__title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: var(--fd-teal);
  border-radius: 2px;
}

[data-md-color-scheme="slate"] .fd-home-section__title {
  color: #e2e8f0;
}

.fd-home-section__more {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.9rem;
  padding-right: 0.25rem;
}

.fd-home-section__more a {
  color: var(--fd-teal-shade) !important;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.fd-home-section__more a:hover {
  color: var(--fd-teal) !important;
  text-decoration: underline !important;
}

[data-md-color-scheme="slate"] .fd-home-section__more a {
  color: var(--fd-teal-light) !important;
}

[data-md-color-scheme="slate"] .fd-home-section__more a:hover {
  color: #6fe3cd !important;
}

.fd-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--fd-border);
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.2s ease;
}

.fd-card:hover {
  border-color: var(--fd-teal) !important;
  box-shadow: 0 4px 16px rgba(24,188,156,0.12);
  transform: translateY(-2px);
  text-decoration: none !important;
}

[data-md-color-scheme="slate"] .fd-card {
  background: #16242f;
  border-color: #1f3340;
}

[data-md-color-scheme="slate"] .fd-card:hover {
  border-color: var(--fd-teal) !important;
}

.fd-card__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fd-card__icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Icon-Gradienten — auf die Markenpalette abgestimmt */
.fd-icon--blue   { background: linear-gradient(135deg, #5a8fa6, #34788f); }
.fd-icon--green  { background: linear-gradient(135deg, #27ae60, #1e8449); }
.fd-icon--teal   { background: linear-gradient(135deg, #18bc9c, #15a589); }
.fd-icon--purple { background: linear-gradient(135deg, #6030ff, #542ae0); }
.fd-icon--orange { background: linear-gradient(135deg, #f39c12, #d68910); }
.fd-icon--indigo { background: linear-gradient(135deg, #4f6fa6, #34788f); }
.fd-icon--red    { background: linear-gradient(135deg, #e74c3c, #b93826); }
.fd-icon--gray   { background: linear-gradient(135deg, #7b8a8b, #415162); }

.fd-card__body {
  min-width: 0;
}

.fd-card__body strong {
  display: block;
  color: var(--fd-navy);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

[data-md-color-scheme="slate"] .fd-card__body strong {
  color: #e2e8f0;
}

.fd-card__body p {
  color: #7b8a8b;
  font-size: 0.82rem;
  margin: 0;
  line-height: 1.5;
}

[data-md-color-scheme="slate"] .fd-card__body p {
  color: #94a3b8;
}

/* ===== Get Started Section ===== */
.fd-home-content {
  max-width: 1500px;
  margin: 0 auto !important;
  padding: 2.5rem 1rem 3rem !important;
}

.fd-home-content h2 {
  font-size: 1.6rem !important;
  color: var(--fd-navy) !important;
  margin-bottom: 0.4rem !important;
  border: none !important;
  padding: 0 !important;
}

[data-md-color-scheme="slate"] .fd-home-content h2 {
  color: #e2e8f0 !important;
}

.fd-start-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 960px) {
  .fd-start-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .fd-start-grid { grid-template-columns: 1fr; }
}

.fd-start-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 540px) {
  .fd-start-grid--2col { grid-template-columns: 1fr; }
}

.fd-start-card {
  display: block;
  padding: 1.1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--fd-border);
  border-radius: 8px;
  border-left: 3px solid var(--fd-teal);
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.2s ease;
}

.fd-start-card:hover {
  border-color: var(--fd-teal) !important;
  box-shadow: 0 2px 10px rgba(24,188,156,0.10);
  text-decoration: none !important;
}

[data-md-color-scheme="slate"] .fd-start-card {
  background: #16242f;
  border-color: #1f3340;
  border-left-color: var(--fd-teal);
}

[data-md-color-scheme="slate"] .fd-start-card:hover {
  border-color: var(--fd-teal) !important;
}

.fd-start-card strong {
  display: block;
  color: var(--fd-navy);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

[data-md-color-scheme="slate"] .fd-start-card strong {
  color: #e2e8f0;
}

.fd-start-card span {
  color: #7b8a8b;
  font-size: 0.82rem;
  line-height: 1.5;
}

[data-md-color-scheme="slate"] .fd-start-card span {
  color: #94a3b8;
}
