/* 10-project-modal.css — Projekt-Modal: Header, 2-Spalten-Layout, Galerie, Persona
   Teil von css/living-canvas (aufgeteilt). Ladereihenfolge = Dateiname.
   Siehe docs/components/ fuer die Zuordnung Sektion -> Datei. */
/* Portfolio Modal System */
.portfolio-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-spring);
}
.portfolio-modal.active {
  opacity: 1;
  pointer-events: all;
}
.modal-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(16, 43, 60, 0.8);
  backdrop-filter: blur(10px);
}
.modal-dialog {
  position: relative;
  width: 96%;
  width: 96%;
  max-width: 1160px;
  max-height: 94dvh;
  background: var(--paper);
  border-radius: 28px;
  overflow: hidden;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s var(--ease-spring);
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(16,43,60,0.2);
}
.portfolio-modal.active .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(247,251,248,0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(185,216,214,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey);
  transition: all 0.3s var(--ease-spring);
}
.modal-nav-btn:hover {
  background: var(--mist);
  color: var(--teal-d);
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1.5px var(--teal);
  transform: scale(1.08);
}
.modal-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--grey);
  min-width: 44px;
  text-align: center;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(247,251,248,0.85);
  border: 1.5px solid rgba(185,216,214,0.6);
  color: var(--grey);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.modal-body {
  overflow: hidden;
  flex: 1;
  padding: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Text-Modal (Impressum/Datenschutz, #textModal/#textModalBody) — eigenes
   Scroll-Verhalten: die Rechtstexte sind lang und muessen im begrenzten
   Modal-Bereich scrollbar sein, sonst wird Inhalt kommentarlos abgeschnitten
   (Stand 25.09.2026, Barrierefreiheits-/Mobile-Audit). */
#textModalBody {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}
@media (max-width: 600px) {
  /* Ueberschreibt das inline padding:40px auf .modal-dialog (index.html/
     projekt.html), das sonst auf kleinen Screens zu wenig Platz fuer Text
     laesst. !important noetig, da Inline-Styles sonst jede externe Regel
     schlagen. */
  #textModal .modal-dialog {
    padding: 20px !important;
  }
}

/* Module Tabs */
.module-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.module-tab {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--sand);
  color: var(--grey);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.module-tab:hover {
  background: var(--mist);
  color: var(--teal-d);
}
.module-tab.active {
  background: var(--teal-soft);
  color: var(--teal-d);
  border-color: rgba(185,216,214, 0.4);
}

/* 2-Column Modal Layout */
.modal-three-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  flex: 1;
  min-height: 0;
}
.modal-gallery-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.modal-gallery-col::after {
  content: "";
  display: block;
  height: 28px;
  flex-shrink: 0;
}
/* Die Hoehe hier ist nur der Startwert/Fallback. js/05-portfolio-modal.js
   passt sie an das Seitenverhaeltnis des sichtbaren Bildes an, sonst stehen
   Hochformate (Handy-Mockups, Spotify-Canvas 9:16) verloren in einer breiten
   Querformat-Box und fuellen nur ~35% der Flaeche. */
.modal-gallery-container {
  position: relative;
  background: var(--paper);
  height: 380px;
  flex-shrink: 0;
  overflow: hidden;
  transition: height var(--dur-normal) var(--ease-smooth);
}
.modal-gallery {
  display: flex;
  height: 100%;
  transition: transform 0.4s var(--ease-spring);
}
.modal-gallery img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* Wrapper einer einzelnen Galerie-Folie.
   Diese Regel fehlte komplett. Folge: bei Projekten mit nur EINEM Bild
   (Moewa, Whisky, Glentech) gibt es keinen .modal-gallery-Track, damit griff
   auch `.modal-gallery img` nicht — die Bilder wurden in Originalgroesse
   gerendert (z. B. 904x1280 in einer 597x365-Box) und der Rahmen zeigte nur
   noch einen Ausschnitt der linken oberen Ecke.
   Die Breite kommt weiter als Inline-Style aus dem JS (100% bzw. 100/n %). */
.gallery-slide {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
  transition: all 0.2s;
  z-index: 3;
}
.gallery-btn:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.g-prev { left: 12px; }
.g-next { right: 12px; }
.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.g-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.g-dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Gallery Col – text below */
.modal-meta-below {
  padding: 24px 28px 32px;
}
.modal-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  background: rgba(185, 216, 214, 0.25);
  color: var(--teal-d);
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.15;
}
.modal-role {
  font-size: 13px;
  color: var(--grey);
  margin: 0 0 14px;
}
.modal-desc {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0;
}
.modal-desc-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.process-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.process-step-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--teal-d);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.process-step-title::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.process-step-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.gallery-caption {
  display: none !important;
}
.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  background: rgba(185, 216, 214, 0.25);
  color: var(--teal-d);
}
.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.insight-item {
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
}
.insight-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.insight-good svg { stroke: var(--teal); }
.insight-challenge svg { stroke: var(--apricot); }
/* Insights Column */
.modal-insights-col {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 0;
  gap: 24px;
  overflow-y: auto;
  background: #fff;
}
.modal-insights-col::after {
  content: "";
  display: block;
  height: 28px;
  flex-shrink: 0;
}
.insight-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.insight-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.good-heading { color: var(--teal-d); }
.challenge-heading { color: var(--apricot-d); }
.chart-heading { color: var(--electric-d); }

.chart-container {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

/* Persona Card */
.persona-block {
  background: linear-gradient(135deg, rgba(104,87,232,0.06) 0%, rgba(104,87,232,0.02) 100%);
  border-color: rgba(104,87,232,0.2);
}
.persona-heading {
  color: var(--electric-d);
}
.persona-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.persona-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(104,87,232,0.1);
  border: 1.5px solid rgba(104,87,232,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.persona-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.persona-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-display);
}
.persona-age {
  font-size: 12px;
  color: var(--grey);
  margin-top: 2px;
}
.persona-quote {
  font-size: 13px;
  font-style: italic;
  color: var(--electric-d);
  border-left: 3px solid var(--electric);
  padding-left: 10px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.persona-bio {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.6;
  margin: 0;
}


@media (max-width: 900px) {
  .modal-three-col {
    grid-template-columns: 1fr;
  }
  .modal-gallery-container {
    height: 260px;
  }
  .modal-body {
    padding: 24px;
  }
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
  font-family: var(--font-display);
}
.tab:hover {
  border-color: var(--teal);
  color: var(--teal-d);
}
.tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

@media (max-width: 600px) {
  .portfolio-modal {
    padding: 0;
  }
  .modal-dialog {
    max-height: 100dvh;
    height: 100dvh;
    width: 100%;
    max-width: none;
    border-radius: 0;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-gallery-container {
    height: 200px;
  }
  /* Touch-Ziele im Modal-Header */
  .modal-close,
  .modal-nav-btn {
    width: 44px;
    height: 44px;
  }
}


