/* --- GLOBAL --- */
:root {
  --accent: #d4b98c;
  --bg: #f5f5f5;
  --text: #222;
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.35);
  --nav-bg: rgba(255, 255, 255, 0.28);
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

/* --- HEADER --- */
header {
  background: url("pictures/backgroundimage_websiteold.jpg") center 10% / cover no-repeat;
  height: 35vh;              /* dynamisch fÃ¼r Desktop */
  min-height: 260px;         /* MindesthÃ¶he */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

header h1 {
  color: #f2f2f2;
  text-shadow:
    0 0 12px rgba(0,0,0,0.55),
    0 0 22px rgba(0,0,0,0.45),
    0 4px 14px rgba(0,0,0,0.55);
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  z-index: 2;
  position: relative;
  font-size: clamp(2.2rem, 3.5vw, 4.0rem);
  font-weight: 700;
  letter-spacing: -1px;
  text-transform: none;
}

h2 {
  font-weight: 600;
  letter-spacing: -0.5px;
}

p {
  line-height: 1.65;
  font-size: 1.00rem;
}

.p1 {
  line-height: 1.65;
  font-size: 1rem;
  font-weight: 700;
}

.p2 {
  line-height: 1.65;
  font-size: 1rem;
  font-style: italic;
}

.p3 {
  text-decoration: underline;
}

/* --- NAVIGATION: unten am Header + sticky beim Scrollen --- */
.nav-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.nav-bar {
  position: sticky;
  top: 0;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0.6rem 1rem;
  margin-top: -18px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 10;
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 12px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,0.18);
}

.nav-link.active,
.nav-link.active:hover {
  background: var(--accent);
  color: #1b263b;
}

.nav-instagram {
  display: none;
}

/* --- HAMBURGER (mobile) --- */
.hamburger {
  width: 32px;
  height: 24px;
  margin-top: 6px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 20;
}

