/* ==========================================================
   statistiken.css
   Custom Statistiken-Komponenten für domainion.at
   Alle Klassen tragen den Präfix "stk-" um Konflikte mit
   dem Theme (style.css, custom.css, responsive.css) zu
   vermeiden. Keine bestehende Klasse wird überschrieben.
   Schrift: Inter (bereits durch das Theme geladen)
   Akzentfarbe: #ff8100 (orange — Theme-Primärfarbe)
   ========================================================== */


/* ----------------------------------------------------------
   1. CSS-VARIABLEN
   ---------------------------------------------------------- */
:root {
  --stk-orange:        #ff8100;
  --stk-orange-dark:   #c86400;
  --stk-orange-light:  #fff3e0;
  --stk-orange-border: #ffd09a;
  --stk-text-dark:     #292929;
  --stk-text-mid:      #636c72;
  --stk-text-muted:    #9d9ea7;
  --stk-border:        #e4e4e4;
  --stk-bg-card:       #ffffff;
  --stk-bg-hover:      #fafafa;
  --stk-shadow-sm:     0 1px 4px rgba(0, 0, 0, 0.06);
  --stk-shadow-md:     0 4px 16px rgba(0, 0, 0, 0.08);
  --stk-radius:        8px;
}


/* ----------------------------------------------------------
   2. SCROLL-REVEAL ANIMATION
   ---------------------------------------------------------- */
.stk-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.stk-reveal.stk-visible {
  opacity: 1;
  transform: none;
}


/* ----------------------------------------------------------
   3. SEKTION-LABEL (kleiner orangefarbener Obertitel)
   ---------------------------------------------------------- */
.stk-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--stk-orange);
  margin-bottom: 8px;
}


/* ----------------------------------------------------------
   4. SECTION DESCRIPTION (Lead-Text unterhalb des Titels)
   ---------------------------------------------------------- */
.stk-desc {
  color: var(--stk-text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 2rem;
}


/* ----------------------------------------------------------
   5. STAT-GRID & STAT-CARDS
   ---------------------------------------------------------- */
.stk-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--stk-border);
  border: 1px solid var(--stk-border);
  border-radius: var(--stk-radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.stk-stat-card {
  background: var(--stk-bg-card);
  padding: 1.75rem 1.5rem;
  transition: background 0.18s ease;
}

.stk-stat-card:hover {
  background: var(--stk-bg-hover);
}

.stk-stat-num {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: var(--stk-text-dark);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stk-stat-num.stk-orange {
  color: var(--stk-orange);
}

.stk-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--stk-text-muted);
  margin-top: 8px;
}

.stk-stat-sub {
  display: block;
  font-size: 12px;
  color: #bbbec4;
  margin-top: 4px;
}


/* ----------------------------------------------------------
   6. HIGHLIGHT-CARD (grosse Zahl + Erklärungstext)
   ---------------------------------------------------------- */
.stk-highlight {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--stk-bg-card);
  border: 1px solid var(--stk-border);
  border-left: 4px solid var(--stk-orange);
  border-radius: var(--stk-radius);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--stk-shadow-sm);
}

.stk-highlight-big {
  font-family: 'Inter', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: var(--stk-orange);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}

.stk-highlight-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--stk-text-dark);
  margin-bottom: 0.4rem;
  margin-top: 0;
}

.stk-highlight-text p {
  font-size: 15px;
  color: var(--stk-text-mid);
  line-height: 1.7;
  margin: 0;
}


/* ----------------------------------------------------------
   7. ANIMIERTE BALKEN-DIAGRAMME
   ---------------------------------------------------------- */
.stk-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2rem;
}

.stk-bar-item {
  display: flex;
  align-items: center;
}

.stk-bar-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--stk-text-mid);
  text-align: right;
  min-width: 96px;
  flex-shrink: 0;
  padding-right: 12px;
  line-height: 1;
}

.stk-bar-lbl {
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  color: var(--stk-text-muted);
  text-align: right;
  flex-shrink: 0;
  padding-right: 12px;
  letter-spacing: 0.02em;
}

