/* AI24Solutions UI Stability v1
   Site-wide responsive stability layer loaded after existing styles.
   Goals: sticky header, stable CTA interaction states, Academy contrast,
   mobile assistant footprint, and footer brand readability.
*/

/* ---- Sticky navigation / anchor offsets ---- */
html{
  scroll-padding-top:84px;
}
.header{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:0!important;
  z-index:1800!important;
  isolation:isolate;
}
.mobile-nav.open{
  z-index:1790!important;
}

/* ---- CTA / button geometry must not change after tap/click ---- */
a.btn,
button.btn,
input.btn{
  box-sizing:border-box;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  vertical-align:middle;
  line-height:1.2!important;
  text-decoration:none;
  -webkit-appearance:none;
  appearance:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
a.btn:not(.btn-small),
button.btn:not(.btn-small),
input.btn:not(.btn-small){
  min-height:48px;
}
a.btn:hover,
a.btn:focus,
a.btn:active,
button.btn:hover,
button.btn:focus,
button.btn:active,
input.btn:hover,
input.btn:focus,
input.btn:active{
  transform:none!important;
}
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active{
  color:#fff!important;
}
a.btn-dark:link,
a.btn-dark:visited,
a.btn-dark:hover,
a.btn-dark:focus,
a.btn-dark:active{
  color:#fff!important;
}

/* ---- Corporate Academy: light cards need dark readable copy ---- */
.academy-corporate-page .cards .card{
  background:#f8fafc!important;
  border-color:rgba(16,24,40,.10)!important;
  color:#172033!important;
}
.academy-corporate-page .cards .card h2,
.academy-corporate-page .cards .card h3,
.academy-corporate-page .cards .card h4,
.academy-corporate-page .cards .card strong{
  color:#172033!important;
}
.academy-corporate-page .cards .card p,
.academy-corporate-page .cards .card li{
  color:#667085!important;
}
.academy-corporate-page .cards .card .card-icon{
  color:#fff!important;
}

/* ---- Footer brand must remain visible on the light footer ---- */
.footer .logo,
.footer .logo:link,
.footer .logo:visited,
.footer .logo:hover,
.footer .logo:focus,
.footer .logo:active,
.footer .logo>span:last-child{
  color:#172033!important;
}

/* ---- Assistant launcher: keep it useful without dominating mobile content ---- */
.ai24a .ai24a-launcher,
.ai24a-root .ai24a-launcher{
  touch-action:manipulation!important;
}

@media (max-width:760px){
  html{
    scroll-padding-top:72px;
  }

  .ai24a .ai24a-launcher,
  .ai24a-root .ai24a-launcher{
    right:14px!important;
    bottom:calc(16px + env(safe-area-inset-bottom, 0px))!important;
    width:54px!important;
    min-width:54px!important;
    height:54px!important;
    min-height:54px!important;
    padding:0!important;
    gap:0!important;
    border-radius:50%!important;
    transform:none!important;
    box-shadow:0 14px 34px rgba(45,42,103,.25)!important;
  }

  .ai24a .ai24a-launcher:hover,
  .ai24a-root .ai24a-launcher:hover{
    transform:none!important;
  }

  .ai24a .ai24a-launcher-label,
  .ai24a-root .ai24a-launcher-label{
    display:none!important;
  }

  .ai24a .ai24a-launcher svg,
  .ai24a-root .ai24a-launcher svg{
    width:24px!important;
    height:24px!important;
  }

  .footer{
    padding-bottom:calc(82px + env(safe-area-inset-bottom, 0px))!important;
  }

  .academy-corporate-page .cards .card{
    min-height:0!important;
  }
}

@media (min-width:761px){
  .header{
    top:0!important;
  }
}

/* AI24 mobile assistant cookie clearance v14.6.1 */
@media (max-width: 760px) {
  body:has(.cookie.show) .ai24a .ai24a-launcher,
  body:has(.cookie.show) .ai24a-root .ai24a-launcher {
    bottom: calc(128px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
