/* Active Freight — Custom Header v2 */
:root {
  --af-navy: #123f54;
  --af-orange: #f7941d;
  --af-white: #ffffff;
  --af-border: rgba(18,63,84,.10);
  --af-shadow: 0 10px 30px rgba(18,63,84,.08);
}

.af-header-spacer { height: 0; }
.af-header-spacer.af-motion-fixed { height: var(--af-header-height, 86px); }

.af-header {
  width: 100%;
  z-index: 99999;
  height: var(--af-header-height, 86px);
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--af-border);
  box-shadow: var(--af-shadow);
  font-family: "Roboto", Arial, sans-serif;
}

.af-header.af-motion-fixed { position: fixed; top: 0; left: 0; right: 0; }
.af-header.af-motion-sticky { position: sticky; top: 0; }
.af-header.af-motion-normal { position: relative; }

.af-header__inner {
  width: min(92%, 1280px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 22px;
}

.af-header__logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding-left: var(--af-logo-spacing, 0px);
  padding-right: var(--af-logo-spacing, 0px);
  flex: 0 0 auto;
  min-width: 0;
}

.af-header__logo img {
  width: var(--af-logo-width, 196px);
  max-width: 100%;
  height: auto;
  display: block;
}

.af-header__logo--empty { min-height: 1px; }

.af-header__nav { min-width: 0; justify-self: center; }

.af-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: var(--af-menu-gap, 29px);
}

.af-menu > li {
  position: relative;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.af-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--af-menu-color, var(--af-navy)) !important;
  text-decoration: none !important;
  font-size: var(--af-menu-font-size, 15px);
  font-weight: 700;
  letter-spacing: .025em;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}

.af-menu a:hover,
.af-menu a:focus { color: var(--af-menu-hover, var(--af-orange)) !important; transform: translateY(-1px); }

.af-menu ul.sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--af-border);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(18,63,84,.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .2s ease;
}

.af-menu li:hover > ul.sub-menu,
.af-menu li:focus-within > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.af-menu ul.sub-menu a { width: 100%; padding: 9px 10px; }

.af-menu-position-left .af-header__nav { justify-self: start; }
.af-menu-position-right .af-header__nav { justify-self: end; }
.af-menu-position-left .af-menu,
.af-menu-position-right .af-menu { gap: var(--af-menu-gap, 29px); }

.af-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.af-header__buttons { display: flex; align-items: center; gap: 10px; }

.af-header__quote {
  min-height: 44px;
  padding: var(--af-btn-py, 12px) var(--af-btn-px, 23px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--af-btn-border, var(--af-orange));
  border-radius: var(--af-btn-radius, 8px);
  background: var(--af-btn-bg, var(--af-orange));
  color: var(--af-btn-text, #fff) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(247,148,29,.18);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.af-header__quote:hover { filter: brightness(.96); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(18,63,84,.14); }

.af-language { position: relative; flex: 0 0 auto; }
.af-language__button {
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(18,63,84,.14);
  border-radius: 8px;
  background: #fff;
  color: var(--af-navy);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 14px/1 "Roboto", Arial, sans-serif;
  cursor: pointer;
}
.af-language__button:hover,
.af-language.is-open .af-language__button { border-color: var(--af-orange); color: var(--af-orange); }
.af-language__button svg { width: 10px; height: 7px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.af-flag { font-size: 18px; line-height: 1; }
.af-language__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 185px;
  max-height: 360px;
  overflow-y: auto;
  padding: 7px;
  background: #fff;
  border: 1px solid rgba(18,63,84,.10);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(18,63,84,.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition: .2s ease;
}
.af-language.is-open .af-language__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.af-language__dropdown a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: var(--af-navy) !important; text-decoration: none !important; font-size: 14px; font-weight: 600; }
.af-language__dropdown a img,
.af-socials img { width: 20px; height: 20px; object-fit: contain; display: block; }
.af-language__dropdown a:hover,
.af-language__dropdown a.is-active { background: #fff4e9; color: var(--af-orange) !important; }

.af-socials { display: flex; align-items: center; gap: 7px; }
.af-socials a { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--af-navy); text-decoration: none; font-size: 10px; font-weight: 800; overflow: hidden; }
.af-socials a:hover { color: var(--af-orange); background: #fff4e9; }

.af-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.af-header__toggle span { display: block; height: 2px; margin: 5px 0; background: var(--af-navy); border-radius: 10px; transition: .2s ease; }

@media (max-width: 1320px) {
  .af-header__inner { width: 94%; column-gap: 14px; }
  .af-menu { gap: min(var(--af-menu-gap, 29px), 18px); }
  .af-menu a { font-size: min(var(--af-menu-font-size, 15px), 14px); }
  .af-header__quote { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1100px) {
  .af-header__logo img { width: min(var(--af-logo-width, 196px), 170px); }
  .af-menu { gap: 12px; }
  .af-menu a { font-size: 13px; }
  .af-header__actions { gap: 7px; }
  .af-socials { display: none; }
}

@media (max-width: 980px) {
  .af-header { height: var(--af-header-height, 76px); }
  .af-header-spacer.af-motion-fixed { height: var(--af-header-height, 76px); }
  .af-header__inner { width: calc(100% - 28px); display: flex; justify-content: space-between; gap: 8px; }
  .af-header__logo { order: 1; }
  .af-header__toggle { display: block; order: 3; }
  .af-header__actions { order: 2; margin-left: auto; }
  .af-header__nav { position: absolute; top: 100%; left: 0; right: 0; width: 100%; max-height: calc(100vh - var(--af-header-height, 76px)); overflow-y: auto; padding: 18px 20px 28px; background: #fff; border-top: 1px solid var(--af-border); box-shadow: 0 20px 40px rgba(18,63,84,.10); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s ease; }
  .af-header.menu-open .af-header__nav { opacity: 1; visibility: visible; transform: translateY(0); }
  .af-menu, .af-menu-position-left .af-menu, .af-menu-position-right .af-menu { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .af-menu a { width: 100%; padding: 13px 10px; font-size: 15px; }
  .af-menu ul.sub-menu { position: static; display: block; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 15px; min-width: 0; }
  .af-header__quote { display: none; }
  .af-language__dropdown { right: 0; }
  .af-menu-position-left .af-header__nav,
  .af-menu-position-center .af-header__nav,
  .af-menu-position-right .af-header__nav { justify-self: auto; }
}

@media (max-width: 560px) {
  .af-header__inner { width: calc(100% - 20px); }
  .af-header__logo img { width: min(var(--af-logo-width, 154px), 154px); }
  .af-language__button { padding: 0 8px; }
  .af-language__button .af-flag { font-size: 16px; }
}
