/* style/header.css */
@font-face {
  font-family: "DISCO";
  src: url("../fonts/DISCO.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0; 
  z-index: 1000;
  background: linear-gradient(to right, #ffffff 0%, #d8d2c6 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: "DISCO", sans-serif;
}

/* --- Address Bar --- */
.address-bar{
  text-align: right;
  font-size: 18px;
  padding: 6px 16px;
  margin-right: 50px;
}

/* --- Desktop Contact Styling --- */
.contact {
  display: inline-flex;
  flex-wrap: wrap; 
  align-items: center;
  margin-right: 50px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Abstand zwischen dem Icon und dem Text */
}

.contact-icon {
  width: 22px; /* Größe der Icons am Desktop - bei Bedarf anpassen */
  height: auto;
  display: block;
}

.address-bar a{
  color: #000000;
  text-decoration: none;
  font-size: 18px;
}

.address-bar .sep{
  margin-right: 3px;
}

/* --- Header Bar --- */
.header-bar{
  position: relative;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 10px 0px;
  display: flex;
  align-items: center;
}

/* Logo */
.brand{
  position: absolute;
  left: 50px;
  top: 20px;
  transform: translateY(-50%);
  z-index: 10;
}

.brand img{
  display: block;
  max-height: 230px;
  height: auto;
}

/* Navigation Stripe */
.nav-wrapper{
  width: 100%;
  background: linear-gradient(to right, #ffffff 0%, #3f6b54 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  flex: 1 1 auto;
  padding: 28px 0 12px;
  position: relative;
  z-index: 1;
}

.nav{
  display: flex;
  gap: 30px;
  padding-right: 20px;
  justify-content: flex-end;
  align-items: center;
}

/* =========================
   Links: Unterstrich Animation
   ========================= */
.nav a{
  font-size: 20px;
  color: #ffffff;
  text-decoration: none;
  padding: 2px 0;
  position: relative;          /* ✅ wichtig für ::after */
}

/* animierte Linie */
.nav a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);

  transform: scaleX(0);
  transform-origin: left;      /* ✅ startet links */
  transition: transform 260ms ease;
}

/* Hover: Linie fährt links -> rechts */
.nav a:hover::after{
  transform: scaleX(1);
}

/* Active Page: dauerhaft Linie */
.nav a.active::after,
.nav a[aria-current="page"]::after{
  background: #ffffff;
  transform: scaleX(1);
}

/* Active Page: optional fetter */
.nav a.active,
.nav a[aria-current="page"]{
  font-weight: 700;
}

/* --- Hamburger (Desktop aus) --- */
.nav-toggle{
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 20;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

/* Icon = 3 Linien */
.nav-toggle__icon{
  position: relative;
  display: block;
  width: 26px;
  height: 2px;
  background: #000;
  border-radius: 2px;
  margin: 0 auto;
  transition: transform 250ms ease;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after{
  content:"";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: #000;
  border-radius: 2px;
  transition: transform 250ms ease, opacity 200ms ease;
}
.nav-toggle__icon::before{ top: -8px; }
.nav-toggle__icon::after{ top: 8px; }

/* offen -> X Animation */
.site-header.is-menu-open .nav-toggle__icon{
  transform: rotate(45deg);
}
.site-header.is-menu-open .nav-toggle__icon::before{
  transform: rotate(90deg);
  top: 0;
}
.site-header.is-menu-open .nav-toggle__icon::after{
  opacity: 0;
}

/* --- MOBILE --- */
@media (max-width: 1250px){

  /* --- Address Bar --- */
  .address-bar{
    width: 100%;
    text-align: center;
    font-size: 18px;
    padding-top: 0;
    padding: 0;
    margin-right: 0;
  }

  .contact {
    margin-right: 0;
    justify-content: center; /* Zentriert die Kontakt-Leiste am Handy */
    width: 100%;
  }

  .contact-link {
    gap: 0px; /* Etwas weniger Abstand am Handy */
  }

  .contact-icon {
    width: 10px; /* Kleinere Icons passend zur 10px Schrift */
  }

  /* Header sichtbar/kompakt */
  .header-bar{
    min-height: 92px;
    padding: 10px 14px;
  }

  /* Hamburger sichtbar */
  .nav-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
  }

  /* Logo kleiner + links */
  .brand{
    left: 10px;
    top: 60px;
  }
  .brand img{
    max-height: 100px;
  }

  /* Addressbar kompakter */
  .address-bar{
    margin: 0;
  }
  .address-bar a{
    font-size: 10px;
  }
  .address-bar .sep{
    margin: 1px;
  }

  /* Dropdown-Panel */
  .nav-wrapper{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #3f6b54 0%, #ffffff 100%);

    padding: 0;
    overflow: hidden;

    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition:
      max-height 420ms ease,
      opacity 280ms ease,
      transform 420ms ease;
  }

  .site-header.is-menu-open .nav-wrapper{
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav{
    flex-direction: column;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 18px 20px 22px;
  }

  .nav a{
    font-size: 20px;
    width: 100%;
  }

  /* Mobile: Linie soll auch schön bleiben */
  .nav a::after{
    bottom: -6px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .nav-wrapper{ transition: none !important; }
  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after{ transition: none !important; }
  .nav a::after{ transition: none !important; }
}
