/* Header base styles */
.header {
  height: var(--header-height);
  z-index: 100;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(34, 40, 49, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  transition: background-color .15s ease-in, box-shadow .15s ease-in;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08)
}

.header__nav {
  gap: 1.2500rem;
  height: 100%;
  margin: 0 auto;
  padding-top: 0.2500rem;
  padding-bottom: 0.2500rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.header__logo a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start
}

.header__logo img {
  width: 13rem;
  color: var(--color-primary)
}

.header__menu {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: row
}

.header__menu-nav {
  align-items: center
}

.header__menu-list {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  height: 100%
}

.header__menu-item {
  gap: 0.2500rem;
  color: var(--color-white);
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  position: relative;
  height: 100%;
  cursor: pointer;
  padding: 0 0.5000rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  list-style-type: none
}

.header__menu-item a {
  flex: 1;
  width: 100%;
  height: 100%;
  font-size: var(--fs-sm);
  transition: color .15s ease-in;
  line-height: 1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  justify-content: space-between
}

/* Link underline hover effect */
.header__menu-item a {
  position: relative;
}
.header__menu-item a:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.375rem;
  width: 0%;
  height: 2px;
  background-color: currentColor;
  transition: width .15s ease-in;
}
.header__menu-item:hover a:after {
  width: 100%;
}

.header__menu-item .material-icons {
  font-size: 1.1250rem
}

.header__menu-item:hover a {
  color: var(--color-primary)
}

.header__menu-item:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible
}

.header__menu-follow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative
}

.header__menu-follow__button {
  gap: 0.5000rem;
  color: var(--color-white);
  cursor: pointer;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  font-weight: 500;
  line-height: 1em;
  text-transform: uppercase;
  transition: all .25s ease-in;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.header__menu-follow__button:hover {
  color: var(--color-primary);
  background-color: rgba(255, 18, 18, 0.1);
  transform: translateY(-1px);
}

.header__menu-follow__button .material-icons {
  font-size: 1.1250rem
}

.header__menu-follow .dropdown-menu {
  left: auto;
  right: 0;
  min-width: 25rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background-color: var(--color-white);
}

.header__menu-follow .dropdown-menu:before {
  left: auto;
  right: 1.5000rem
}

.header__menu-follow__social {
  padding: 2rem
}

.header__menu-follow ul {
  gap: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  flex-wrap: wrap
}

.header__menu-follow ul li {
  width: 2.7500rem;
  height: 2.7500rem;
  color: var(--color-bg-header);
  transition: all .2s ease-in
}

.header__menu-follow ul li a {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  border: 1px solid currentColor;
  align-items: center;
  justify-content: center;
  transition: all .2s ease-in
}

.header__menu-follow ul li svg {
  fill: currentColor;
  width: 1.2500rem;
  transition: transform .2s ease-in
}

.header__menu-follow ul li:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.header__menu-follow ul li:hover svg {
  transform: scale(1.1);
}

.header__menu-follow__title {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em
}

.header__menu-follow:hover .header__menu-follow__button {
  color: var(--color-primary-hover)
}

.header__menu-follow:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible
}

.header__search-btn {
  color: var(--color-white);
  cursor: pointer;
  font-size: var(--fs-2xl);
  line-height: 1;
  transition: color .15s ease-in, transform .15s ease-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.06)
}

.header__search-btn:hover {
  color: var(--color-primary-hover);
  transform: translateY(-1px);
  background-color: rgba(255,255,255,0.12)
}

/* Dropdown base used in header */
.dropdown-menu {
  top: calc(100% - 0.7500rem);
  left: 0;
  opacity: 0;
  z-index: 2;
  position: absolute;
  min-width: 13.7500rem;
  transform: translateY(-0.6250rem);
  visibility: hidden;
  box-shadow: var(--shadow-sm);
  background-color: var(--color-white)
}

