/* ═══════════════════════════════════════════════════════════════ */
/* 📦 COMPONENTS.CSS — Gemeinsame UI-Komponenten                  */
/* ═══════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ───────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', sans-serif;
  background: #f5f6fb;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ─────────────────────────────────────────────────── */
header {
  background: #8E0038;
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo-img {
  width: 32px;
  aspect-ratio: 1;
}

.logo-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

nav { display: flex; gap: 2rem; }

nav a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover, nav a.active { color: #ffffff; }

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  max-width: 1200px;
  margin: 0;
  padding: 1rem 2.5rem 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #2563eb; }

.breadcrumb span.sep { color: #d1d5db; }

.breadcrumb strong {
  color: #374151;
  font-weight: 500;
}

.breadcrumb-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Breadcrumb klickbarer Link — minimalistisch, erkennbar klickbar */
.breadcrumb-link {
  color: #6b7280;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.breadcrumb-link:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* Chevron-Icon neben klickbarem Link */
.breadcrumb-link .chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  transition: transform 0.2s;
  opacity: 0.5;
}

.breadcrumb-link:hover .chevron {
  opacity: 1;
}

.breadcrumb-link.open .chevron {
  transform: rotate(-135deg);
}

.breadcrumb-sep {
  margin: 0 0.3rem;
  color: #d1d5db;
}

/* ── BREADCRUMB CURRENT PAGE ────────────────────────────────── */
.breadcrumb-current {
  color: #8E0038;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ── BREADCRUMB DROPDOWN ────────────────────────────────────── */
.breadcrumb-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #d8dbee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30, 40, 90, 0.12);
  min-width: 180px;
  margin-top: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

.breadcrumb-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: block;
  padding: 0.65rem 1rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.15s;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}

/* ── CASCADE (Projekte mit Unterseiten) ─────────────────────── */
.dropdown-cascade {
  position: relative;
}

.cascade-parent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.cascade-parent::after {
  content: "›";
  margin-left: auto;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 400;
  transition: transform 0.2s;
}

.cascade-parent:hover::after {
  color: #2563eb;
}

.cascade-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f9fafb;
}

.cascade-submenu.open {
  max-height: 500px;
}

.cascade-submenu .dropdown-item {
  padding-left: 1.75rem;
  font-size: 0.82rem;
  border-bottom: 1px solid #f0f1f3;
}

.cascade-submenu .dropdown-item:last-child {
  border-bottom: none;
}

.cascade-submenu .dropdown-item:hover {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}

/* ── MAIN LAYOUT ────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid #e5e7eb;
  text-align: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
  background: #fff;
  flex-shrink: 0;
}

/* ── INFO BOX ───────────────────────────────────────────────── */
.info-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #dde1f3;
  background: #f3f4f6;
  color: #2563eb;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.info-toggle:hover {
  background: #eff6ff;
  border-color: #2563eb;
  transform: scale(1.1);
}

.info-toggle.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.info-box {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0;
  margin-top: 0;
  color: #1e40af;
  font-size: 0.85rem;
  line-height: 1.6;
}

.info-box.open {
  max-height: none;
  opacity: 1;
  padding: 0.3rem 0.3rem;
  margin-top: 0.3rem;
}

.info-box p {
  margin: 0.5rem 0;
}

.info-box p:first-child {
  margin-top: 0;
  font-weight: 600;
  color: #1e3a8a;
}

.info-box ul {
  margin: 0.75rem 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.info-box li {
  margin: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.info-box li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list-item {
  margin: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: #1e40af;
  line-height: 1.6;
}

.info-list-item[data-level="0"]:before {
  content: "●";
  position: absolute;
  left: 0.25rem;
  color: #1e3a8a;
  font-weight: bold;
  font-size: 0.7rem;
}

.info-list-item[data-level="1"]:before {
  content: "●";
  position: absolute;
  left: 0.5rem;
  color: #2563eb;
  font-size: 0.6rem;
}

.info-list-item[data-level="2"]:before {
  content: "●";
  position: absolute;
  left: 0.75rem;
  color: #3b82f6;
  font-size: 0.5rem;
}

.info-list-item[data-level="3"]:before {
  content: "◦";
  position: absolute;
  left: 0.75rem;
  color: #60a5fa;
  font-size: 0.5rem;
}

.info-list-item a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px dotted #2563eb;
  transition: all 0.2s;
  font-size: 0.85rem;
  word-break: break-all;
}

.info-list-item a:hover {
  color: #1d4ed8;
  border-bottom-style: solid;
}

.info-section {
  margin: 0.75rem 0;
  border-left: 3px solid #2563eb;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}

.info-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #e0e7ff;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.info-section-header:hover {
  background: #c7d2fe;
}

.info-section-header strong {
  color: #1e3a8a;
  font-size: 0.9rem;
}

.info-toggle-icon {
  display: inline-block;
  width: 16px;
  transition: transform 0.3s ease;
  color: #2563eb;
  font-weight: bold;
}

.info-section-content {
  max-height: 1000px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  padding: 1rem;
}

.info-section-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 1rem;
  overflow: hidden;
}

.info-section-header[data-collapsed="true"] .info-toggle-icon {
  transform: rotate(-90deg);
}

/* ── PROJECT HEADER ─────────────────────────────────────────── */
.project-header {
  margin-bottom: 0rem;
  padding-bottom: 0.2rem;
  border-bottom: 0px solid #e5e7eb;
}

.project-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0rem;
}

