/* === Grundlayout === */
html, body {
  margin: 0;
  font-family: Garamond, serif;
  color: #000;
  background: #fff;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: black;
  transition: color 0.3s;
}
a:hover {
  color: blue;
}

/* === Header === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Arial, sans-serif;
  background: transparent;
  z-index: 1000;
}

header h1 {
  font-size: 1rem;
  margin: 0;
}
header span {
  font-size: 1rem;
  margin-right: 30px;
}

/* === Section allgemein === */
section {
  height: 100vh;
  position: relative;
}

/* Projekt-Abschnitte mittig ausrichten */
section.projekt {
  display: flex;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
}

/* === Slideshow Container === */
.slideshow-container {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  padding: 200px 10% 80px; /* Header berücksichtigen */
}

.slide {
  display: none;
  text-align: center;
}

.slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

/* === Captions / Text-Slides allgemein === */


@media (min-width: 769px) {
.caption {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 150px; 
  margin-top: 20px;
  margin-bottom: 50px;
  color: #000;
  line-height: 1.5;
}

.caption p {
  margin: 10px 0;
  font-size: 0.9rem;
}

.caption p:first-child {
  font-weight: bold;
  font-size: 1rem;
}
	
	.slide.text-slide .caption {
    overflow-y: auto;     /* Scrollen bei zu langem Text */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
	padding: 0 20%;
  }

  .slide.text-slide .caption p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .slide.text-slide .caption p:first-child {
    font-size: 1.1rem;
    font-weight: bold;
  }
}


/* === Text-Slide Styling Mobile === */
@media (max-width: 768px) {
  .caption {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 150px; 
  margin-top: 20px;
  margin-bottom: 50px;
  color: #000;
  line-height: 1.5;
}

.caption p {
  margin: 10px 0;
  font-size: 0.8rem;
}

  .caption p:first-child {
  font-weight: bold;
  font-size: 0.9rem;
}  

  .slide.text-slide .caption {
    overflow-y: auto;     /* Scrollen bei zu langem Text */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
	text-align: justify; /* Blocksatz auch auf Mobile */
  }

  .slide.text-slide .caption p {
    font-size: 0.8rem;
    line-height: 1.1;
  }

  .slide.text-slide .caption p:first-child {
    font-size: 0.9rem;
    font-weight: bold;
  }
}


/* === Pfeile === */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  color: black;
  font-weight: bold;
  font-size: 15px;
  user-select: none;
}

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

/* === Footer === */
footer {
  min-height: 100vh;
  scroll-snap-align: start;
  overflow-y: auto;
  padding: 60px 0;
  display: block;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: start;
  max-width: 100%;
  padding: 0 15px;
  margin: 0 auto;
}

.footer-item img {
  width: 300px;
  height: auto;
  padding: 11px 0; 
}

.footer-item p {
  margin: 10px 0;
  font-size: 0.8rem;
}
.footer-item p:first-child {
  margin: 10px 0;
  font-size: 1rem;
}

#email a {
  color: black;
  text-decoration: none;
}
#email a:hover {
  color: blue;
}

.back-to-top {
  text-align: center;
  margin: 40px 0;
}

.back-to-top a {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1.2rem;
  color: black;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  font-family: Arial, sans-serif;
}

.back-to-top a:hover {
  color: blue;
}

/* === Responsive === */
@media (max-width: 768px) {
  .slideshow-container {
    padding: 30px 10% 30px;
  }

  .caption {
    min-height: auto;
    font-size: 0.9rem;
    padding: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 5%;
    text-align: center;
  }

  .footer-item img {
    margin: 0 auto;
  }
}
