/* Titel Farb varianten */
.titel-pink {
  font-family: "Rammetto One", sans-serif;
  font-weight: bold;
  font-size: 4rem;
  color: var(--rosa);
  text-align: center;
  margin: 0;
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%, 45%);
  -moz-transform: translate(-50%, 45%);
  -ms-transform: translate(-50%, 45%);
  -o-transform: translate(-50%, 45%);
  transform: translate(-50%, 45%);
  bottom: 0;
  width: 100%;
  z-index: 2;
}

.titel-dunkelbraun {
  font-family: "Rammetto One", sans-serif;
  font-weight: bold;
  font-size: 4rem;
  color: var(--dunkelbraun);
  text-align: center;
  margin: 0;
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%, 45%);
  -moz-transform: translate(-50%, 45%);
  -ms-transform: translate(-50%, 45%);
  -o-transform: translate(-50%, 45%);
  transform: translate(-50%, 45%);
  bottom: 0;
  width: 100%;
  z-index: 2;
}

.titel-hellbraun {
  font-family: "Rammetto One", sans-serif;
  font-weight: bold;
  font-size: 4rem;
  color: var(--hellbraun);
  text-align: center;
  margin: 0;
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%, 45%);
  -moz-transform: translate(-50%, 45%);
  -ms-transform: translate(-50%, 45%);
  -o-transform: translate(-50%, 45%);
  transform: translate(-50%, 45%);
  bottom: 0;
  width: 100%;
  z-index: 2;
}

.header-balken-projekt {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 8px 8px 0 8px;
}
.bilder-oben-projekt {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  position: relative;
}
.hintergrund-projekt {
  height: 500px;
  width: auto;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1; /* Bilder nebeneinander */
  z-index: 1;
}
.bild-rechts-projekt {
  -webkit-box-flex: 4;
  -ms-flex: 4;
  flex: 4;
}
.bild-links-projekt {
  -webkit-box-flex: 6;
  -ms-flex: 6;
  flex: 6;
}

/* Body Content Styling */
.catchphrase {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--dunkelbraun);
  text-align: left; /* linksbündig */
  margin: 0;
  padding-top: 60px;
  padding-bottom: 40px;
}

.projekt-beschreibung {
  max-width: 800px; /* Breite des Textblocks */
  margin: 60px auto; /* zentriert auf der Seite */
  padding: 0 20px; /* Luft auf Mobile */
  color: var(--dunkelbraun);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
}

.untertitel {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--dunkelbraun);
  margin-top: 20px;
  margin-bottom: 20px;
}

/* video einbettung */
.projekt-video {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin: 40px 0 50px;
}

.video-wrapper {
  width: 100%;
  max-width: 1200px; /* MUSS identisch zur Galerie sein */
  padding: 0 16px;
}

/* Thumbnail */
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  display: block;
}

/* Play Button */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: var(--rosa);
  -webkit-border-radius: 999px;
  -moz-border-radius: 999px;
  border-radius: 999px;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.play-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 22px solid var(--dunkelbraun);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

/* Hover */
.video-thumb:hover .play-button {
  background: var(--rosa);
}

/* Galerie-Styling */
.galerie {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 16px 1fr 16px 1fr;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  grid-gap: 16px; /* fallback for older browsers */
  padding: 0 0 40px 0;
  max-width: 1000px;
  margin: 0 auto;
}

.galerie-item img {
  width: 100%;
  height: 250px;
  -o-object-fit: cover;
  object-fit: cover;
  display: block;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  cursor: pointer;
} /* Lightbox: standardmässig unsichtbar */
.lightbox {
  position: fixed;
  inset: 0;
  /* fallback for older browsers */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
}

/* wenn angeklickt (URL #img1 etc.) */
.lightbox:target {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  -webkit-border-radius: 16px;
  -moz-border-radius: 16px;
  border-radius: 16px;
}

/* Schliessen Button */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 40px;
  color: white;
  text-decoration: none;
  line-height: 1;
}

.video-grid {
  width: min(1000px, 92%);
  margin: 40px auto 20px;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 16px 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  grid-gap: 16px; /* fallback for older browsers */
}

.video-box {
  position: relative;
  width: 100%;
  /* Modern browsers with aspect-ratio support */
  aspect-ratio: 16 / 9;
  /* Fallback for browsers without aspect-ratio support */
  height: 0;
  padding-bottom: 56.25%; /* 9/16 * 100% */
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  border-radius: 20px;
  overflow: hidden;
}

.link-webseite {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--dunkelbraun);
  text-decoration: underline;
}

/* Reset height for modern browsers */
@supports (aspect-ratio: 16 / 9) {
  .video-box {
    height: auto;
    padding-bottom: 0;
  }
}

.video-box iframe {
  position: absolute;
  inset: 0;
  /* fallback for older browsers */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer-Styling */
.footer {
  background-color: var(--hellbraun);
  height: 100px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-decoration: none;
}

.footer-text,
.impressum {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--beige);
  margin: 0;
  text-align: center;
  text-decoration: none;
}