.project-header h1 {
  font-size: clamp(1.0rem, 2.0vw, 1.5rem);
  font-weight: 700;
  color: #122B54;
  letter-spacing: 0.01em;
  margin-bottom: 0rem;
}

.project-header h1 span { color: #2563eb; }

.project-header p {
  font-size: 0.88rem;
  color: #6b7280;
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-blue  { background: #eff6ff; color: #2563eb; }
.badge-gray  { background: #f3f4f6; color: #374151; }
.badge-green { background: #f0fdf4; color: #16a34a; }

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

/* ── FEEDBACK / COMMENT SYSTEM ──────────────────────────────── */
.feedback-sub-box {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 3px;
  background: #fff;
  margin-bottom: 5px;
}

.feedback-sub-box:last-child {
  margin-bottom: 0;
}

.feedback-sub-box h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.form-row {
  display: flex;
  gap: 3px;
  margin-bottom: 3px;
}

.form-row input {
  flex: 1;
  min-width: 0;
}

.feedback-form input,
.feedback-form textarea {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: #1a73e8;
}

.textarea-wrapper {
  position: relative;
}

.feedback-form textarea {
  min-height: 80px;
  resize: vertical;
  padding-right: 80px;
}

.btn-inside {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 5px 5px;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-inside:hover {
  background: #1557b0;
}

.feedback-comments {
  max-height: 400px;
  overflow-y: auto;
}

.feedback-comment {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.feedback-comment:last-child {
  border-bottom: none;
}

.feedback-comment .header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.feedback-comment .author {
  font-weight: 600;
  color: #1a73e8;
}

.feedback-comment .company {
  color: #8E0038;
  font-weight: 600;
}

.feedback-comment .company::before {
  content: "· ";
}

.feedback-comment .text {
  color: #333;
  line-height: 1.5;
  margin-bottom: 4px;
}

.feedback-comment .date {
  color: #aaa;
  font-size: 11px;
}

@media (max-width: 400px) {
  .form-row {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* 📱 RESPONSIVE (shared)                                        */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {
  header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 0.78rem;
  }

  .breadcrumb {
    padding: 0.75rem 1rem 0;
    font-size: 0.72rem;
    flex-wrap: wrap;
  }

  main {
    padding: 0.25rem 0.75rem 0.25rem;
  }

  .project-header h1 {
    font-size: 1.2rem;
  }

  .badge-row {
    gap: 0.4rem;
  }

  .info-toggle {
    width: 23px;
    height: 23px;
    font-size: 1rem;
  }

  .info-box {
    font-size: 0.8rem;
  }

  .info-box.open {
    max-height: none;
    padding: 0.75rem 0.9rem;
    margin-top: 0.75rem;
  }
}