/* Avertis Group — mobile layer. Loaded on every page; desktop untouched. */

img, svg { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }

#avx-burger { display: none; }

@media (max-width: 980px) {
  /* --- Nav bar --- */
  #avx-nav > div {
    min-height: 64px !important;
    padding: 10px clamp(18px, 5vw, 28px) !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
  }
  #avx-logo { height: 23px !important; }

  #avx-burger {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    margin-right: -10px;
    padding: 0 10px;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  #avx-burger span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: #ffffff;
    transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .2s ease, background .3s ease;
  }
  #avx-burger[data-solid="1"] span { background: #10162A; }
  html.avx-open #avx-burger span { background: #ffffff !important; }
  html.avx-open #avx-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  html.avx-open #avx-burger span:nth-child(2) { opacity: 0; }
  html.avx-open #avx-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  html.avx-open #avx-nav {
    background: #080C1E !important;
    border-bottom-color: rgba(255,255,255,.14) !important;
    backdrop-filter: none !important;
  }
  html.avx-open, html.avx-open body { overflow: hidden !important; }

  /* --- Drawer --- */
  #avx-links {
    position: fixed !important;
    top: 64px; left: 0; right: 0; bottom: 0;
    display: none !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    background: #080C1E !important;
    padding: 8px clamp(18px, 5vw, 28px) calc(28px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  html.avx-open #avx-links { display: flex !important; }

  #avx-links > a:not([data-btn]) {
    display: block !important;
    padding: 19px 2px !important;
    border-bottom: 1px solid rgba(255,255,255,.11) !important;
    color: rgba(255,255,255,.9) !important;
    font-size: 15px !important;
    letter-spacing: 1.9px !important;
  }
  #avx-links > a[data-btn] {
    justify-content: center !important;
    width: 100% !important;
    padding: 17px 22px !important;
    font-size: 12.5px !important;
    letter-spacing: 1.6px !important;
  }
  #avx-links > a[data-btn]:first-of-type { margin-top: 26px !important; }
  #avx-links > a[data-btn] + a[data-btn] { margin-top: 12px !important; }
  #avx-links > a[data-btn]:not([style*="background:#3B4DF5"]) {
    color: #fff !important;
    border-color: rgba(255,255,255,.42) !important;
  }
  #avx-links > span { display: none !important; }
}

@media (max-width: 720px) {
  /* --- Hero --- */
  header#top { min-height: auto !important; }
  header#top > div:last-of-type {
    padding-top: 112px !important;
    padding-bottom: 54px !important;
  }
  header#top h1 { letter-spacing: -.9px !important; }

  /* --- Rhythm --- */
  section { padding-top: clamp(44px, 9vw, 60px) !important; padding-bottom: clamp(44px, 9vw, 60px) !important; }

  /* --- Multi-column list rows (roles, filings, tables) --- */
  a[style*="grid-template-columns:minmax(0,2.4fr)"],
  div[style*="grid-template-columns:minmax(0,2.4fr)"] {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    padding: 20px 0 !important;
  }
  a[style*="grid-template-columns:minmax(0,2.4fr)"] > svg,
  div[style*="grid-template-columns:minmax(0,2.4fr)"] > svg { display: none !important; }
  a[style*="grid-template-columns:minmax(0,2.4fr)"] > div:first-child {
    font-size: 17px !important;
    margin-bottom: 3px !important;
  }

  /* --- Media blocks --- */
  div[style*="height:clamp(280px"], div[style*="height:clamp(240px"] { height: 230px !important; }

  /* --- CTA buttons full width --- */
  section a[style*="padding:17px 32px"] {
    justify-content: center !important;
    width: 100% !important;
  }

  /* --- Footer --- */
  footer > div > div:first-child { gap: 30px !important; }
  footer p { font-size: 12px !important; }
  footer div[style*="white-space:nowrap"] { white-space: normal !important; }

  /* --- Forms --- */
  input, select, textarea, button { font-size: 16px !important; max-width: 100% !important; }
}

@media (max-width: 420px) {
  #avx-links > a:not([data-btn]) { padding: 17px 2px !important; font-size: 14.5px !important; }
}

/* --- Nav button hover (wins over the scroll script's inline colours) --- */
@media (hover: hover) {
  #avx-links > a[data-btn]:first-of-type:hover {
    background: #2A39C9 !important;
    color: #ffffff !important;
  }
  #avx-links > a[data-btn]:last-of-type:hover {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #10162A !important;
  }
  #avx-links > a:not([data-btn]):hover { color: #3B4DF5 !important; }
}
