/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  font-size: clamp(1.6vh, 2vh, 2.4vh);
}

/* Headlines */
h1 {
  text-align: center;
  margin: 1vh 0;
  font-size: clamp(2.5vh, 3vh, 3.5vh);
}
h2 {
  margin: 1vh 0 0.5vh;
  font-size: clamp(2vh, 2.5vh, 3vh);
}

/* Verstecken-Klasse */
.hidden {
  display: none !important;
}

/* Header */
.logo-container {
  text-align: center;
  padding: 5vh 0;         
  background-color: #1a1a1a;
}
.logo {
  max-width: 20%;
  object-fit: contain;
  display: inline-block;
}

/* Main Layout */
.main-container {
  flex: 1;
  display: flex;
  gap: 2vh;
  padding: 2vh;
  width: 100%;
  overflow: hidden;
  height: calc(100vh - 18vh); /* Höhe abzüglich Header */
}

/* Linke Box */
.left-box {
  flex: 1.5;
  background-color: #2a2a2a;
  padding: 2vh;
  border-radius: 2vh;
  font-size: clamp(1.7vh, 2.2vh, 2.7vh);
  line-height: 1.2;
  overflow-y: auto;           /* <<< hier hinzugefügt */
}
.left-box p {
  margin-bottom: 1.2em;
}
.left-box h1,
.left-box h3 {
  margin-top: 0.5em;          /* angepasst nach deiner Änderung */
  margin-bottom: 0.75em;
  line-height: 1.3;
  font-size: clamp(2.5vh, 3vh, 3.5vh);
}
.left-box a {
  color: #FFA500;
  text-decoration: underline;
}
.left-box a:hover {
  color: #ffb347;
}
.warn-text {
  color: #ff4c4c;
  font-weight: bold;
  font-size: clamp(2.7vh, 3vh, 3.4vh);
}
.warn-textp {
  color: #ff4c4c;
}

/* Rechte Box */
.right-box {
  flex: 2;
  position: relative;
  background-color: #2a2a2a;
  border-radius: 2vh;
  overflow: hidden;
}

/* Overlay Animation */
.transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; height: 100%;
  background-color: #C95228;
  z-index: 20;
  transform: translateX(-101%);
  transition: transform 0.6s ease;
}
.transition-overlay.active-in {
  transform: translateX(0);
}
.transition-overlay.active-out {
  transform: translateX(101%);
}

/* Übersicht als Grid */
.overview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; height: 100%;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(2, 1fr);
  gap: 2vh;
  padding: 2vh;
  background-color: #2a2a2a;
  overflow: hidden;
}

/* Inner Box Animation */
.inner-box {
  position: relative;
  padding: 1vh;
  border-radius: 1.5vh;
  background: linear-gradient(110deg, #E96730 10%, #FFA500 40%, #FFC107 70%, #af4a02 100%);
  background-size: 200% 200%;
  animation: flow 4s ease infinite;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.inner-box:hover {
  filter: none;
}

/* Inhalt der inneren Box */
.inner-content {
  position: absolute;
  top: 1vh;
  left: 1vh;
  right: 1vh;
  bottom: 1vh;
  background-color: #000000;
  border-radius: 1vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  user-select: none;
  cursor: pointer;
  transition: color 0.3s ease;
  font-size: clamp(1.8vh, 2.2vh, 2.5vh);
}
.inner-box:hover .inner-content {
  color: #E96730;
}

@keyframes flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Detail-View */
.detail-view {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2vh;
  background-color: #333333;
  overflow: hidden;
  z-index: 10;
  font-size: clamp(1.7vh, 2.2vh, 2.7vh);
}
.back-button {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5vh;
  background-color: #555555;
  color: #ffffff;
  border: none;
  padding: 1vh;               /* dein angepasstes Padding */
  min-width: 160px;
  border-radius: 1vh;
  cursor: pointer;
  margin-bottom: 2vh;         /* dein angepasstes Margin */
  transition: background-color 0.2s;
  z-index: 11;
}
.back-button:hover {
  background-color: #777777;
}
.back-arrow {
  max-width: 12.5%;
  object-fit: contain;
}

.detail-content {
  flex: 1;
  background-color: #2a2a2a;
  padding: 2vh;
  border-radius: 1.5vh;
  overflow-y: auto;           /* <<< hier ebenfalls hinzugefügt */
}
.detail-title {
  margin-bottom: 1vh;
  font-size: clamp(2.5vh, 3vh, 3.5vh);
}
.detail-image {
  width: 3em;
}

/* Responsive */
@media (max-width: 800px) {
  .main-container {
    flex-direction: column;
    padding: 1vh;
    height: auto;
  }
  .left-box, .right-box {
    width: 100%;
    margin-bottom: 2vh;
  }
  .overview {
    grid-template-rows: repeat(6, auto);
    grid-template-columns: 1fr;
    gap: 1.5vh;
  }
}

/* Moderner Scrollbar nur bei Bedarf */
.left-box::-webkit-scrollbar,
.detail-content::-webkit-scrollbar {
  width: 8px;
}

.left-box::-webkit-scrollbar-track,
.detail-content::-webkit-scrollbar-track {
  background: transparent;
}

.left-box::-webkit-scrollbar-thumb,
.detail-content::-webkit-scrollbar-thumb {
  background-color: #E96730;
  border-radius: 4px;
}

.left-box::-webkit-scrollbar-thumb:hover,
.detail-content::-webkit-scrollbar-thumb:hover {
  background-color: #FFB347;
}

/* Firefox-Unterstützung */
.left-box,
.detail-content {
  scrollbar-width: thin;
  scrollbar-color: #E96730 transparent;
}

.detail-image{
  width: 100%;
  margin-top: 1em;
}