/* ==========================================================================
   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 erbt das Grundlayout der globalen frank.css */
.tab_freud {
  position: relative;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 0; /* Panels schließen nahtlos aneinander an */
}

/* ==========================================================================
   2. INTERAKTIVE PANEL-ARCHITEKTUR
   ========================================================================== */
.comic-panel {
  position: relative;
  width: 330px;
}

.panel-img {
  width: 330px;
  height: auto;
}

/* Unsichtbare Hotspots – umgerechnet aus den alten Image-Map-Koordinaten */
.interactive-area {
  position: absolute;
  cursor: help;
  z-index: 10;
  outline: none;
}

/* Exakte Umrechnung der alten Map-Koordinaten (coords="X1,Y1,X2,Y2") */
.area-2 { left: 182px; top: 1px;  width: 148px; height: 40px; }  /* coords="182,1,344,41" (auf 330px max begrenzt) */
.area-3 { left: 2px;   top: 12px; width: 68px;  height: 62px; }  /* coords="2,12,70,74" */

/* ==========================================================================
   3. SPRECHBLASEN & DESKTOP POSITIONIERUNG (Original-Koordinaten)
   ========================================================================== */
.speech-bubble {
  position: fixed; /* Nutzt feste Bildschirm-Koordinaten analog zum fbla-Prinzip */
  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 */
#jbla2 { left: 677px; top: 120px; width: 220px; height: 90px;  z-index: 100; }
#jbla3 { left: 380px; top: 260px; width: 120px; height: 100px; z-index: 101; }

/* Native Aktivierungs-Logik für Maus (Hover) & Tastatur-Fokus (Barrierefrei) */
.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 zentriert über dem aktiven Panel eingeblendet,
     damit sie auf Touchscreens nicht aus dem sichtbaren Bereich rücken. */
  .speech-bubble {
    position: absolute;
    left: 50% !important;
    top: -60px !important;
    transform: translateX(-50%);
    width: 75% !important;
    height: auto !important;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 6px;
    padding: 4px;
  }
}
