/* main.css */

/* Navigation */
nav ul {
  display: flex;
  gap: 40px;
  list-style: none;
  z-index: 1000;
}

nav ul a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
  position: relative;
}

/* Unterstreichung nur für Menü-Links (nicht Logo) */
nav ul a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: #111;
  transition: 0.4s;
}

nav ul a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  z-index: 1002;
}

.hamburger div {
  width: 28px;
  height: 3px;
  background: #111;
  transition: all 0.3s ease;
}

/* Hide / Show Navigation on Scroll */
nav {
  transition: transform 0.35s ease;

  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

nav.nav-hidden {
  transform: translateY(-100%);
}

/* Grid & Chapter Items */
.item {
  display: block;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.item img {
  width: 100%;
  height: 500px; /*height: auto;*/
  object-fit: cover;
  transition: transform 1s ease;
  will-change: transform;
  transform: translateZ(0);
}

.item img:hover {
  transform: scale(1.04);
}

.item h2 {
  margin-top: 18px;
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: #333;
}

.item p {
  color: #333;
  line-height: 1.8;
  font-size: 1.05rem;
}

.grid,
.chapter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 60px;
  padding: 140px 8%;
}

.chapter p {
  max-width: 800px;
}

/* Footer */
footer {
  padding: 60px 8%;
  text-align: center;
  font-size: 0.9rem;
  color: #111;
}

/* GSAP Targets */
[data-fade]{opacity:1;transform:translateY(40px)}

/* Logo-Link */
nav > a img{display:block;height:145px;}

/* Responsive Design */
@media (max-width: 768px) {
  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 140px 30px;
    gap: 30px;
    transition: right 0.4s ease;
    display: flex;
    z-index: 1001;
  }

  nav ul.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active div:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .item img {
    height: 300px;
  }

  .item h2 {
    font-size: 1.8rem;
  }

  .grid,
  .chapter {
    grid-template-columns: 1fr;
  }
}
