/* =====================================================================
   Atletico Arten — Phase 1 redesign header (scoped)
   Tokens + header/nav/burger/CTA only. Does not restyle page body.
   Breakpoint: desktop >= 992px; drawer < 992px
   ===================================================================== */

:root {
  --aa-orange: #f05d19;
  --aa-orange-dark: #d94e10;
  --aa-teal: #1d3533;
  --aa-maxw: 1440px;
}

/* Header shell */
.aa-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1060;
  box-shadow: 0 1px 0 rgba(29, 53, 51, 0.06);
  color: var(--aa-teal);
  font-weight: 400;
}

.aa-header a,
.aa-header a:link,
.aa-header a:visited {
  color: inherit;
  text-decoration: none;
}

.aa-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  max-width: var(--aa-maxw);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 1200px) {
  .aa-header__inner {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.aa-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.aa-logo img {
  width: auto;
  height: 44px;
  max-height: 44px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Primary button (header CTA) */
.aa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Open Sans", system-ui, Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  padding: 14px 32px;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.aa-btn--primary {
  background: var(--aa-orange);
  color: #fff !important;
}

.aa-btn--primary:hover,
.aa-btn--primary:focus {
  background: var(--aa-orange-dark);
  color: #fff !important;
}

/* Nav */
.aa-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.aa-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aa-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Open Sans", system-ui, Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--aa-teal) !important;
  white-space: nowrap;
}

.aa-nav__link:hover,
.aa-nav__link:focus,
.aa-nav__item.active > .aa-nav__link {
  color: var(--aa-orange) !important;
}

.aa-caret {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  flex: 0 0 auto;
}

.aa-nav__item > span.aa-nav__link {
  cursor: pointer;
}

.aa-nav__item {
  position: relative;
}

.aa-nav__sublist {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 50;
}

.aa-nav__item--has-children:hover > .aa-nav__sublist,
.aa-nav__item--has-children:focus-within > .aa-nav__sublist {
  display: block;
}

.aa-nav__sublink {
  display: block;
  padding: 8px 16px;
  font-family: "Open Sans", system-ui, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--aa-teal) !important;
  white-space: nowrap;
}

.aa-nav__sublink:hover,
.aa-nav__sublink:focus,
.aa-nav__subitem.active > .aa-nav__sublink {
  color: var(--aa-orange) !important;
}

.aa-nav__cta {
  padding: 14px 40px;
}

.aa-nav__auth {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.aa-nav__logout {
  font-family: "Open Sans", system-ui, Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--aa-orange) !important;
  white-space: nowrap;
}

.aa-nav__logout:hover,
.aa-nav__logout:focus {
  color: var(--aa-orange-dark) !important;
}

/* Burger (mobile only) */
.aa-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.aa-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--aa-teal);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.aa-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.aa-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.aa-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.aa-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 53, 51, 0.45);
  z-index: 1055;
}

/* Disable legacy scroll-shrink header when redesign header is present */
body.trans .aa-header {
  position: sticky;
  border-bottom: 0;
}

body.trans .aa-logo img {
  max-height: 44px;
}

@media (max-width: 991.98px) {
  .aa-burger {
    display: flex;
  }

  .aa-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(320px, 86vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: 88px 24px 24px;
    box-shadow: -12px 0 40px rgba(29, 53, 51, 0.15);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 1060;
    overflow-y: auto;
  }

  .aa-nav.is-open {
    transform: translateX(0);
  }

  .aa-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .aa-nav__link {
    padding: 14px 0;
    border-bottom: 1px solid #eef1ef;
    justify-content: space-between;
    width: 100%;
  }

  .aa-nav__sublist {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 8px 12px;
    border: 0;
    background: transparent;
  }

  .aa-nav__sublink {
    padding: 10px 0;
    border-bottom: 1px solid #f3f5f4;
    white-space: normal;
  }

  .aa-nav__cta,
  .aa-nav__auth {
    margin-top: 20px;
    width: 100%;
  }

  .aa-nav__auth {
    flex-direction: column;
    align-items: stretch;
  }

  .aa-nav__auth .aa-btn {
    width: 100%;
  }

  .aa-nav__logout {
    text-align: center;
    padding: 8px 0;
  }
}
