/* AMB168 v1.0.4: compact header, Footer On-Page navigation, full-width article layout and mobile dock. */
html { scroll-padding-top: 96px; }
body.amb168-site .contents { display: none !important; }
body.amb168-site .content-layout {
  --e-con-grid-template-columns: minmax(0, 1fr) !important;
  --column-gap: 0px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  column-gap: 0 !important;
}
body.amb168-site .content-layout > .articles {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.amb-anchor-alias { display: block; width: 1px; height: 1px; scroll-margin-top: 160px; }
.amb-mobile-dock { display: none; }

body.amb168-site .amb-header .amb-nav-primary { display: none !important; }

body.amb168-site .amb-footer .footer-inner {
  align-items: start !important;
}

body.amb168-site .amb-footer-nav .elementor-menu-toggle,
body.amb168-site .amb-footer-nav .elementor-nav-menu--dropdown { display: none !important; }

body.amb168-site .amb-footer-nav .elementor-nav-menu--main {
  display: block !important;
  width: 100% !important;
}

body.amb168-site .amb-footer-nav .elementor-nav-menu--main > ul {
  position: static !important;
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 24px;
}

body.amb168-site .amb-footer-nav .menu-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

body.amb168-site .amb-footer-nav .menu-item::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  margin-right: 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, #f4dfb5, #b98a48);
  box-shadow: 0 0 0 3px rgba(229, 196, 136, 0.08);
  content: '';
}

body.amb168-site .amb-footer-nav .elementor-item {
  display: flex !important;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  padding: 5px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #d8c8ca !important;
  font-size: 0.92rem !important;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  transition: color 180ms ease, transform 180ms ease;
}

body.amb168-site .amb-footer-nav .elementor-item:hover,
body.amb168-site .amb-footer-nav .elementor-item:focus-visible {
  color: #f4dfb5 !important;
  transform: translateX(2px);
}

@media (min-width: 1024px) {
  html { scroll-padding-top: 96px; }

  body.amb168-site .amb-header .header-inner {
    display: flex !important;
    min-height: 88px !important;
    height: 88px !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    padding-block: 0 !important;
  }

  body.amb168-site .amb-header .amb-logo { order: 1; }
  body.amb168-site .amb-header .header-actions {
    order: 2;
    display: flex !important;
    margin-left: auto !important;
  }

  body.amb168-site .amb-footer .footer-inner {
    display: grid !important;
    grid-template-columns: 210px minmax(520px, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px 42px !important;
    align-items: start !important;
    padding-block: 40px !important;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-logo {
    grid-column: 1;
    grid-row: 1;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-p {
    grid-column: 1;
    grid-row: 2;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-footer-nav {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  body.amb168-site .amb-footer .footer-inner > .elementor-widget-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
}

@media (max-width: 1023px) {
  body.amb168-site { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

  body.amb168-site .amb-header .header-inner {
    display: flex !important;
    min-height: 80px !important;
    height: 80px !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  body.amb168-site .amb-header .amb-logo {
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }

  body.amb168-site .amb-footer .footer-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 24px !important;
    padding-block: 32px !important;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-logo {
    grid-column: 1;
    grid-row: 1;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.amb168-site .amb-footer .footer-inner > .amb-footer-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100% !important;
  }

  body.amb168-site .amb-footer .footer-inner > .elementor-widget-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  body.amb168-site .amb-footer-nav .elementor-nav-menu--main > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 20px;
  }

  body.amb168-site .amb-footer-nav .menu-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .amb-mobile-dock {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(70px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(229, 196, 136, 0.28);
    background: rgba(18, 11, 15, 0.97);
    box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(18px) saturate(120%);
  }

  .amb-mobile-dock a {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 11px;
    color: #c4b5b7;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
  }

  .amb-mobile-dock a:hover,
  .amb-mobile-dock a:focus-visible { color: #f4dfb5; background: rgba(229, 196, 136, 0.07); }
  .amb-mobile-dock svg { width: 21px; height: 21px; flex: 0 0 auto; }
  .amb-mobile-dock .is-primary {
    color: #241510;
    background: linear-gradient(145deg, #f4dfb5, #e5c488 62%, #b98a48);
    box-shadow: 0 8px 24px rgba(185, 138, 72, 0.3);
  }
  .amb-mobile-dock .is-primary:hover,
  .amb-mobile-dock .is-primary:focus-visible { color: #241510; background: linear-gradient(145deg, #fff0cf, #e5c488 66%, #b98a48); }
}

@media (max-width: 600px) {
  body.amb168-site .amb-header .header-inner { width: calc(100% - 24px) !important; }
  body.amb168-site .amb-header .amb-logo { width: min(170px, calc(100vw - 94px)) !important; }
  body.amb168-site .amb-footer .footer-inner { width: calc(100% - 36px) !important; }
  body.amb168-site .amb-footer-nav .elementor-item { min-height: 44px; font-size: 0.86rem !important; }
}

@media (max-width: 380px) {
  .amb-mobile-dock { padding-inline: 4px; }
  .amb-mobile-dock a { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.amb168-site .amb-footer-nav .elementor-item { transition: none; }
}
