/* ========================================
   COMPONENT: HEADER (aotheme)
   ======================================== */

.c-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.c-header__inner {
  height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-lg);
}

.c-header__logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  text-decoration: none;
  max-width: 240px;
}

.c-header__logo-img {
  display: block;
  width: auto !important;
  height: 75px !important;
  max-width: 240px;
  object-fit: contain;
}

.c-header__nav {
  display: flex;
  justify-content: center;
}

.c-header__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
}

.c-header__menu li {
  position: relative;
}

.c-header__menu > li {
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.c-header__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px var(--color-shadow);
  display: none;
  z-index: 60;
}

.c-header__menu li:hover > .sub-menu,
.c-header__menu li:focus-within > .sub-menu {
  display: block;
}

.c-header__menu .sub-menu a {
  width: 100%;
  padding: 10px 12px;
  justify-content: flex-start;
  border-radius: 10px;
  background: transparent;
}

.c-header__menu a {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--color-text);
  opacity: 0.92;
  padding: 10px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  transition: color .15s ease, opacity .15s ease, background .15s ease;
}

.c-header__menu a:hover,
.c-header__menu .current-menu-item > a,
.c-header__menu .current-menu-ancestor > a,
.c-header__menu .current_page_item > a,
.c-header__menu .current_page_ancestor > a {
  opacity: 1;
  color: var(--color-primary);
  background: rgba(31, 31, 41, 0.04);
}

.c-header__menu a:focus-visible,
.c-header__social:focus-visible,
.c-header__logo:focus-visible,
.c-header__toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 12px;
}

.c-header__menu-empty {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(31, 31, 41, 0.04);
}

.c-header__socials {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
}

.c-header__socials--mobile {
  display: none;
}

.c-header__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  line-height: 0;
  color: var(--color-text);
  transition: transform .15s ease, color .15s ease, opacity .15s ease, background .15s ease;
  opacity: 0.9;
}

.c-header__social:hover {
  opacity: 1;
  color: var(--color-primary);
  background: rgba(31, 31, 41, 0.04);
  transform: translateY(-1px);
}

.c-header__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.c-header__icon path {
  fill: currentColor;
}

.c-header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.c-header__toggle span {
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.c-header__toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.c-header__toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.c-header__toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.c-header__mobile-panel {
  display: none;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.c-header__mobile-panel.is-open {
  display: block;
}

.c-header__mobile-inner {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.c-header__mobile-menu,
.c-header__mobile-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.c-header__mobile-menu > li + li {
  margin-top: 6px;
}

.c-header__mobile-menu a {
  display: block;
  padding: 12px 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
}

.c-header__mobile-menu .sub-menu {
  padding-left: 14px;
  margin-top: 4px;
}

.c-header__mobile-menu .sub-menu a {
  padding: 8px 0;
  font-size: 15px;
  opacity: .85;
}

@media (max-width: 900px) {
  .c-header__inner {
    grid-template-columns: 1fr auto 1fr;
    height: 72px;
  }

  .c-header__nav,
  .c-header__socials--desktop {
    display: none;
  }

  .c-header__socials--mobile {
    display: inline-flex;
    justify-self: start;
  }

  .c-header__logo {
    justify-self: center;
    max-width: 160px;
  }

  .c-header__logo-img {
    height: 30px !important;
    max-width: 160px;
  }

  .c-header__toggle {
    display: inline-flex;
    justify-self: end;
  }
}