.stk-bar-track {
  flex: 1;
  height: 26px;
  background: #f0f1f3;
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.stk-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 1.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Füll-Varianten */
.stk-bar-fill.stk-primary {
  background: linear-gradient(90deg, var(--stk-orange-dark), var(--stk-orange));
}
.stk-bar-fill.stk-secondary {
  background: linear-gradient(90deg, #1560a0, #2980d4);
}
.stk-bar-fill.stk-tertiary {
  background: linear-gradient(90deg, #1a7a3a, #28a858);
}
.stk-bar-fill.stk-accent {
  background: linear-gradient(90deg, #6a1fa8, #9b3fd4);
}
.stk-bar-fill.stk-muted {
  background: #c8cad0;
}


/* ----------------------------------------------------------
   8. LLM-INFO-BOX (KI-Agenten Kontext)
   ---------------------------------------------------------- */
.stk-llm-box {
  background: var(--stk-orange-light);
  border: 1px solid var(--stk-orange-border);
  border-left: 4px solid var(--stk-orange);
  border-radius: 0 var(--stk-radius) var(--stk-radius) 0;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
  margin-bottom: 0;
}

.stk-llm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--stk-orange);
}

.stk-llm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stk-orange);
  flex-shrink: 0;
  animation: stk-pulse 2.2s infinite;
}

.stk-llm-qa {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stk-llm-qa + .stk-llm-qa {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--stk-orange-border);
}

.stk-llm-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.stk-llm-tag-q {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stk-orange);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 72px;
}

.stk-llm-tag-a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stk-text-muted);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 72px;
}

.stk-llm-q-text {
  font-size: 15px;
  color: var(--stk-text-mid);
  font-style: italic;
  line-height: 1.6;
}

.stk-llm-a-text {
  font-size: 15px;
  color: var(--stk-text-mid);
  line-height: 1.8;
}

.stk-llm-a-text strong {
  color: var(--stk-text-dark);
  font-weight: 600;
}


/* ----------------------------------------------------------
   9. VISUAL CARDS + PILLS
   ---------------------------------------------------------- */
.stk-visual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.stk-visual-card {
  background: var(--stk-bg-card);
  border: 1px solid var(--stk-border);
  border-radius: var(--stk-radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--stk-shadow-sm);
  transition: box-shadow 0.2s ease;
}

.stk-visual-card:hover {
  box-shadow: var(--stk-shadow-md);
}

.stk-visual-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--stk-orange);
}

.stk-visual-num {
  font-family: 'Inter', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--stk-text-dark);
  letter-spacing: -0.03em;
}

.stk-visual-desc {
  font-size: 14px;
  color: var(--stk-text-muted);
  line-height: 1.6;
}

/* Pills */
.stk-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0.4rem;
}

.stk-pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: #f0f1f3;
  border: 1px solid var(--stk-border);
  color: var(--stk-text-mid);
}

.stk-pill.stk-orange {
  background: var(--stk-orange-light);
  border-color: var(--stk-orange-border);
  color: var(--stk-orange-dark);
  font-weight: 600;
}


/* ----------------------------------------------------------
  10. CHART CARD (Chart.js Wrapper)
   ---------------------------------------------------------- */
.stk-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.stk-chart-card {
  background: var(--stk-bg-card);
  border: 1px solid var(--stk-border);
  border-radius: var(--stk-radius);
  padding: 1.75rem;
  box-shadow: var(--stk-shadow-sm);
}

.stk-chart-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stk-text-dark);
  margin: 0 0 1.25rem;
}

/* CMS-Fortschrittsbalken innerhalb einer Stat-Card */
.stk-cms-progress {
  height: 5px;
  background: #f0f1f3;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.stk-cms-bar {
  height: 100%;
  background: var(--stk-orange);
  border-radius: 3px;
  width: 0;
  transition: width 1.25s ease;
}

.stk-cms-pct {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: var(--stk-orange);
  font-weight: 600;
}

/* Chart Legend */
.stk-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
  font-size: 12px;
  color: var(--stk-text-muted);
}

.stk-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stk-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Rechte Spalte in chart-row: gestapelte Stat-Cards */
.stk-chart-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


/* ----------------------------------------------------------
  11. TRENNLINIE
   ---------------------------------------------------------- */
.stk-divider {
  height: 1px;
  background: var(--stk-border);
  margin: 0;
  border: none;
}


/* ----------------------------------------------------------
  12. KEYFRAMES
   ---------------------------------------------------------- */
@keyframes stk-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}


/* ----------------------------------------------------------
  13. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 767px) {
  .stk-visual-row {
    grid-template-columns: 1fr;
  }
  .stk-chart-row {
    grid-template-columns: 1fr;
  }
  .stk-stat-grid {
    grid-template-columns: 1fr;
  }
  .stk-highlight-big {
    font-size: 3rem;
  }
  .stk-stat-num {
    font-size: 2.8rem;
  }
  .stk-visual-num {
    font-size: 2.4rem;
  }
  .stk-bar-lbl {
    min-width: 56px;
    font-size: 11px;
  }
  .stk-bar-num {
    min-width: 76px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stk-llm-tag-q,
  .stk-llm-tag-a {
    display: none;
  }
  .stk-highlight {
    flex-direction: column;
    gap: 1rem;
  }
}
