/* ========================================
   ABU Lernplattform – Allgemeine Styles
   ======================================== */

/* CSS Variables */
:root {
  --primary: #4361ee;
  --primary-light: #7b8ff7;
  --primary-dark: #2b45c1;
  --secondary: #3a0ca3;
  --accent: #f72585;
  --accent-light: #ff6fb0;
  --bg-light: #f8f9fe;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text-dark: #1a1a2e;
  --text-medium: #4a4a6a;
  --text-light: #7a7a9a;
  --border-light: #e8e8f0;
  --shadow-sm: 0 2px 8px rgba(67, 97, 238, 0.08);
  --shadow-md: 0 4px 20px rgba(67, 97, 238, 0.12);
  --shadow-lg: 0 8px 40px rgba(67, 97, 238, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #4361ee, #3a0ca3);
  --gradient-accent: linear-gradient(135deg, #f72585, #7209b7);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green: #06d6a0;
  --yellow: #ffd166;
  --orange: #f4845f;
  --red: #ef476f;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-medium);
}

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

a:hover {
  color: var(--primary-dark);
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-section {
  padding: 3rem 0;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 0.3rem;
  align-items: center;
}

.navbar-nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  background: var(--bg-light);
  color: var(--primary);
}

.navbar-nav .dropdown {
  position: relative;
}

.navbar-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 100;
}

.navbar-nav .dropdown:hover .dropdown-menu {
  display: block;
}

.navbar-nav .dropdown-menu a {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.3rem;
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 1rem;
  }

  .navbar-nav.open {
    display: flex;
  }

  .navbar-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .navbar-nav .dropdown:hover .dropdown-menu,
  .navbar-nav .dropdown .dropdown-menu {
    display: block;
  }
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  background: var(--gradient-hero);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(255,255,255,0.08) 0%, transparent 50%);
  animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, 2%); }
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.hero .badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Page hero (smaller) */
.page-hero {
  padding: 3rem 0 2.5rem;
}

.page-hero h1 {
  font-size: 2.2rem;
}

/* ========================================
   Cards
   ======================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: white;
}

.card-icon.blue { background: var(--gradient-primary); }
.card-icon.pink { background: var(--gradient-accent); }
.card-icon.green { background: linear-gradient(135deg, #06d6a0, #0ea5e9); }
.card-icon.orange { background: linear-gradient(135deg, #f4845f, #f72585); }

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.card-link:hover {
  gap: 0.6rem;
}

/* ========================================
   Content Cards / Info Boxes
   ======================================== */

.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.info-box.highlight {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.04), rgba(58, 12, 163, 0.02));
}

.info-box.warning {
  border-left: 4px solid var(--orange);
  background: linear-gradient(135deg, rgba(244, 132, 95, 0.06), rgba(255, 209, 102, 0.03));
}

.info-box.success {
  border-left: 4px solid var(--green);
  background: linear-gradient(135deg, rgba(6, 214, 160, 0.06), rgba(14, 165, 233, 0.03));
}

.info-box.tip {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.04), rgba(114, 9, 183, 0.02));
}

.info-box h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

/* ========================================
   Steps / Process
   ======================================== */

.steps {
  counter-reset: step;
  margin: 2rem 0;
}

.step {
  counter-increment: step;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: -2rem;
  width: 2px;
  background: var(--border-light);
}

.step-content {
  flex: 1;
  padding-top: 0.3rem;
}

.step-content h3 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

/* ========================================
   Tables
   ======================================== */

.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}

.styled-table thead {
  background: var(--gradient-primary);
  color: white;
}

.styled-table th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.styled-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  color: var(--text-medium);
}

.styled-table tbody tr:hover {
  background: rgba(67, 97, 238, 0.03);
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

/* ========================================
   Tabs
   ======================================== */

.tabs {
  margin: 2rem 0;
}

.tab-buttons {
  display: flex;
  gap: 0.3rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Accordion
   ======================================== */

.accordion {
  margin: 1.5rem 0;
}

.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--bg-card);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: background var(--transition);
  font-family: inherit;
  text-align: left;
}

.accordion-header:hover {
  background: var(--bg-light);
}

.accordion-header .icon {
  transition: transform var(--transition);
  font-size: 1.2rem;
  color: var(--primary);
}

.accordion-item.open .accordion-header .icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.open .accordion-body {
  max-height: 2000px;
}

.accordion-body-inner {
  padding: 0 1.5rem 1.5rem;
}

/* ========================================
   Quiz
   ======================================== */