.dropdown-menu:before {
  content: "";
  position: absolute;
  top: -0.2500rem;
  left: 1.5000rem;
  width: 0.9375rem;
  height: 0.9375rem;
  z-index: -1;
  background: var(--color-white);
  -webkit-clip-path: polygon(0 0, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  transform: rotate(135deg)
}

/* Burger button */
.btn-burger {
  width: 2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column
}

.btn-burger span {
  height: 0.1875rem;
  margin: 0.1875rem 0;
  background: var(--color-white);
  transition: .4s cubic-bezier(.68, -.6, .32, 1.6);
  border-radius: 0.6250rem
}

.btn-burger span:nth-of-type(1) {
  width: 50%
}

.btn-burger span:nth-of-type(2) {
  width: 100%
}

.btn-burger span:nth-of-type(3) {
  width: 75%
}

.btn-burger input[type=checkbox] {
  display: none
}

.btn-burger input[type=checkbox]:checked~span:nth-of-type(1) {
  transform: rotatez(45deg) translate(0.2500rem, 0);
  transform-origin: bottom
}

.btn-burger input[type=checkbox]:checked~span:nth-of-type(2) {
  transform: rotatez(-45deg);
  transform-origin: top
}

.btn-burger input[type=checkbox]:checked~span:nth-of-type(3) {
  width: 50%;
  transform: translate(0.8750rem, -0.2500rem) rotatez(45deg);
  transform-origin: bottom
}

/* Search modal (header) */
.search-modal {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 101;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: transform .35s cubic-bezier(.25, .46, .45, .94), opacity .3s ease, visibility .3s ease;
  background-color: rgba(34, 40, 49, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  will-change: transform, opacity
}

.search-modal--show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.search-modal__close {
  top: 0.8750rem;
  right: 0.8750rem;
  color: var(--color-white);
  cursor: pointer;
  padding: 1rem;
  font-size: 2.4rem;
  position: absolute
}

.search-modal__content {
  width: 90%;
  margin: 0 auto;
  position: relative
}

.search-modal__content .material-icons {
  top: -0.1250rem;
  left: 0;
  color: var(--color-primary);
  position: absolute;
  font-size: 2.1250rem
}

.search-modal input {
  font-size: 1.4em;
  font-weight: 400;
  color: var(--color-white);
  text-transform: capitalize;
  width: 100%;
  height: 100%;
  padding: 0 1rem 1.5rem 4rem;
  background: 0 0;
  border-bottom: 2px solid var(--color-primary)
}

.search-modal input::placeholder {
  color: rgba(255, 255, 255, 0.6)
}


/* Media queries */
@media (min-width:62rem) {
  .header__menu-nav {
      gap: 1.5000rem;
      flex: 1;
      height: 100%
  }

  .header__menu-follow {
      height: 100%
  }

  .header__menu-item .dropdown-menu {
      padding: 1rem 0
  }

  .header__menu-item .dropdown-menu li {
      color: var(--color-text);
      display: block;
      transition: all .15s ease;
      background-color: transparent
  }

  .header__menu-item .dropdown-menu li a {
      color: currentColor;
      padding: 0.7500rem 1.5000rem;
      font-weight: 700;
      text-transform: none
  }

  .header__menu-item .dropdown-menu li:hover {
      color: var(--color-white);
      background-color: var(--color-primary-hover)
  }

  .header__dropdown-menu {
      display: none
  }

  .header__dropdown-menu.dropdown-menu {
      display: block;
      transition: all .15s ease-in
  }

  .header .btn-burger {
      display: none
  }

  .search-modal__close {
      top: 1.5000rem;
      right: 1.5000rem;
      padding: 2rem;
      font-size: 3rem
  }

  .search-modal__content {
      width: 70%
  }

  .search-modal__content .material-icons {
      top: 0.7500rem;
      font-size: 3.1250rem
  }

  .search-modal__content input {
      font-size: 4rem;
      padding: 0 1rem 2rem 6rem
  }
}

@media (max-width:62rem) {
  .header__logo {
      flex: 1;
      z-index: 2;
  }

  .header__menu {
      top: var(--header-height);
      left: 0;
      width: 100%;
      height: calc(100dvh - var(--header-height));
      z-index: 1;
      padding: 2rem 1.5rem 2rem;
      position: fixed;
      overflow-y: auto;
      overflow-x: hidden;
      flex-direction: column;
      background-color: rgba(34, 40, 49, 0.85);
      -webkit-backdrop-filter: saturate(140%) blur(8px);
      backdrop-filter: saturate(140%) blur(8px);
      transform: translateX(-100%);
      transition: transform .35s cubic-bezier(.25, .46, .45, .94), opacity .3s ease;
      opacity: 0;
      will-change: transform, opacity;
  }

  .header__menu--show {
      transform: translateX(0);
      opacity: 1
  }

  .header__menu-nav {
      width: 100%;
      max-width: 28rem;
      margin: 0 auto;
      position: relative
  }

  .header__menu-nav ul {
      flex-direction: column;
      gap: 0.5rem
  }

  .header__menu-nav ul li {
      padding: 0;
      border: none;
      border-radius: 0.75rem;
      opacity: 0;
      transform: translateX(-20px);
      background: rgba(255, 255, 255, 0.02);
      backdrop-filter: blur(10px);
      transition: background-color .2s ease, transform .2s ease;
      position: relative;
      border: 1px solid rgba(255, 18, 18, 0.08)
  }

  .header__menu-nav ul li a {
      padding: 1.25rem 1.5rem;
      border-radius: 0.75rem;
      letter-spacing: .02em;
      display: flex;
      align-items: center;
      gap: 1rem;
      font-size: var(--fs-lg);
      line-height: 1.3;
      font-weight: 700;
      color: var(--color-white);
      position: relative;
      overflow: hidden;
      transition: all .25s cubic-bezier(.4, 0, .2, 1);
      text-transform: uppercase
  }

  .header__menu-nav ul li a:before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 3px;
      height: 100%;
      background: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover), var(--color-primary-alt));
      transform: scaleY(0);
      transform-origin: bottom;
      transition: transform .3s cubic-bezier(.4, 0, .2, 1)
  }

  .header__menu-nav ul li a:after {
      content: "→";
      font-size: 1.5rem;
      opacity: 0;
      color: var(--color-primary);
      transition: all .25s cubic-bezier(.4, 0, .2, 1);
      transform: translateX(-10px);
      margin-left: auto
  }

  .header__menu-nav ul li a:hover,
  .header__menu-nav ul li a:focus {
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.18), rgba(255, 44, 44, 0.12), rgba(255, 69, 69, 0.08));
      transform: translateX(8px);
      color: var(--color-primary-hover);
      box-shadow: 0 4px 20px rgba(255, 18, 18, 0.15), inset 0 0 30px rgba(255, 18, 18, 0.05)
  }

  .header__menu-nav ul li a:hover:before,
  .header__menu-nav ul li a:focus:before {
      transform: scaleY(1)
  }

  .header__menu-nav ul li a:hover:after,
  .header__menu-nav ul li a:focus:after {
      opacity: 1;
      transform: translateX(0)
  }

  @keyframes menuItemSlideIn {
      from {
          opacity: 0;
          transform: translateX(-20px)
      }
      to {
          opacity: 1;
          transform: translateX(0)
      }
  }

  .header__menu--show .header__menu-nav ul li {
      animation: menuItemSlideIn .4s cubic-bezier(.4, 0, .2, 1) forwards
  }

  .header__menu--show .header__menu-nav ul li:nth-child(1) { animation-delay: .05s }
  .header__menu--show .header__menu-nav ul li:nth-child(2) { animation-delay: .10s }
  .header__menu--show .header__menu-nav ul li:nth-child(3) { animation-delay: .15s }
  .header__menu--show .header__menu-nav ul li:nth-child(4) { animation-delay: .20s }
  .header__menu--show .header__menu-nav ul li:nth-child(5) { animation-delay: .25s }
  .header__menu--show .header__menu-nav ul li:nth-child(6) { animation-delay: .30s }
  .header__menu--show .header__menu-nav ul li:nth-child(7) { animation-delay: .35s }
  .header__menu--show .header__menu-nav ul li:nth-child(8) { animation-delay: .40s }
  .header__menu--show .header__menu-nav ul li:nth-child(9) { animation-delay: .45s }
  .header__menu--show .header__menu-nav ul li:nth-child(10) { animation-delay: .50s }

  .header__menu-item--dropdown>.material-icons,
  .header__menu-item--dropdown>a {
      display: none
  }

  .header__menu-item--dropdown ul {
      width: 100%;
      margin-top: 0.5rem;
      padding-left: 1rem;
      border-left: 3px solid;
      border-image: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover), var(--color-primary-alt)) 1;
      background: linear-gradient(90deg, rgba(255, 18, 18, 0.05), transparent)
  }

  .header__menu-item--dropdown ul li {
      background: rgba(255, 255, 255, 0.01);
      margin-bottom: 0.25rem;
      border-left: 2px solid transparent;
      transition: border-color .2s ease
  }

  .header__menu-item--dropdown ul li:hover {
      border-left-color: var(--color-primary-alt);
      background: rgba(255, 18, 18, 0.08)
  }

  .header__menu-item--dropdown ul li:first-child {
      margin-top: 0.5rem
  }

  .header__menu-item--dropdown ul li:last-child {
      margin-bottom: 0
  }

  .header__menu-item--dropdown ul li a {
      font-size: var(--fs-base);
      padding: 0.875rem 1.25rem;
      text-transform: none;
      color: rgba(255, 255, 255, 0.85);
      transition: color .2s ease
  }

  .header__menu-item--dropdown ul li a:hover {
      color: var(--color-primary-hover)
  }

  .header__menu-follow {
      width: 100%;
      max-width: 28rem;
      margin: 2rem auto 0;
      padding-top: 2rem;
      border-top: 2px solid;
      border-image: linear-gradient(90deg, transparent, var(--color-primary), var(--color-primary-hover), transparent) 1;
      position: relative
  }

  .header__menu-follow__button {
      display: none
  }

  .header__menu-follow__title {
      color: var(--color-white);
      font-size: var(--fs-sm);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-bottom: 1.25rem;
      opacity: 0.9
  }

  .header__menu-follow__social {
      padding: 1.75rem 1.5rem;
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.12), rgba(255, 44, 44, 0.08), rgba(255, 69, 69, 0.04));
      border-radius: 0.875rem;
      border: 1px solid rgba(255, 18, 18, 0.2);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 20px rgba(255, 18, 18, 0.1), inset 0 0 40px rgba(255, 18, 18, 0.05)
  }

  .header__menu-follow ul {
      gap: 1rem;
      justify-content: center
  }

  .header__menu-follow ul li {
      color: var(--color-white);
      transition: all .25s cubic-bezier(.4, 0, .2, 1);
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 18, 18, 0.05));
      border-radius: 50%
  }

  .header__menu-follow ul li:hover {
      transform: translateY(-3px);
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.25), rgba(255, 44, 44, 0.15));
      box-shadow: 0 6px 20px rgba(255, 18, 18, 0.25)
  }

  .header__menu-follow ul li a {
      border-color: rgba(255, 255, 255, 0.2);
      transition: border-color .25s ease
  }

  .header__menu-follow ul li:hover a {
      border-color: var(--color-primary);
      box-shadow: 0 0 15px rgba(255, 18, 18, 0.5)
  }

  .header__menu-follow ul li svg {
      transition: filter .25s ease
  }

  .header__menu-follow ul li:hover svg {
      filter: drop-shadow(0 0 5px rgba(255, 18, 18, 0.8))
  }

  .header .btn-burger {
      z-index: 2
  }
}

