/* ===========================================
   Hauptnavigation — aa-navbar
   Ersetzt Bootstrap .navbar auf allen Seiten.
   =========================================== */

/* ── Basis ──────────────────────────────────────────────────────────── */
.aa-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.aa-navbar--scrolled {
  border-bottom-color: var(--aa-border, #e5e7eb);
  box-shadow: 0 1px 16px rgba(0, 0, 0, 0.07);
}

.aa-navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

/* ── Brand ──────────────────────────────────────────────────────────── */
.aa-navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.aa-navbar__brand img {
  max-height: 36px;
  width: auto;
  display: block;
}

/* Reuse existing aa-brand-link styles from style.css */

/* ── Desktop Nav ────────────────────────────────────────────────────── */
.aa-navbar__desktop {
  display: none;
  align-items: center;
}

@media (min-width: 992px) {
  .aa-navbar__desktop {
    display: flex;
    align-items: center;
  }
}

/* ── Nav List ───────────────────────────────────────────────────────── */
.aa-navbar__desktop .aa-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Nav Links (Desktop) ────────────────────────────────────────────── */
.aa-navbar__desktop .aa-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--aa-dark, #183153);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
  /* Remove Bootstrap nav-link defaults */
  border: none;
  background: none;
}

/* Animated underline */
.aa-navbar__desktop .aa-nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--aa-red, #e60b00);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.aa-navbar__desktop .aa-nav-link:hover {
  color: var(--aa-red, #e60b00);
}

.aa-navbar__desktop .aa-nav-link:hover::after,
.aa-navbar__desktop .aa-nav-item.is-active .aa-nav-link::after {
  transform: scaleX(1);
}

.aa-navbar__desktop .aa-nav-item.is-active .aa-nav-link {
  color: var(--aa-red, #e60b00);
}

/* Chevron icon */
.aa-nav-chevron {
  font-size: 0.65rem;
  transition: transform 200ms ease;
  opacity: 0.6;
}

.aa-navbar__desktop .aa-nav-item--has-dropdown.show .aa-nav-chevron,
.aa-navbar__desktop .aa-nav-item--has-dropdown:focus-within .aa-nav-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown (Desktop) ─────────────────────────────────────────────── */
.aa-navbar__desktop .aa-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--aa-border, #e5e7eb);
  border-radius: 0.875rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
  list-style: none;
  z-index: 1000;
  /* Bootstrap manages display via .show */
}

/* Override Bootstrap dropdown-menu default padding/border */
.aa-navbar__desktop .dropdown-menu.aa-dropdown {
  border-radius: 0.875rem;
  padding: 0.5rem;
  border: 1px solid var(--aa-border, #e5e7eb);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  margin-top: 8px;
}

.aa-dropdown-link {
  display: block;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--aa-body, #2d3748);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background 140ms ease, color 140ms ease;
}

/* Override Bootstrap dropdown-item defaults */
.dropdown-item.aa-dropdown-link {
  border-radius: 0.5rem;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--aa-body, #2d3748);
}

.dropdown-item.aa-dropdown-link:hover,
.dropdown-item.aa-dropdown-link:focus {
  background: var(--aa-light, #f8f9fa);
  color: var(--aa-red, #e60b00);
}

.dropdown-item.aa-dropdown-link.is-active {
  background: var(--aa-red-soft, rgba(230,11,0,0.06));
  color: var(--aa-red, #e60b00);
  font-weight: 600;
}

/* ── CTA Button (Desktop) ───────────────────────────────────────────── */
.aa-navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.525rem 1.125rem;
  background: var(--aa-red, #e60b00);
  color: #fff !important;
  border-radius: 0.5rem;
  font-size: 0.855rem;
  font-weight: 700;
  text-decoration: none;
  margin-left: 1.25rem;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(230, 11, 0, 0.25);
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}

.aa-navbar__cta i {
  font-size: 0.8rem;
}

.aa-navbar__cta:hover {
  background: var(--aa-red-hover, #c70a00);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(230, 11, 0, 0.35);
  transform: translateY(-1px);
}

/* ── Hamburger Toggle (Mobile) ──────────────────────────────────────── */
.aa-navbar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 150ms ease;
  flex-shrink: 0;
}

.aa-navbar__toggle:hover {
  background: var(--aa-light, #f8f9fa);
}

@media (min-width: 992px) {
  .aa-navbar__toggle { display: none; }
}

.aa-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 16px;
}

.aa-hamburger span {
  display: block;
  height: 2px;
  background: var(--aa-dark, #183153);
  border-radius: 2px;
  transition: all 240ms ease;
}

/* ── Mobile Offcanvas ───────────────────────────────────────────────── */
.aa-mobile-nav {
  width: 300px !important;
  max-width: 85vw !important;
  background: #0f172a;
  border-left: none !important;
  display: flex;
  flex-direction: column;
}

/* Header */
.aa-mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.aa-mobile-nav__brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}

.aa-mobile-nav__brand span {
  color: var(--aa-red, #e60b00);
}

.aa-mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 150ms ease, color 150ms ease;
}

.aa-mobile-nav__close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Body */
.aa-mobile-nav__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* Mobile nav list — vertical stack */
.aa-mobile-nav .aa-nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.aa-mobile-nav .aa-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.375rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.aa-mobile-nav .aa-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.aa-mobile-nav .aa-nav-item.is-active .aa-nav-link {
  color: #fff;
  border-left-color: var(--aa-red, #e60b00);
  background: rgba(230, 11, 0, 0.08);
}

/* Mobile chevron */
.aa-mobile-nav .aa-nav-chevron {
  font-size: 0.7rem;
  opacity: 0.4;
  transition: transform 200ms ease;
}

.aa-mobile-nav .aa-nav-item--has-dropdown.show .aa-nav-chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}

/* Mobile dropdown */
.aa-mobile-nav .dropdown-menu.aa-dropdown {
  position: static !important;
  transform: none !important;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.25rem 0;
  margin: 0;
  width: 100%;
  float: none;
}

.aa-mobile-nav .aa-dropdown-link,
.aa-mobile-nav .dropdown-item.aa-dropdown-link {
  color: rgba(255, 255, 255, 0.45);
  padding: 0.725rem 1.375rem 0.725rem 2.375rem;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.aa-mobile-nav .dropdown-item.aa-dropdown-link:hover,
.aa-mobile-nav .dropdown-item.aa-dropdown-link:focus {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.aa-mobile-nav .dropdown-item.aa-dropdown-link.is-active {
  color: var(--aa-red, #e60b00);
  background: rgba(230, 11, 0, 0.08);
}

/* Footer */
.aa-mobile-nav__footer {
  flex-shrink: 0;
  padding: 1.125rem 1.375rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.aa-mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 180ms ease;
}

.aa-mobile-cta--phone {
  background: var(--aa-red, #e60b00);
  color: #fff;
  box-shadow: 0 3px 12px rgba(230, 11, 0, 0.28);
}

.aa-mobile-cta--phone:hover {
  background: var(--aa-red-hover, #c70a00);
  color: #fff;
}

.aa-mobile-cta--wa {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.aa-mobile-cta--wa:hover {
  background: #25D366;
  color: #fff;
}
