/* ==========================================================================
   Page frame: container, header, navigation, mobile menu, footer. LAYOUT FILE.
   Desktop page margin 120 px, mobile 20 px. Header 84 / 64 px.
   ========================================================================== */

.ah-container {
  width: 100%;
  max-width: var(--ah-content-max);
  margin: 0 auto;
  padding-left: clamp(var(--ah-page-margin-mobile), 8.4vw, var(--ah-page-margin));
  padding-right: clamp(var(--ah-page-margin-mobile), 8.4vw, var(--ah-page-margin));
}

.ah-section {
  padding-top: var(--ah-section-gap);
  padding-bottom: var(--ah-section-gap);
}

.ah-band {
  background: var(--ah-beige);
}

/* ---------- Logo ---------- */

.ah-logo {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 1px;
  font-weight: 800;
  white-space: nowrap;
}

.ah-logo__mark {
  width: 42px;
  height: 38px;
  color: var(--ah-logo-orange);
  flex-shrink: 0;
}

.ah-logo__a {
  color: var(--ah-logo-dark);
}

.ah-logo__b {
  color: var(--ah-logo-orange);
}

.ah-logo--footer {
  gap: 11px;
  font-size: 20px;
}

.ah-logo--footer .ah-logo__mark {
  width: 35px;
  height: 32px;
}

/* ---------- Header ---------- */

.ah-header {
  position: relative;
  z-index: 50;
  background: var(--ah-white);
  border-bottom: 1px solid var(--ah-line);
}

