/* ============================================================
   JAKU ART — HEADER & FOOTER
   Wird separat geladen, da auf jeder Seite identisch
   ============================================================ */

/* === Header =============================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mittelgrau);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.site-logo {
  font-family: 'PT Serif', serif;
  font-size: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  text-decoration: none;
}
.site-logo span { color: var(--rot); }
.site-logo:hover { color: var(--text-dark); }

/* Navigation */
.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--rot);
  transition: width 0.3s;
}
.main-nav a:hover { color: var(--text-dark); }
.main-nav a:hover::after { width: 100%; }

.main-nav .current-menu-item a,
.main-nav .current-page-ancestor a {
  color: var(--rot);
}
.main-nav .current-menu-item a::after,
.main-nav .current-page-ancestor a::after {
  width: 100%;
}

/* Dropdown Sub-Menu */
.main-nav > .has-dropdown {
  position: relative;
}
.main-nav > .has-dropdown > a::after {
  content: none; /* override underline on parent */
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 200px;
  background: var(--weiss);
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 0.6rem 0;
  list-style: none;
  z-index: 200;
  margin: 0;
}
.main-nav > .has-dropdown:hover .sub-menu {
  display: block;
}
.main-nav .sub-menu li {
  margin: 0;
}
.main-nav .sub-menu a {
  display: block;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.main-nav .sub-menu a:hover {
  background: var(--hellgrau);
  color: var(--rot);
}
.main-nav .sub-menu a::after {
  display: none; /* no underline in dropdown */
}

/* Nav CTA Button */
.nav-cta a {
  background: var(--rot) !important;
  color: var(--weiss) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: var(--radius) !important;
  font-weight: 500 !important;
}
.nav-cta a::after { display: none !important; }
.nav-cta a:hover {
  background: var(--rot-dark) !important;
  transform: translateY(-1px);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* === Footer =============================================== */
.site-footer {
  background: var(--schwarz);
  color: #999;
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer h4 {
  color: var(--weiss);
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer p,
.site-footer a {
  font-size: 0.88rem;
  color: #999;
  line-height: 1.7;
}
.site-footer a:hover { color: var(--weiss); }

.footer-brand p {
  max-width: 260px;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
}
.footer-social a {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.3s;
}
.footer-social a:hover {
  background: var(--rot);
  color: var(--weiss);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #555;
}

/* === Responsive Header/Footer ============================= */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--weiss);
    padding: 1.5rem;
    border-bottom: 1px solid var(--mittelgrau);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }

  /* Mobile nav – immer aufgeklappt, Tap-Feedback rot */

  #main-nav.open {
    animation: navFadeIn 0.28s ease forwards;
  }
  @keyframes navFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .main-nav > li {
    width: 100%;
    border-bottom: 1px solid var(--mittelgrau);
  }
  .main-nav > li:last-child { border-bottom: none; }

  .main-nav a {
    font-size: calc(0.9rem + 2px);
    padding: 0.9rem 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
  }

  /* Aktuelle Seite dauerhaft rot */
  .main-nav li.current-menu-item > a,
  .main-nav li.current-menu-parent > a,
  .main-nav li.current_page_item > a,
  .main-nav li.current_page_ancestor > a {
    color: var(--rot) !important;
  }
  .main-nav a:hover { color: var(--rot); }

  /* Tap-Feedback */
  .main-nav a:active,
  .main-nav a.tapped {
    color: var(--rot) !important;
    opacity: 1 !important;
  }

  /* Kein Toggle-Pfeil – Untermenü immer sichtbar */
  .main-nav > .has-dropdown > a { justify-content: flex-start; }
  .main-nav > .has-dropdown > a::after { display: none; }

  /* Untermenü immer aufgeklappt */
  .main-nav .sub-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    min-width: 0;
    display: block;
    max-height: none;
    overflow: visible;
    padding: 0 0 0.75rem 0;
  }
  .main-nav .sub-menu li { padding-left: 1rem; }
  .main-nav .sub-menu a {
    font-size: calc(0.9rem + 2px);
    padding: 0.45rem 0;
    opacity: 0.75;
    transition: color 0.2s ease, opacity 0.2s ease;
  }
  .main-nav .sub-menu a:hover,
  .main-nav .sub-menu a:active,
  .main-nav .sub-menu a.tapped,
  .main-nav .sub-menu li.current-menu-item > a {
    opacity: 1;
    color: var(--rot);
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}


/* ── Scroll-to-Top Button ────────────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rot);
  color: var(--weiss);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(215, 25, 32, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 9999;
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scroll-top:hover {
  background: #b5141a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 25, 32, 0.45);
}
#scroll-top:active { transform: scale(0.94); }
#scroll-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--weiss);
}

@media (max-width: 768px) {
  #scroll-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
  #scroll-top svg { width: 18px; height: 18px; }
}
