/* ===========================
   HEADER
=========================== */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 300;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 20px rgba(0,0,0,0.0);
}

.header-inner {
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header-logo img {
  height: 50px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-item-leistungen { position: relative; }

.nav-link {
  text-decoration: none;
  color: var(--color-black);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: linear-gradient(90deg,
    var(--color-dark-gold-text),
    var(--color-dark-gold));
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link--dropdown.active {
  color: var(--color-dark-gold-text);
}
.nav-link:hover::after,
.nav-link--dropdown.active::after { width: 100%; }

.nav-chevron {
  width: 12px; height: 12px;
  transition: transform 0.2s ease;
}
.nav-link--dropdown.active .nav-chevron {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  background: none;
  border: none;
  transition: background 0.2s ease;
}

/* Innere Füllung */
.header-icon-btn::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  border-radius: 8.5px;
  background: rgba(255, 227, 165, 0.12);
  transition: background 0.2s ease;
  pointer-events: none;
}

.header-icon-btn:hover::after {
  background: rgba(255, 227, 165, 0.28);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.header-burger { display: none; }

.icon-badge {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 400;
}

.header-icon-btn:hover .icon-badge {
  opacity: 1;
}

/* ===========================
   MEGA MENU V3
=========================== */

.mega-menu-wrapper {
  position: fixed;
  top: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 800px;
  max-width: 95vw;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease,
              transform 0.2s ease;
}
.mega-menu-wrapper.open {
  pointer-events: all;
  opacity: 1;
  transform: translateX(-50%) translateY(0%);
}

.mega-menu-v3 {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-grey-border); 
}

/* 3-Spalten Body */
.mega-v3-body {
  display: flex;
}

/* Left wrapper (Header + Spalte 1+2) */
.mega-v3-left {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header Zeile */
.mega-v3-header {
  padding: 16px 24px;
}
.mega-v3-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}
.mega-v3-title-link > span:first-child {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mega-v3-alle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #9A6502;
  transition: gap 0.2s ease;
}
.mega-v3-alle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.mega-v3-title-link:hover .mega-v3-alle svg {
  transform: translateX(3px);
}

/* Columns (Spalte 1 + 2) */
.mega-v3-columns {
  display: flex;
  flex: 1;
}

/* ---- Spalte 1: Kategorien ---- */
.mega-v3-categories {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  position: relative;
}
.mega-v3-categories::after {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #f0f0f0;
}

.mega-v3-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  border-left: 3px solid transparent;
  background: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease,
              border-color 0.2s ease;
}

.mega-v3-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 227, 165, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.mega-v3-cat-icon svg {
  width: 16px;
  height: 16px;
}

.mega-v3-cat-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #1a1a1a;
  transition: color 0.2s ease;
}

/* Hover */
.mega-v3-cat:hover {
  background: rgba(255, 227, 165, 0.15);
}
.mega-v3-cat:hover .mega-v3-cat-icon {
  background: rgba(154, 101, 2, 0.12);
}
.mega-v3-cat:hover .mega-v3-cat-name {
  color: #9A6502;
}

/* Active */
.mega-v3-cat.active {
  background: rgba(255, 227, 165, 0.28);
}
.mega-v3-cat.active .mega-v3-cat-icon {
  background: rgba(154, 101, 2, 0.15);
}
.mega-v3-cat.active .mega-v3-cat-name {
  color: #9A6502;
  font-weight: 600;
}

/* ---- Spalte 2: Links ---- */
.mega-v3-links {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
}

.mega-v3-panel {
  display: none;
}
.mega-v3-panel.active {
  display: block;
}

.mega-v3-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mega-v3-panel-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.mega-v3-panel-alle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #9A6502;
  text-decoration: none;
}
.mega-v3-panel-alle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}
.mega-v3-panel-alle:hover svg {
  transform: translateX(3px);
}

.mega-v3-panel-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-v3-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2a2a2a;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.mega-v3-link:hover {
  color: #9A6502;
}

