/* ==========================================================================
   1. GLOBAL RESET & WRAPPER
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  border: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Der Haupt-Container zentriert die Panels auf der Seite */
.tab_freud {
  position: relative; /* Wichtig für die absolute Platzierung der Sprechblasen auf Desktop */
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 0; /* Die Panels liegen nahtlos untereinander wie im Original */
}

/* ==========================================================================
   2. INTERAKTIVE PANEL-ARCHITEKTUR
   ========================================================================== */
.comic-panel {
  position: relative;
  width: 330px;
}

.panel-img {
  width: 330px;
  height: auto;
}

/* Unsichtbare Hotspots – berechnet aus den alten Coords (coords="X1,Y1,X2,Y2") */
.interactive-area {
  position: absolute;
  cursor: help;
  z-index: 10;
  outline: none;
}

/* Exakte Umrechnung der alten Map-Koordinaten in moderne CSS-Flächen */
.area-1 { left: 141px; top: 3px; width: 187px; height: 54px; } /* coords="141,3,328,57" */
.area-2 { left: 137px; top: 0px; width: 191px; height: 77px; } /* coords="137,0,328,77" */
.area-3 { left: 162px; top: 1px; width: 168px; height: 38px; } /* coords="162,1,330,39" */

/* ==========================================================================
   3. SPRECHBLASEN & DESKTOP POSITIONIERUNG (Exakte Original-Koordinaten)
   ========================================================================== */
.speech-bubble {
  position: fixed; /* Nutzt feste Bildschirm-Koordinaten, da die originalen Werte weit außerhalb von .tab_freud lagen */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
  pointer-events: none;
}

/* Exakte Platzierungswerte aus Ihrem Original-Inline-Style */
#fbla1 { left: 687px; top: 5px;   width: 240px; height: 100px; z-index: 100; }
#fbla2 { left: 687px; top: 160px; width: 240px; height: 150px; z-index: 101; }
#fbla3 { left: 230px; top: 360px; width: 240px; height: 100px; z-index: 102; }

/* Native Aktivierungs-Logik für Maus (Hover) & Tastatur (Fokus) */
.interactive-area:hover .speech-bubble,
.interactive-area:focus-visible .speech-bubble {
  opacity: 1;
  visibility: visible;
}

/* Zurück-Pfeil Abstand */
.back-nav {
  margin-top: 15px;
  padding-left: 2px;
}

.back-link {
  display: inline-block;
  transition: transform 0.1s ease;
}

.back-link:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   4. RESPONSIVE OPTIMIERUNG FÜR MOBILGERÄTE (< 710px)
   ========================================================================== */
@media screen and (max-width: 710px) {
  .tab_freud {
    max-width: 100%;
    padding: 0 10px;
    align-items: center;
  }

  .comic-panel {
    max-width: 100%;
  }

  /* Mobil werden die Blasen flexibel direkt zentriert über dem Panel eingeblendet,
     da feste Pixel-Werte wie left: 687px sonst aus dem Bildschirm rutschen würden. */
  .speech-bubble {
    position: absolute;
    left: 50% !important;
    top: -60px !important;
    transform: translateX(-50%);
    width: 80% !important;
    height: auto !important;
    background: rgba(0,0,0,0.85);
    border-radius: 6px;
    padding: 4px;
  }
}