.quiz {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.quiz h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quiz-question {
  margin-bottom: 1.5rem;
}

.quiz-question p {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-medium);
  transition: all var(--transition);
  font-family: inherit;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--primary-light);
  background: rgba(67, 97, 238, 0.05);
}

.quiz-option.correct {
  border-color: var(--green);
  background: rgba(6, 214, 160, 0.1);
  color: #047857;
}

.quiz-option.wrong {
  border-color: var(--red);
  background: rgba(239, 71, 111, 0.1);
  color: #be123c;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.quiz-feedback.show {
  display: block;
}

.quiz-feedback.correct {
  background: rgba(6, 214, 160, 0.1);
  color: #047857;
}

.quiz-feedback.wrong {
  background: rgba(239, 71, 111, 0.1);
  color: #be123c;
}

/* ========================================
   Charts
   ======================================== */

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}

.chart-container canvas {
  max-height: 400px;
}

.chart-container h4 {
  margin-bottom: 1rem;
  text-align: center;
}

/* ========================================
   Learning Objectives
   ======================================== */

.learning-objectives {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.06), rgba(58, 12, 163, 0.03));
  border: 1px solid rgba(67, 97, 238, 0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.learning-objectives h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.learning-objectives ul {
  list-style: none;
  padding: 0;
}

.learning-objectives li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
  color: var(--text-medium);
}

.learning-objectives li::before {
  content: '🎯';
  position: absolute;
  left: 0;
}

/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
}

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

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

.breadcrumb span {
  color: var(--text-light);
  margin: 0 0.3rem;
}

.breadcrumb .current {
  color: var(--text-dark);
  font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
}

.footer a {
  color: var(--primary-light);
}

/* ========================================
   Navigation Buttons
   ======================================== */

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  gap: 1rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-medium);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-btn.primary {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.nav-btn.primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: white;
}

/* ========================================
   Tags / Badges inline
   ======================================== */

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag.blue { background: rgba(67, 97, 238, 0.1); color: var(--primary); }
.tag.pink { background: rgba(247, 37, 133, 0.1); color: var(--accent); }
.tag.green { background: rgba(6, 214, 160, 0.1); color: #047857; }
.tag.orange { background: rgba(244, 132, 95, 0.1); color: #c2410c; }

/* ========================================
   Example boxes
   ======================================== */

.example-box {
  background: rgba(67, 97, 238, 0.03);
  border: 1px dashed var(--primary-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1rem 0;
}

.example-box h4 {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.example-box p, .example-box li {
  font-size: 0.95rem;
}

/* ========================================
   Word List / Vocabulary
   ======================================== */

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.vocab-item {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-medium);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.vocab-item:hover {
  border-color: var(--primary-light);
  background: rgba(67, 97, 238, 0.05);
}

.vocab-item.strong {
  color: var(--primary-dark);
  font-weight: 700;
}

.vocab-item.weak {
  color: var(--text-light);
  font-style: italic;
}

/* ========================================
   Interactive Comparison Slider
   ======================================== */

.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .comparison-container {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Progress indicator
   ======================================== */

.progress-bar {
  background: var(--border-light);
  border-radius: 50px;
  height: 6px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  border-radius: 50px;
  background: var(--gradient-primary);
  transition: width 1s ease;
}

/* ========================================
   Risk Matrix
   ======================================== */

.risk-matrix {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  gap: 3px;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.risk-matrix .cell {
  padding: 0.8rem;
  text-align: center;
  border-radius: 4px;
  font-weight: 500;
}

.risk-matrix .header {
  background: var(--text-dark);
  color: white;
  font-weight: 700;
}

.risk-matrix .label {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.risk-matrix .low { background: rgba(6, 214, 160, 0.2); color: #047857; }
.risk-matrix .medium { background: rgba(255, 209, 102, 0.3); color: #92400e; }
.risk-matrix .high { background: rgba(244, 132, 95, 0.3); color: #c2410c; }
.risk-matrix .critical { background: rgba(239, 71, 111, 0.3); color: #be123c; }

/* ========================================
   Utility classes
   ======================================== */

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

ul.styled {
  padding-left: 1.5rem;
  margin: 0.8rem 0;
}

ul.styled li {
  padding: 0.3rem 0;
  color: var(--text-medium);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-buttons { flex-direction: column; }
  .step { gap: 1rem; }
  .risk-matrix { font-size: 0.75rem; }
  .risk-matrix .cell { padding: 0.5rem; }
}

/* ========================================
   Print
   ======================================== */

@media print {
  .navbar, .footer, .nav-buttons { display: none; }
  .hero { background: #eee !important; color: black !important; }
  .hero h1, .hero p { color: black !important; }
  body { background: white; }
}