.mega-v3-arrow-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EFEFEF;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.mega-v3-arrow-wrap svg {
  width: 11px;
  height: 11px;
  color: #888888;
  transition: color 0.2s ease;
}
.mega-v3-link:hover .mega-v3-arrow-wrap {
  background: rgba(255, 227, 165, 0.35);
}
.mega-v3-link:hover .mega-v3-arrow-wrap svg {
  color: #9A6502;
}

/* ---- Spalte 3: Rechts (Bild) ---- */
.mega-v3-right {
  width: 220px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background:
    url('/assets/images/portraits/maximilian.webp')
    center center / cover no-repeat;
  background-color: rgba(255, 227, 165, 0.15);
  margin: 10px;
}

/* Dunkler Gradient-Overlay von unten */
.mega-v3-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

.mega-v3-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-v3-overlay-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.mega-v3-overlay-text {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

.mega-v3-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 8px 14px;
  background: linear-gradient(
    90deg,
    #E6B554 0%,
    #FBD78C 50%,
    #E6B554 100%
  );
  border-radius: 8px;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
  width: fit-content;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 3;
}
.mega-v3-overlay-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}
.mega-v3-overlay-btn:hover {
  transform: scale(1.03);
}
.mega-v3-overlay-btn:hover svg {
  transform: translateX(2px);
}
.mega-v3-overlay-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent,
    rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}
.mega-v3-overlay-btn:hover::before {
  left: 150%;
}

/* ===========================
   TABLET / MOBILE
=========================== */

/* Body scroll lock */
body.mobile-menu-open {
  overflow: hidden;
}

/* Header solid when menu open */
.site-header.menu-open {
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
}

.mobile-menu { display: none; }

@media (max-width: 1024px) {
  .header-nav { display: none; }
  .header-actions { display: none; }
  .mega-menu-wrapper { display: none; }
  .header-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .header-burger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-black);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Burger -> X */
  .header-burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .header-burger.is-open span:nth-child(2) {
    opacity: 0;
  }
  .header-burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* ===========================
     MOBILE MENU
  =========================== */

  .mobile-menu {
    display: block;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
  }

  /* Levels */
  .mob-level {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 24px 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease,
                visibility 0.2s ease;
  }
  .mob-level.active {
    opacity: 1;
    visibility: visible;
  }

  /* Nav Links */
  .mob-nav {
    display: flex;
    flex-direction: column;
  }
  .mob-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--color-black);
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
  }
  .mob-link-arrow {
    width: 18px;
    height: 18px;
    color: #cccccc;
  }

  /* Divider */
  .mob-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 16px 0;
  }

  /* Section Header */
  .mob-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 12px;
  }
  .mob-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .mob-section-alle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #9A6502;
    text-decoration: none;
  }
  .mob-section-alle svg {
    width: 14px;
    height: 14px;
  }

  /* Service Buttons */
  .mob-services {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mob-service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
  }
  .mob-service:last-child {
    border-bottom: none;
  }
  .mob-service-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 227, 165, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .mob-service-icon svg {
    width: 17px;
    height: 17px;
  }
  .mob-service-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
  }
  .mob-service-arrow {
    width: 16px;
    height: 16px;
    color: #cccccc;
    flex-shrink: 0;
  }

  /* CTA */
  .mob-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(
      90deg,
      #E6B554 0%,
      #FBD78C 50%,
      #E6B554 100%
    );
    border-radius: 8px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px; 
  }
  .mob-cta svg {
    width: 16px;
    height: 16px;
  }

  /* ===========================
     MOBILE MENU – EBENE 2
  =========================== */

  .mob-level2-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
  }
  .mob-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
  }
  .mob-back svg {
    width: 18px;
    height: 18px;
  }
  .mob-level2-alle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #9A6502;
    text-decoration: none;
  }
  .mob-level2-alle svg {
    width: 14px;
    height: 14px;
  }
  .mob-level2-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 20px 0 16px;
    border-bottom: 1px solid #f5f5f5;
  }
  .mob-level2-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mob-level2-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2a2a2a;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: color 0.2s ease;
  }
  .mob-level2-link:last-child {
    border-bottom: none;
  }
  .mob-arrow-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #EFEFEF;
    flex-shrink: 0;
  }
  .mob-arrow-wrap svg {
    width: 12px;
    height: 12px;
    color: #888888;
  }
}
