/* ASK-ME — hero contrast, content inset, video size, kontakt layout (WCAG AA). */

/* -------------------------------------------------------------------------
   1) Hero pill / kicker on dark hero: light text (desktop+).
      Homepage had .ah-hero-inner { color:#071f38 } outside the mobile
      light-card media query, so .ah-kicker inherited dark navy on dark bg.
   ------------------------------------------------------------------------- */
html body .ah-hero .ah-kicker {
  color: #ffffff !important;
}

/* -------------------------------------------------------------------------
   2) Content inset after full-bleed heroes.
      Pages zero .wp-block-post-content horizontal padding for full-bleed
      heroes; .askme-training-intro had no max-width / padding of its own.
   ------------------------------------------------------------------------- */
.askme-training-intro {
  width: 100%;
  max-width: 1200px;
  margin: 28px auto 12px;
  padding: 0 24px;
  box-sizing: border-box;
}

.askme-training-intro-card {
  box-sizing: border-box;
  padding: 22px 26px;
  border-radius: 18px;
}

.askme-training-summary {
  margin: 0;
}

@media (max-width: 767px) {
  .askme-training-intro {
    margin: 20px auto 8px;
    padding: 0 16px;
  }

  .askme-training-intro-card {
    padding: 18px 16px;
    border-radius: 14px;
  }
}

/* -------------------------------------------------------------------------
   3) Desktop: undo leaked mobile light-card rules on homepage hero links/
      buttons (were outside @media in page CSS → dark text on dark photo).
      Solid light cards for AA ≥ 4.5:1, consistent with white CTA.
   ------------------------------------------------------------------------- */