.ah-header__inner {
  max-width: var(--ah-content-max);
  margin: 0 auto;
  height: var(--ah-header-height);
  padding: 0 clamp(var(--ah-page-margin-mobile), 8.4vw, var(--ah-page-margin));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ah-header__logo {
  display: inline-flex;
  text-decoration: none;
}

.ah-nav__list {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ah-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ah-nav__link {
  color: var(--ah-text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.ah-nav__link:hover {
  color: var(--ah-orange-text);
}

.ah-nav__toggle,
.ah-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ah-text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.ah-nav__toggle[aria-expanded="true"] svg,
.ah-lang[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Dropdown panel. Not on the board: kept deliberately plain in the board style. */
.ah-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: -20px;
  display: flex;
  gap: 32px;
  min-width: 240px;
  margin: 0;
  padding: 18px 20px;
  list-style: none;
  background: var(--ah-white);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius-card);
  box-shadow: 0 18px 40px rgba(27, 23, 20, 0.08);
}

.ah-dropdown[hidden] {
  display: none;
}

.ah-dropdown__column {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ah-dropdown__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--ah-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ah-dropdown__link:hover {
  color: var(--ah-orange-text);
}

.ah-dropdown--lang {
  right: -10px;
  left: auto;
  flex-direction: column;
  gap: 0;
  min-width: 180px;
}

.ah-lang__flag {
  display: inline-flex;
}

.ah-lang__flag img {
  width: 22px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(27, 23, 20, 0.12);
}

/* ---------- Burger and mobile menu ---------- */

.ah-burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
}

.ah-burger__lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ah-burger__lines span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ah-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ah-burger[aria-expanded="true"] .ah-burger__lines span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.ah-burger[aria-expanded="true"] .ah-burger__lines span:nth-child(2) {
  opacity: 0;
}

.ah-burger[aria-expanded="true"] .ah-burger__lines span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Not on the board: full-width panel under the header, same links stacked. */
.ah-mobile-menu {
  border-top: 1px solid var(--ah-line);
  padding: 8px var(--ah-page-margin-mobile) 28px;
  background: var(--ah-white);
}

.ah-mobile-menu[hidden] {
  display: none;
}

.ah-mobile-menu__list,
.ah-mobile-menu__sub,
.ah-mobile-menu__langs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ah-mobile-menu__item {
  border-bottom: 1px solid var(--ah-line);
}

.ah-mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  color: var(--ah-text);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.ah-mobile-menu__link::-webkit-details-marker {
  display: none;
}

.ah-mobile-menu__group[open] > .ah-mobile-menu__link svg {
  transform: rotate(180deg);
}

.ah-mobile-menu__sub {
  padding: 0 0 14px;
}

.ah-mobile-menu__sub a {
  display: block;
  padding: 9px 0;
  color: var(--ah-grey);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.ah-mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.ah-mobile-menu__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

@media (max-width: 960px) {
  .ah-container {
    padding-left: var(--ah-page-margin-mobile);
    padding-right: var(--ah-page-margin-mobile);
  }

  .ah-header__inner {
    height: var(--ah-header-height-mobile);
    padding: 0 var(--ah-page-margin-mobile);
  }

  /* A bit larger on phones (Timo, 12 Nov 2026). */
  .ah-logo {
    gap: 9px;
    font-size: 18px;
  }

  .ah-logo__mark {
    width: 31px;
    height: 28px;
  }

  .ah-nav {
    display: none;
  }

  .ah-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ah-section {
    padding-top: var(--ah-section-gap-mobile);
    padding-bottom: var(--ah-section-gap-mobile);
  }
}

@media (min-width: 961px) {
  .ah-mobile-menu {
    display: none !important;
  }
}

/* ---------- Footer ---------- */

.ah-footer {
  flex-grow: 1;
  background: var(--ah-beige);
  border-top: 1px solid var(--ah-line);
  color: var(--ah-grey);
  font-size: 15px;
}

.ah-footer__inner {
  max-width: var(--ah-content-max);
  margin: 0 auto;
  padding: 56px clamp(var(--ah-page-margin-mobile), 8.4vw, var(--ah-page-margin)) 40px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.ah-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
}

.ah-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ah-footer__brand a {
  text-decoration: none;
}

.ah-footer__address {
  line-height: 1.6;
}

.ah-footer__column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ah-footer__title {
  color: var(--ah-text);
  font-weight: 700;
}

.ah-footer__column ul,
.ah-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ah-footer a {
  color: var(--ah-grey);
  text-decoration: none;
  line-height: 1.4;
}

.ah-footer a:hover {
  color: var(--ah-orange-text);
}

.ah-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ah-line);
  font-size: 14px;
}

.ah-footer__legal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 22px;
}

@media (max-width: 960px) {
  .ah-footer {
    font-size: 14px;
  }

  .ah-footer__inner {
    padding: 32px var(--ah-page-margin-mobile);
    gap: 20px;
  }

  .ah-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .ah-footer__brand {
    grid-column: 1 / -1;
  }

  .ah-footer__column,
  .ah-footer__column ul {
    gap: 8px;
  }

  .ah-footer__bottom {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px;
    padding-top: 16px;
    font-size: 13px;
  }

  .ah-footer__legal {
    gap: 14px;
  }
}

/* ---------- Funnel frame (page-blank-header-minimal.php, board T3) ---------- */

.ah-header__call {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--ah-text);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.ah-header__call svg {
  color: var(--ah-orange-text);
}

/* Funnel header: phone on the right on every width (desktop with label and number). */
.ah-header--minimal .ah-header__call {
  display: inline-flex;
  gap: 10px;
}

.ah-header__callnum {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ah-header__callnum small {
  color: var(--ah-grey);
  font-size: 13px;
  font-weight: 600;
}

.ah-header__callnum strong {
  font-size: 18px;
  font-weight: 800;
}

.ah-header--minimal .ah-header__call:hover strong {
  color: var(--ah-orange-text);
}

.ah-footer--minimal .ah-footer__inner {
  padding-top: 24px;
  padding-bottom: 24px;
}

.ah-footer--minimal .ah-footer__legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px 28px;
  font-size: 14px;
}

.ah-funnel {
  padding-top: 56px;
  padding-bottom: 64px;
}

.ah-funnel__inner,
.ah-content.ah-content--funnel {
  max-width: 1120px;
  margin: 0 auto;
}

/* Fallback (no flow id found): old Elementor content, centred like the embed. */
.ah-content--funnel .elementor,
.ah-content--funnel .elementor-section,
.ah-content--funnel .e-con,
.ah-content--funnel .e-con-inner,
.ah-content--funnel .elementor-container,
.ah-content--funnel heyflow-wrapper,
.ah-content--funnel iframe {
  max-width: 860px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Heyflow embed, centred like on pflichtteilshero.de */
.ah-funnel__flow {
  max-width: 860px;
  min-height: 620px;
  margin: 0 auto;
  padding: 0 24px;
}

.ah-funnel__flow heyflow-wrapper {
  display: block;
  width: 100%;
}

html:has(.ah-funnel__flow) {
  scroll-padding-top: calc(var(--ah-header-height) + 16px);
}

@media (max-width: 960px) {
  /* Funnel on phones: no phone number in the header (Timo, 21 Oct 2026). */
  .ah-header--minimal .ah-header__call {
    display: none;
  }

  .ah-footer--minimal .ah-footer__legal {
    gap: 8px 14px;
    font-size: 13px;
  }

  .ah-footer--minimal .ah-footer__copy {
    flex-basis: 100%;
    text-align: center;
  }

  /* Phones: the flow brings its own top spacing (Timo, 12 Nov 2026). */
  .ah-funnel {
    padding-top: 0;
    padding-bottom: 32px;
  }

  .ah-funnel__flow {
    padding: 0;
  }
}