.impressum:hover {
  color: var(--rosa);
}

.footer-text:hover {
  color: var(--rosa);
}

.instagram {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin: 0 20px; /* Abstand links & rechts */
}
.instagram-logo {
  display: block;
  width: 50px;
  height: auto;
}

/* Responsive Design */

@media (max-width: 900px) {
  /* HEADER: 2 Bilder bleiben nebeneinander */
  .header-balken-projekt {
    margin: 8px;
  }

  .bilder-oben-projekt {
    gap: 8px;
  }

  .hintergrund-projekt {
    height: 360px;
    width: 100%;
  }

  /* Titel kleiner, aber weiterhin Overlay wie Desktop */
  .titel-pink,
  .titel-dunkelbraun,
  .titel-hellbraun {
    font-size: 2.8rem;
    -webkit-transform: translate(-50%, 45%);
    -moz-transform: translate(-50%, 45%);
    -ms-transform: translate(-50%, 45%);
    -o-transform: translate(-50%, 45%);
    transform: translate(-50%, 45%);
    width: 95%;
  }

  /* TEXTBLOCK */
  .projekt-beschreibung {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 18px;
    font-size: 1.1rem;
  }

  .catchphrase {
    font-size: 1.2rem;
    padding-top: 40px;
    padding-bottom: 26px;
  }

  /* VIDEO: bleibt 2 nebeneinander auf iPad */
  .video-grid {
    width: min(1000px, 92%);
    -ms-grid-columns: 1fr 14px 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    grid-gap: 14px; /* fallback */
  }

  /* GALERIE: 2 Spalten statt 3 */
  .galerie {
    max-width: 1000px;
    width: min(1000px, 92%);
    -ms-grid-columns: 1fr 14px 1fr;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    grid-gap: 14px; /* fallback */
    padding-bottom: 34px;
  }

  .galerie-item img {
    height: 220px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .header-balken-projekt {
    overflow-x: clip;
  }

  /* Container darf nicht breiter als Screen werden */
  .bilder-oben-projekt {
    width: 100%;
    overflow: hidden; /* verhindert Überstand */
    gap: 6px; /* kleinerer Abstand */
  }

  /* beide Bilder teilen sich den Platz */
  .bild-links-projekt,
  .bild-rechts-projekt {
    flex: 0 0 calc(50% - 3px); /* 2x 50% minus halbes gap */
    max-width: calc(50% - 3px);
  }

  /* Bild darf niemals "auto-breit" werden */
  .hintergrund-projekt {
    width: 100%;
    height: 220px; /* kleiner, damit nebeneinander passt */
    object-fit: cover;
    display: block;
  }

  /* Titel: weiterhin auf dem Bild (Overlay), aber kleiner */
  .titel-pink,
  .titel-dunkelbraun,
  .titel-hellbraun {
    font-size: 2rem;
    width: 95%;
    -webkit-transform: translate(-50%, 40%);
    -moz-transform: translate(-50%, 40%);
    -ms-transform: translate(-50%, 40%);
    -o-transform: translate(-50%, 40%);
    transform: translate(-50%, 40%);
    white-space: nowrap; /* eine Zeile */
    overflow: hidden;
    text-overflow: ellipsis; /* falls Titel zu lang */
    padding: 0 10px;
  }

  /* TEXTBLOCK: lesbar und nicht zu breit */
  .projekt-beschreibung {
    max-width: 520px;
    margin: 32px auto;
    padding: 0 16px;
    font-size: 1.05rem;
  }

  .catchphrase {
    font-size: 1.1rem;
    padding-top: 28px;
    padding-bottom: 20px;
  }

  /* VIDEO WRAPPER (einzeln / Youtube Links bleiben gleich) */
  .projekt-video {
    margin: 24px 0 30px;
  }

  .video-wrapper {
    max-width: 1000px;
    width: min(1000px, 92%);
    padding: 0;
  }

  /* VIDEO GRID: untereinander auf Handy */
  .video-grid {
    width: min(1000px, 92%);
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
    gap: 14px;
    grid-gap: 14px; /* fallback */
    margin: 26px auto 18px;
  }

  /* GALERIE: 2 Spalten (oder 1, wenn du willst) */
  .galerie {
    width: min(1000px, 92%);
    -ms-grid-columns: 1fr 12px 1fr;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    grid-gap: 12px; /* fallback */
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .galerie-item img {
    height: 160px;
  }

  /* Lightbox padding kleiner */
  .lightbox {
    padding: 16px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
    font-size: 34px;
  }

  /* Footer bleibt nebeneinander, aber kompakter */
  .footer {
    height: 86px;
    gap: 12px;
    padding: 0 10px;
  }

  .instagram {
    margin: 0 12px;
  }

  .instagram-logo {
    width: 40px;
  }
}