@media (min-width: 721px) {
  html body.page-id-35 .ah-hero .ah-hero-inner {
    color: #ffffff !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body.page-id-35 .ah-hero .ah-kicker {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.36) !important;
  }

  html body.page-id-35 .ah-hero h1 {
    color: #ffffff !important;
  }

  html body.page-id-35 .ah-hero .lead {
    color: #f1f8ff !important;
  }

  html body.page-id-35 .ah-hero .ah-btn.askme-short-contact {
    color: #132c38 !important;
    background: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 8px 22px rgba(3, 22, 39, 0.22) !important;
  }

  html body.page-id-35 .ah-hero .ah-btn.secondary {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: unset !important;
    gap: 12px !important;
    width: auto !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    width: auto !important;
    min-width: min(280px, 100%) !important;
    min-height: 48px !important;
    padding: 12px 17px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #071f38 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links a:hover,
  html body.page-id-35 .ah-hero .ah-hero-links a:focus-visible {
    background: #ffffff !important;
    border-color: #ffffff !important;
    outline: 3px solid #ead5a0 !important;
    outline-offset: 3px !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links .ah-link-arrow {
    color: #071f38 !important;
  }
}

/* Mobile light card (homepage): keep dark text on near-white card + solid link cards */
@media (max-width: 720px) {
  html body.page-id-35 .ah-hero-inner {
    color: #071f38 !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-inner .ah-kicker {
    color: #0b5fad !important;
  }

  html body.page-id-35 .ah-btn.askme-short-contact,
  html body.page-id-35 .ah-btn.secondary {
    color: #071f38 !important;
    background: #ffffff !important;
    border: 2px solid #071f38 !important;
    box-shadow: none !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(7, 31, 56, 0.28) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #071f38 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }

  html body.page-id-35 .ah-hero .ah-hero-links .ah-link-arrow {
    color: #071f38 !important;
  }
}

/* -------------------------------------------------------------------------
   4) Homepage vertical video — enlarge on desktop; full container on mobile.
      preload=none leaves intrinsic 300×150 until play → force 9:16 box.
   ------------------------------------------------------------------------- */
html body.page-id-35 .ah-video-box {
  width: min(460px, 100%) !important;
  max-width: 460px !important;
  margin-inline: auto !important;
  padding: 12px !important;
  border-radius: 28px !important;
  background: #06182b !important;
  box-sizing: border-box !important;
}

html body.page-id-35 .ah-video-box video {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 80vh !important;
  aspect-ratio: 9 / 16 !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  border-radius: 18px !important;
  background: #000 !important;
}

@media (min-width: 900px) {
  html body.page-id-35 .ah-video-grid {
    grid-template-columns: minmax(280px, 460px) minmax(0, 1fr) !important;
    gap: 48px !important;
    align-items: center !important;
  }

  html body.page-id-35 .ah-video-box {
    width: 460px !important;
    max-width: 460px !important;
    margin-inline: 0 !important;
  }
}

@media (max-width: 899px) {
  html body.page-id-35 .ah-video-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  html body.page-id-35 .ah-video-box {
    width: 100% !important;
    max-width: min(420px, 100%) !important;
  }
}

/* -------------------------------------------------------------------------
   5) Kontakt hero — mobile light-card rules were NOT wrapped in @media,
      so desktop got bg-size:auto 220px + gray fill + left white card.
      Restore full-bleed cover hero on desktop; keep card layout on mobile.
   ------------------------------------------------------------------------- */
@media (min-width: 768px) {
  html body.page-id-37 .ak-contact .ak-hero,
  html body.page-id-37 .ak-hero {
    min-height: 660px !important;
    height: auto !important;
    padding: 80px 0 !important;
    display: flex !important;
    align-items: center !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-wrap,
  html body.page-id-37 .ak-hero .ak-wrap {
    width: min(1180px, calc(100% - 40px)) !important;
    margin: 0 auto !important;
  }

  html body.page-id-37 .ak-contact .ak-hero-card,
  html body.page-id-37 .ak-hero-card {
    width: auto !important;
    max-width: 690px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #ffffff !important;
    text-align: left !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-kicker,
  html body.page-id-37 .ak-hero .ak-kicker {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
  }

  html body.page-id-37 .ak-contact .ak-hero h1,
  html body.page-id-37 .ak-hero h1 {
    color: #ffffff !important;
    font-size: clamp(46px, 5.2vw, 74px) !important;
    line-height: 1.02 !important;
    max-width: 680px !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-lead,
  html body.page-id-37 .ak-hero .ak-lead {
    color: rgba(255, 255, 255, 0.91) !important;
    font-size: 20px !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-actions,
  html body.page-id-37 .ak-hero .ak-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: unset !important;
    gap: 12px !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-btn,
  html body.page-id-37 .ak-hero .ak-btn {
    width: auto !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-btn-light,
  html body.page-id-37 .ak-hero .ak-btn-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-btn-primary,
  html body.page-id-37 .ak-hero .ak-btn-primary {
    color: #10284a !important;
    background: #d7a928 !important;
  }
}

@media (max-width: 767px) {
  html body.page-id-37 .ak-contact .ak-hero,
  html body.page-id-37 .ak-hero {
    min-height: 0 !important;
    padding: 160px 14px 28px !important;
    background-size: cover !important;
    background-position: center top !important;
    background-color: #eef3f7 !important;
  }

  html body.page-id-37 .ak-contact .ak-hero-card,
  html body.page-id-37 .ak-hero-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 22px 18px !important;
    border: 1px solid rgba(21, 42, 78, 0.1) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 12px 32px rgba(8, 25, 55, 0.14) !important;
    color: #263b57 !important;
  }

  html body.page-id-37 .ak-hero .ak-kicker {
    color: #765900 !important;
    background: #fff3c8 !important;
  }

  html body.page-id-37 .ak-hero h1 {
    color: #10284a !important;
    font-size: clamp(28px, 7.5vw, 36px) !important;
  }
}

/* -------------------------------------------------------------------------
   6) Kontakt body layout — mobile .ak-wrap / grid / steps leaked WITHOUT
      @media in page CSS, so desktop got width:calc(100%-28px) (left≈14px)
      and single-column cards. Restore content-width wrap + 3-col grids.
   ------------------------------------------------------------------------- */
@media (min-width: 768px) {
  /* Match .askme-training-intro inset (max 1200 + 24px pad) so cards align under 7/7. */
  html body.page-id-37 .ak-contact .ak-section > .ak-wrap,
  html body.page-id-37 .ak-section > .ak-wrap,
  html body.page-id-37 .ak-final > .ak-wrap {
    width: min(1200px, 100%) !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
  }

  html body.page-id-37 .ak-contact .ak-grid,
  html body.page-id-37 .ak-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body.page-id-37 .ak-contact .ak-steps,
  html body.page-id-37 .ak-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body.page-id-37 .ak-contact .ak-final-inner,
  html body.page-id-37 .ak-final-inner {
    flex-direction: row !important;
    align-items: center !important;
  }

  html body.page-id-37 .ak-contact .ak-contact-intro,
  html body.page-id-37 .ak-contact-intro {
    max-width: 900px !important;
  }
}

@media (max-width: 767px) {
  html body.page-id-37 .ak-contact .ak-wrap,
  html body.page-id-37 .ak-wrap {
    width: calc(100% - 28px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body.page-id-37 .ak-contact .ak-hero .ak-wrap,
  html body.page-id-37 .ak-hero .ak-wrap {
    width: 100% !important;
  }
}
