/* ============================
   Schriftart
============================= */
@font-face {
  font-family: 'ArtifaktElementLight';
  src: url('fonts/Artifakt Element Light.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================
   Bildschutz
============================= */
img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Bilder in Lightbox und klickbare Thumbnails brauchen pointer-events */
.hover-block img,
.thumbnail,
.lightbox-image,
#lightbox-img,
#video-player {
  pointer-events: auto;
}

/* ============================
   Basis-Styles & Reset
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'ArtifaktElementLight', sans-serif;
  font-weight: normal;
  line-height: 1.6;
  background-color: #fff;
  color: #111;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  text-align: center;
  font-weight: normal;
}

p {
  text-align: center;
  font-size: 16px;
  margin-bottom: 1rem;
}


/* ============================
   Navigation
============================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: white;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.nav-menu {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  border-top: 1px solid #ddd;
  background: white;
  position: relative;
}

.nav-link {
  padding: 12px 0;
  text-decoration: none;
  color: black;
  font-weight: 300;
  font-family: 'ArtifaktElementLight', sans-serif;
  display: block;
}

.indicator {
  position: absolute;
  top: calc(100% + 60px);
  left: 0;
  width: 14.285%;
  text-align: center;
  font-size: 16px;
  transition: left 0.3s ease;
  pointer-events: none;
}

.nav-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  padding: 10px 0;
}

.nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-pic {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.contour {
  width: 120px;
  height: auto;
  object-fit: contain;
}

section[id] {
  scroll-margin-top: 120px;
}

/* ============================
   Inhalt & Layout
============================= */
main {
  padding-top: 140px;
}

.content {
  padding: 60px 20px;
}

.content0 { background: #eee; }
.content1 { background: #eee; }
.content2 { background: #eee; }
.content3 { background: #eee; }
.content4 { background: #eee; }
.content5 { background: #eee; }
.content6 { background: #fff; }

.projekt-container {
  padding: 40px 0;
}

.projekt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding-left: 10%;
  padding-right: 10%;
}

.profil-flex {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 40px;
  flex-wrap: wrap;
}

.profil-bild {
  flex: 0 0 auto;
  max-width: 320px;
}

.profil-text {
  flex: 1 1 400px;
  max-width: 800px;
  display: flex;
  align-items: stretch;
}

.projekt-block {
  background-color: white;
  border: 1px solid #ddd;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow: hidden;
  position: relative;
}

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

.projekt-block p {
  padding: 20px;
}

.projekt-block h3 {
  padding: 20px;
}

/* FIX: align="right" aus HTML entfernt, hier per CSS gelöst */
.projekt-meta {
  font-size: 14px;
  margin-top: 30px;
  text-align: right;
}

.trennlinie {
  border: none;
  height: 4px;
  background-color: #fff;
}

/* ============
   Hover Block (Bildoverlay)
============ */
.hover-block {
  position: relative;
  width: 100%;
  height: 100%;
}

.hover-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.hover-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.hover-block:hover .hover-overlay {
  opacity: 1;
}

.hover-text {
  font-size: 16px;
  color: #111;
  font-weight: 400;
}

/* ============================
   Lightbox
============================= */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
}

.lightbox .close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  padding: 10px;
  user-select: none;
  transform: translateY(-50%);
}

.nav-arrow.left  { left: 30px; }
.nav-arrow.right { right: 30px; }

#video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#video-lightbox video {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px black;
}

#video-lightbox .close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

/* ============================
   Footer
============================= */
footer {
  padding: 20px;
  background: #222;
  color: #fff;
  text-align: center;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}


/* ============================
   Burger-Button (immer versteckt, nur mobil sichtbar)
============================= */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  position: fixed;
  top: 8px;
  right: 12px;
  z-index: 1100;
  line-height: 1;
}

.mobile-menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
  margin: 5px 0;
  transition: all 0.25s ease;
}

/* ============================
   Mobile Nav Overlay
============================= */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  overflow-y: auto;
  padding: 72px 24px 40px;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-content {
  max-width: 480px;
  margin: 0 auto;
}

.mobile-nav-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-content li {
  border-bottom: 1px solid #eee;
}

.mobile-nav-content li:first-child {
  border-top: 1px solid #eee;
}

.mobile-nav-content li a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  text-decoration: none;
  color: #111;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.mobile-nav-content li a:active {
  background: #f5f5f5;
}

.mobile-nav-content li img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.close-mobile-nav {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 32px;
  cursor: pointer;
  color: #111;
  line-height: 1;
  background: none;
  border: none;
  padding: 4px 8px;
}

/* ============================
   Tablet (max 1024px)
============================= */
@media (max-width: 1024px) {
  .nav-menu,
  .nav-row,
  .indicator {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  main {
    padding-top: 16px;
  }

  .content {
    padding: 40px 16px;
  }

  .projekt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-left: 4%;
    padding-right: 4%;
  }

  .profil-flex {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .profil-bild {
    max-width: 160px;
    width: 160px;
  }

  .profil-bild img {
    width: 100%;
    height: auto;
  }

  .profil-text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  h2, h3 {
    text-align: center;
  }

  p {
    text-align: center;
    font-size: 15px;
  }

  .projekt-meta {
    text-align: center;
    font-size: 13px;
  }
}

/* ============================
   Mobil (max 600px)
============================= */
@media (max-width: 600px) {
  .projekt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Textkacheln bekommen volle Breite, Bildkacheln bleiben 2-spaltig */
  .projekt-block:has(> p),
  .projekt-block:has(> h3) {
    grid-column: 1 / -1;
  }

  .projekt-block p {
    padding: 14px 16px;
    font-size: 14px;
  }

  .hover-text {
    font-size: 13px;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .content {
    padding: 32px 12px;
  }

  .trennlinie {
    height: 2px;
  }

  footer {
    font-size: 13px;
    padding: 16px;
  }
}

/* ============
   Druckversion
============ */
@media print {
  header, footer, .mobile-menu-button, .indicator {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: white !important;
  }

  .content {
    page-break-inside: avoid;
    padding: 20px;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
