* {
  box-sizing: border-box;
}

@font-face {
  font-family: 'DIN1451E';
  font-style: normal;
  font-weight: normal;
  src: local('fonts/DIN1451StdEngschrift.woff'), url('fonts/DINEngschriftStd.woff') format('woff');
}
@font-face {
  font-family: 'DIN1451M';
  font-style: normal;
  font-weight: normal;
  src: local('fonts/DIN 1451 Std Mittelschrift'), url('fonts/DINMittelschriftStd.woff') format('woff');
}

.gif {
  width: 100%;       /* nimmt die volle Breite des Body ein */
  height: auto;      /* Höhe passt sich proportional an */
  
}

body {
  background: #ffffff;
  color: #111;
  padding: 1rem 2rem; /* Abstand zum Rand (links & rechts) */
  margin: 0 auto;
  max-width: 1200px;
}

/* Optional: zentrierter Container mit max-width für große Bildschirme */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  display: flex;
  align-items: flex-end;   /* jetzt unten bündig statt oben */
  gap: .5rem;
}

.header-titles {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* titel ebenfalls nach unten drücken */
}

/* Header-Bild (kein Stack, nur ein einzelnes Bild) */
.header-image-small {
  height: 3rem;
  width: auto;
  overflow: hidden;
  margin: 0;
}

.header-image-small img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
}



.image-stack-container.small {
  width: 6rem;
  aspect-ratio: 1/1;
  margin: 0;
  overflow: hidden;
  align-items: flex-start;
}

.image-stack-container.small .image-stack-loop {
  position: relative;
  inset: 0;
}

.image-stack-container.small .image-stack-loop .stack-item img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1, header h1, header h1r {
  text-align: left;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: "DIN1451E";
}

.h1r {
  color: red;
}


h2 {
  text-align: center;
  font-family: "DIN1451E";
  font-size: 25px;
  margin-bottom: 1rem;
}
h3 {
  text-align: left;
  font-size: 35px;
  font-family: "DIN1451E";
  font-style: italic;
  margin-bottom: 0;

}




.tab-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: .5rem;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

.tab {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #333;
  cursor: pointer;
  transition: opacity 0.3s ease;
  flex: 1;
  text-align: top;
  min-height: 100px;
  font-weight: bold;
  font-size: clamp(2rem, 1vw, 6rem);
  user-select: none;
}

.tab.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.tab.active {
  color: red;
}

.tab-content {
  display: none;
  background: transparent;
  padding: 1rem;
  margin-bottom: 1rem;
}

p {
  font-family: "DIN1451E";
  font-size: 20px;
}
.pred{color: red;}

.tab-content.active {
  display: block;
}

pu {
  font-family: "DIN1451E";
  font-size: 18px;
  opacity: 50%;
  margin-bottom: 1rem;
}

.responsive-img {
  width: 100%; 
  max-width: 100vw;   /* nimmt die volle Breite des Eltern-Containers (z. B. body) */
  height: auto;   /* Höhe proportional */
  display: block; /* entfernt kleine Lücken unter dem Bild */
}


/* IMAGE STACK — cross-browser */
.image-stack-container {
  width: 100%;
  max-width: 100vw;
  position: relative;
  aspect-ratio: 16/9;
  margin-bottom: 0.2rem;
  overflow: hidden;   /* verhindert, dass die transformierten Bilder den Text überdecken */
  isolation: isolate; /* eigener Stacking-Context */
}
/* Fallback für Safari-Versionen ohne stabiles aspect-ratio Verhalten */
@supports not (aspect-ratio: 1 / 1) {
  .image-stack-container {
    height: auto;
  }
  .image-stack-container::before {
    content: "";
    display: block;
    padding-top: 75%; /* 4/3 = 75% Höhe relativ zur Breite */
  }
}

/* Bildfläche */
.image-stack-loop {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: pointer;
  display: block;
}

/* ====== Wrapper um jedes Bild ====== */
.image-stack-loop .stack-item {
  position: absolute;
  inset: 0;
  transition: transform 0.2s ease, z-index 0s linear 0.4s;
  pointer-events: auto;
  cursor: pointer;
  /* overflow sichtbar lassen; der Container (image-stack-container) klippt bereits */
}

/* Bild selbst */
.image-stack-loop .stack-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nummer-Overlay pro Bild (oben rechts innerhalb der sichtbaren Bildfläche).
   top/left werden per JS präzise gesetzt. */
.image-stack-loop .stack-item .img-number {
  position: absolute;
  padding: 2px 6px;
  font-family: "DIN1451E", sans-serif;
  font-size: clamp(12px, 1.4vw, 16px);
  line-height: 1;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  pointer-events: none;          /* Klicks gehen weiterhin ans Bild */
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  /* kein eigener z-index -> teilt sich den z-index des Wrappers/Bildes */
}

/* Versatz (Stack-Effekt) – auf den Wrappern */
.image-stack-loop .stack-item:nth-child(1) { transform: translate(0px, 0px) rotate(0deg); }
.image-stack-loop .stack-item:nth-child(2) { transform: translate(8px, 12px) rotate(0deg); }
.image-stack-loop .stack-item:nth-child(3) { transform: translate(-8px, 16px) rotate(1deg); }
.image-stack-loop .stack-item:nth-child(4) { transform: translate(6px, 8px) rotate(-0.9deg); }




/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .tab {
    font-size: 1rem;
    min-height: 80px;
  }

  .image-stack-container {
    max-width: 100vw;
  }
  p {
    font-size: 15px; /* kleinere Schrift auf Handy */
  }
  pu {
    font-size: 12px;
  }
  h3 {
    font-size: 28px;
  }
}