@media screen and (max-width:62rem) and (prefers-color-scheme:dark) {
  .header__menu-item .dropdown-menu li a {
      color: var(--color-white)
  }

  .header__menu-nav ul li {
      border-color: var(--color-text-secondary)
  }

  .header__menu {
      background-color: rgba(34, 40, 49, 0.85);
      box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6)
  }

  .header__menu-nav ul li a:hover,
  .header__menu-nav ul li a:focus {
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.22), rgba(255, 44, 44, 0.15), rgba(255, 69, 69, 0.10));
      box-shadow: 0 4px 25px rgba(255, 18, 18, 0.3), inset 0 0 30px rgba(255, 18, 18, 0.1)
  }

  .header__menu-item--dropdown ul {
      border-image: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover), var(--color-primary-alt)) 1;
      background: linear-gradient(90deg, rgba(255, 18, 18, 0.08), transparent)
  }

  .header__menu-item--dropdown ul li:hover {
      border-left-color: var(--color-primary-alt);
      background: rgba(255, 18, 18, 0.12)
  }

  .header__menu-follow {
      border-image: linear-gradient(90deg, transparent, var(--color-primary), var(--color-primary-hover), transparent) 1
  }

  .header__menu-follow__social {
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.15), rgba(255, 44, 44, 0.10), rgba(255, 69, 69, 0.06));
      border-color: rgba(255, 18, 18, 0.3);
      box-shadow: 0 4px 25px rgba(255, 18, 18, 0.15), inset 0 0 40px rgba(255, 18, 18, 0.08)
  }

  .header__menu-follow ul li {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 18, 18, 0.08))
  }

  .header__menu-follow ul li:hover {
      background: linear-gradient(135deg, rgba(255, 18, 18, 0.3), rgba(255, 44, 44, 0.2));
      box-shadow: 0 6px 30px rgba(255, 18, 18, 0.5), 0 0 25px rgba(255, 18, 18, 0.4)
  }
}

@media (max-width:36rem) {
  .header__nav {
      gap: 1rem
  }

  .header__logo img {
      width: 10rem
  }

  .header__search-btn {
      font-size: 1.5000rem
  }

  .header__menu-nav {
      max-width: 100%
  }

  .header__menu-nav ul li a {
      padding: 1rem 1.25rem;
      font-size: var(--fs-base)
  }

  .header__menu-follow {
      max-width: 100%;
      margin-top: 1.5rem;
      padding-top: 1.5rem
  }

  .header__menu-follow__social {
      padding: 1.5rem 1rem
  }

  .btn-burger {
      width: 1.4375rem
  }

  .btn-burger span {
      height: 0.1250rem;
      margin: 0.1250rem 0
  }

  .btn-burger input[type=checkbox]:checked~span:nth-of-type(1) {
      transform: rotatez(45deg) translate(0.1250rem, 0)
  }

  .btn-burger input[type=checkbox]:checked~span:nth-of-type(3) {
      transform: translate(0.6250rem, -0.1250rem) rotatez(45deg)
  }
}


