/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: #222;

  /* Platz für Sticky Footer */
  /* padding-bottom: 70px; */
}

/* ================= HEADER ================= */

.header {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* DESKTOP HEADER */
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 10px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* LOGO */
.logo {
  grid-column: 1;
  justify-self: center;
  width: 200px;
  transform: translateY(16px);
}

/* PROFILE */
.profile {
  grid-column: 3;
  justify-self: center;

  width: 200px;
  height: 200px;

  border-radius: 50%;
  object-fit: cover;

  transform: translateY(16px);
}

/* TEXT */
.header-text {
  grid-column: 2;
  text-align: center;
  line-height: 1.4;
}

.header-text h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

.header-text .line1 {
  margin-top: 6px;
  font-size: 15px;
  color: #666;
  letter-spacing: 0.04em;
}

.header-text .line2 {
  margin-top: 10px;
  font-size: 15px;
  color: #444;
  line-height: 1.5;
}

/* ================= GALLERY ================= */

#gallery {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 20px; /* ← DAS FEHLT */

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 50px;
}

/* ITEM */
.grid-item {
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.grid-item:hover {
  transform: translateY(-6px);
}

.grid-item:hover img {
  opacity: 0.96;
}

/* IMAGE */
.image-wrapper {
  position: relative;
}

.image-wrapper > img:first-child {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* MULTI ICON */
.multi-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  z-index: 2;
  pointer-events: none;
}

/* CAPTION */
.caption {
  margin-top: 14px;
}

.caption .de {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.caption .en {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}

/* ================= LIGHTBOX ================= */

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

#lightbox.active {
  display: flex;
}

#lightbox-content {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  color: #fff;
}

#lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
}

.lightbox-title {
  font-size: 22px;
  margin-bottom: 14px;
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
}

/* NAV */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.prev { left: 20px; }
.next { right: 20px; }

/* ================= FOOTER ================= */

.footer {
  position: sticky;
  bottom: 0;

  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);

  border-top: 1px solid rgba(0,0,0,0.08);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;

  padding: 12px 20px;

  z-index: 10;
}

.footer a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
}

.footer a:hover {
  color: #000;
}

/* ================= OVERLAYS ================= */

#impressum-overlay,
#privacy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.7);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

#impressum-overlay.active,
#privacy-overlay.active {
  display: flex;
}

.impressum-box,
.privacy-box {
  background: #fff;
  color: #222;

  max-width: 700px;
  width: 90%;
  max-height: 90vh;

  overflow-y: auto;

  padding: 30px;
  position: relative;
  line-height: 1.6;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  /* HEADER */
  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 40px 20px;
  }

  .logo {
    width: 130px;
    transform: none;
  }

  .profile {
    width: 130px;
    height: 130px;
    transform: none;
  }

  .header-text h1 {
    font-size: 22px;
  }

  .header-text .line1,
  .header-text .line2 {
    font-size: 14px;
  }

  /* GALLERY */
 #gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0 16px;
}

  /* ICON */
  .multi-icon {
    width: 24px;
  }

  /* FOOTER */
  .footer {
    gap: 20px;
    font-size: 13px;
    padding: 10px;
  }
}

/* ===== FINAL OVERRIDE ===== */
@media (max-width: 768px) {

  #gallery {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .grid-item {
    width: 100% !important;
  }

}