.hamburger span {
  height: 4px;
  background: white;
  border-radius: 2px;
  transition: 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.nav-dropdown {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: rgba(13, 27, 42, 0.75);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.nav-dropdown.open {
  display: flex;
}

.nav-dropdown a {
  color: white;
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.6rem 0;
}

/* --- MAIN --- */
main {
  padding: 2rem;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef1f5 100%);
}

.hero-glass {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 12px;
  padding: 2.2rem;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  max-width: 900px;
  margin: 20px auto 2rem auto;
}

.hero-glass p {
  text-align: justify;
  text-justify: inter-word;
}

.glass-card {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  max-width: 900px;
  margin: 2rem auto;
  transition: 0.25s ease;
}

.glass-card p {
  text-align: justify;
  text-justify: inter-word;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.section-title {
  border-left: 5px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
  color: #1b263b;
}

.contact-ig-icon {
  width: 20px;   /* kleiner */
  height: 20px;
  opacity: 0.9;
  transform: translateY(2px);
}

/* --- FOOTER --- */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 110px;
  background: rgba(27, 38, 59, 0.25);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

footer.visible {
  transform: translateY(0);
}

/* Impressum + Datenschutz */
.footer-links {
  order: 2;
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Logo CB */
.footer-logo-right {
  order: 2.5;
  display: block;
  position: static;
  filter: invert(1);
}

.footer-logo-right img {
  width: 32px;
  opacity: 0.9;
  transition: 0.2s ease;
}

.footer-logo-right img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Copyright */
footer p {
  order: 3;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

/* Desktop: Instagram-SVG im Footer */
.footer-instagram-desktop {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
}

/* SVG sichtbar machen */
.footer-instagram-desktop .nav-ig-icon {
  width: 30px;
  height: 30px;
  opacity: 0.9;
  color: white; /* wichtig für fill="currentColor" */
  transition: 0.2s ease;
}

/* Hover-Effekt */
.footer-instagram-desktop .nav-ig-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* --- DESKTOP SPEZIAL: Logo rechts unten --- */
@media (min-width: 769px) {
  .footer-logo-right {
    position: absolute;
    right: 2rem;
    bottom: 1.5rem;
    order: unset;
  }
}

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.a11y-toggle {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  background: #2e3d57;
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 9999;
}

.a11y-popup {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  background: white;
  color: black;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  width: 260px;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
}

.a11y-popup.open {
  display: flex;
}

.a11y-btn {
  padding: 0.6rem;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 8px;
}

.a11y-btn:focus,
.a11y-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.a11y-close {
  margin-top: 0.8rem;
  padding: 0.6rem;
  background: #1b263b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.high-contrast {
  filter: invert(1) hue-rotate(180deg);
}

.underline-links a {
  text-decoration: underline !important;
}

.reduce-motion * {
  animation: none !important;
  transition: none !important;
}

:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.nav-link:focus {
  outline: 2px solid transparent !important;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: white;
  padding: 8px 12px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 10px;
}

body.high-contrast {
  --accent: #ffffff;
}

body.high-contrast .nav-bar {
  background: #000;
}

.material-symbols-rounded {
  font-size: 26px;
  font-variation-settings: 'wght' 500;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  /* Navigation */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Nav-Bar bleibt an ihrer Stelle */
  .nav-bar {
    position: relative;
    z-index: 20;
    justify-content: flex-start;
    padding-left: 1rem; /* optional, damit er nicht ganz am Rand klebt */
  }

  /* Dropdown öffnet sich ÜBER der Nav-Bar */
  .nav-dropdown {
    position: absolute;
    top: 100%;    /* öffnet nach OBEN */
    left: 0;
    width: 100%;
    z-index: 30;
    display: none;
    flex-direction: column;
    padding: 0;

    /* GLASS-CARD STYLE */
    background: rgba(20, 30, 50, 0.55);    
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-radius: 0 0 12px 12px;
    border-top: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);

    padding: 0.6rem 0;
  }

  .nav-dropdown a {
    position: relative;                 /* wichtig für ::after */
    padding: 0.9rem 1.5rem;             /* Text + Abstand für Linie */
    color: #ffffff;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: none;                /* KEINE zweite Linie mehr */
  }

  .nav-dropdown a::after {
    content: "";
    position: absolute;
    left: 1.5rem;                       /* gleicher Abstand wie Padding */
    right: 1.5rem;                      /* symmetrisch rechts */
    bottom: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
  }

  .nav-dropdown a:last-child::after {
    display: none;
  }

  .nav-dropdown.open {
    display: flex;
  }

  .nav-instagram {
    display: flex;
    margin-left: auto;
  }

  .nav-ig-link {
    color: white;
    text-decoration: none;
  }

  .nav-ig-icon {
    width: 30px;
    height: 30px;
    opacity: 0.9;
    margin-right: 2rem;
    transform: translateY(3px);
  }

  .nav-ig-icon:hover {
    opacity: 1;
    transform: scale(1.1);
  }
  
  /* Header Fix */
  header {
    height: 40vh;
    min-height: 320px;
    background-position: center;
  }

  header h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    max-width: 90%;
    text-align: center;
    white-space: normal;
  }

  /* Footer kompakter machen */
  footer {
    height: auto;
    padding: 0.8rem 0 0.6rem 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
  }

  /* Impressum + Datenschutz in die Mitte */
  .footer-links {
    display: none;
  }

  /* Copyright ganz nach unten */
  footer p {
    order: 3;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
  }

  /* Abstand zum unteren Rand kleiner */
  footer p:last-child {
    margin-bottom: 0.2rem;
  }
  
  .footer-logo-right {
    display: block;
    position: static;
    order: 2.5;
    margin-top: 0.4rem;
  }

  .footer-logo-right img {
    width: 28px;
    height: auto;
    opacity: 0.9;
    transition: 0.2s ease;
  }

  .footer-logo-right img:hover {
    opacity: 1;
    transform: scale(1.05);
  }

  .footer-instagram-desktop {
  display: none;
  }

  .a11y-toggle {
    bottom: 3.5rem;   /* höher setzen */
  }

  .a11y-popup {
    bottom: 7rem;     /* Popup ebenfalls höher, damit es nicht überlappt */
  }
}

@media (max-width: 600px) {
  h1, h2, h3 { font-size: 1.2em; }
  p { font-size: 1.1rem; }

  .hero-glass { padding: 1.6rem; }
  .glass-card { padding: 1.6rem; }
}

/* --- SCROLL ANIMATIONEN --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- DARK MODE --- */
@media (prefers-color-scheme: dark) {

  :root {
    --bg: #0d1117;
    --text: #e6e6e6;
    --accent: #d4b98c;

    /* Glassmorphism dunkler & cleaner */
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);

    /* Navigation */
    --nav-bg: rgba(0, 0, 0, 0.45);
  }

  /* Body */
  html, body {
    background: var(--bg);
    color: var(--text);
  }

  /* Header Overlay stärker */
  header::before {
    background: rgba(0,0,0,0.65);
  }

  /* Navigation */
  .nav-bar {
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .nav-link {
    color: #f2f2f2;
  }

  .nav-link:hover {
    background: rgba(255,255,255,0.12);
  }

  .nav-link.active {
    background: var(--accent);
    color: #1b263b;
  }

  /* Main Gradient */
  main {
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
  }

  /* Glass Cards */
  .hero-glass,
  .glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 22px rgba(0,0,0,0.4);
  }

  .glass-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  }

  /* Section Titles */
  .section-title {
    color: var(--text);
  }

  /* Footer */
  footer {
    background: rgba(10, 15, 25, 0.45);
    color: #f2f2f2;
  }

  footer .footer-links a {
    color: #f2f2f2;
  }

  footer .footer-links a:hover {
    color: var(--accent);
  }

  /* Accessibility Popup */
  .a11y-popup {
    background: #161b22;
    color: #e6e6e6;
    border: 1px solid rgba(255,255,255,0.12);
  }

  .a11y-btn {
    background: #1f2630;
    border: 1px solid rgba(255,255,255,0.15);
    color: #e6e6e6;
  }

  .a11y-close {
    background: #1b263b;
  }
}
