.header-services {
  max-height: 0;
  overflow: hidden;
  background: transparent;
  transition: max-height 0.3s ease;
  width: 100%;
  position: relative;
  backdrop-filter: blur(20px);
  box-shadow: 2px 3px 10.6px -1px #0058ff40;
  margin-top: 10px;
  border-radius: 10px;

  @media (width <= 1024px) {
    position: absolute;
    z-index: 9991;
    left: 0;
    top: 14rem;
    text-align: center;
    height: 100%;
  }
}

.full-menu {
  @media (width <= 1024px) {
    z-index: 999 !important;
  }
}

.header-services.active {
  max-height: 31.25rem;
  z-index: 99999 !important;

  @media (width <= 1024px) {
    max-height: unset !important;
    height: 100vh !important;
    position: fixed !important;
    top: 160px !important;
    left: 0 !important;
    width: 100% !important;
  }
}

.header-services .block {
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.header-services.active .block {
  opacity: 1;
  transform: translateY(0);
  animation: slideInFromTop 0.3s ease forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
}

.header-services.active .block:nth-child(1) {
  --index: 0;
}
.header-services.active .block:nth-child(2) {
  --index: 1;
}
.header-services.active .block:nth-child(3) {
  --index: 2;
}
.header-services.active .block:nth-child(4) {
  --index: 3;
}
.header-services.active .block:nth-child(5) {
  --index: 4;
}
.header-services.active .block:nth-child(6) {
  --index: 5;
}

.header-services .container {
  width: 100% !important;
  position: relative;
  z-index: 1002;
  background: #0058ff;
  border-radius: 10px;
  transition: background-color 0.15s ease-in-out;
  padding: clamp(1.5rem, 4.8vw, 4.5rem) 25px;
  display: flex;
  align-items: center;
  gap: 20px;

  @media (width <= 1024px) {
    width: 95%;
    padding: clamp(1.5rem, 4.8vw, 4.5rem) 1rem;
    background-color: #0058ff;
    flex-direction: column-reverse;
  }
}

.header-services .container > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  @media (width <= 1024px) {
    flex-direction: column-reverse;
    align-items: center;
  }
}

.header-services .container::after {
  display: none;
}

.header-services .container::before {
  display: none;
}

.header-services .container > ul {
  display: flex;
  gap: clamp(1.5rem, 3.2vw, 3rem);
  margin-top: 1rem;

  @media (width <= 1024px) {
    flex-direction: column;
    width: 100%;
  }
}

.header-services .container > ul > li {
  flex-direction: column !important;
}

.header-services .container > ul > li > i {
  display: none;
}

.header-services .container > ul > li > ul {
  list-style: none;
  padding: 0;
  margin-top: 12.8px;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 16px;
}

.header-services .container > ul > li > ul > li a {
  font-size: 16px;
  color: #fff;
  font-weight: 400;
  transition: opacity 0.25s ease-in-out;
  font-family:
    DM Sans,
    sans-serif;
  display: inline-block;

  @media (width <= 1024px) {
    line-height: unset;
    padding: 0;
  }

  &:hover {
    opacity: 0.7;
  }

  @media (width <= 1024px) {
    font-size: 15px;
  }
}

.header-services.active .container > ul > li > a {
  opacity: 0;
  transform: translateY(-10px);
  animation: slideInFromTop 0.3s ease forwards;
  animation-delay: calc(var(--block-index, 0) * 0.1s);
}

.header-services.active .container > ul > li:nth-child(1) > a {
  --block-index: 0;
}
.header-services.active .container > ul > li:nth-child(2) > a {
  --block-index: 1;
}
.header-services.active .container > ul > li:nth-child(3) > a {
  --block-index: 2;
}
.header-services.active .container > ul > li:nth-child(4) > a {
  --block-index: 3;
}
.header-services.active .container > ul > li:nth-child(5) > a {
  --block-index: 4;
}
.header-services.active .container > ul > li:nth-child(6) > a {
  --block-index: 5;
}

.header-services.active .container > ul > li > ul > li {
  opacity: 0;
  transform: translateY(-10px);
  animation: slideInFromTop 0.3s ease forwards;
  animation-delay: calc(
    var(--block-index, 0) * 0.1s + calc(var(--link-index, 0) * 0.05s)
  );
}

.header-services.active .container > ul > li:nth-child(1) > ul > li {
  --block-index: 0;
}
.header-services.active .container > ul > li:nth-child(2) > ul > li {
  --block-index: 1;
}
.header-services.active .container > ul > li:nth-child(3) > ul > li {
  --block-index: 2;
}
.header-services.active .container > ul > li:nth-child(4) > ul > li {
  --block-index: 3;
}
.header-services.active .container > ul > li:nth-child(5) > ul > li {
  --block-index: 4;
}
.header-services.active .container > ul > li:nth-child(6) > ul > li {
  --block-index: 5;
}

.header-services.active .container > ul > li > ul > li:nth-child(1) {
  --link-index: 0;
}
.header-services.active .container > ul > li > ul > li:nth-child(2) {
  --link-index: 1;
}
.header-services.active .container > ul > li > ul > li:nth-child(3) {
  --link-index: 2;
}
.header-services.active .container > ul > li > ul > li:nth-child(4) {
  --link-index: 3;
}
.header-services.active .container > ul > li > ul > li:nth-child(5) {
  --link-index: 4;
}

.header-services .container > ul > li > a {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #fff;
  cursor: default;
  pointer-events: none;
  padding: 0 !important;
  line-height: 30px !important;

  @media (width <= 1024px) {
    font-size: 1.6rem;
  }
}

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

.mobile-nav-link {
  animation: fadeInUp 0.5s forwards;
  opacity: 0;
}

.menu-item-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8.8px;
}

.custom-button {
  color: #fff;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  text-decoration: none;
  opacity: 1;
  line-height: 21px;
  transition: opacity 0.15s ease-in-out;
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding: 0;
  margin-bottom: 11.4px;
  transform: translateX(5px);

  @media (width <= 1024px) {
    font-size: 20px;
  }
}

.dropdown-arrow {
  font-family: "DM Sans", sans-serif;
  display: inline-block;
  content: ">";
  color: #fff;
  transform: translateX(5px) rotate(90deg);
  transition: -webkit-transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
  transition:
    transform 0.2s ease-in-out,
    -webkit-transform 0.2s ease-in-out;
  font-size: 19.2px;
  margin-top: -9px;

  @media (width <= 1024px) {
    font-size: 20px;
  }

  &.active {
    transform: translateX(0) rotate(-90deg);
  }
}

/* Hover no container afeta ambos os elementos */
@media (width >= 1024px) {
  .menu-item-button:hover .custom-button,
  .menu-item-button:hover .dropdown-arrow {
    opacity: 0.7;
  }
}

/* No mobile, remove o hover */
@media (width <= 1024px) {
  .menu-item-button:hover .custom-button,
  .menu-item-button:hover .dropdown-arrow {
    color: #fff;
  }
}

.clutchWidget {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: left center;
  aspect-ratio: 178 / 58;
  background-color: #fff;
  max-width: fit-content;
  width: 14rem;
  height: 5.8rem;
  padding: 0 16px 0 12px;
  transform: scale(0.8) translateY(0.77rem);
  transition: opacity 0.3s ease-in-out;
  border-radius: 0.4rem;
  overflow: hidden;

  &:not(:has(iframe)) {
    opacity: 0;
  }

  &:has(iframe) {
    opacity: 1;
  }
}

.widges {
  display: flex;
  flex-direction: column;
  gap: 0.8125rem;

  & iframe {
    max-width: unset !important;
  }
}

@media (width <= 1024px) {
  .widges {
    margin-top: 2.5625rem;
    align-items: center;
    justify-content: center;
  }

  .widges > div:first-of-type {
    left: 50%;
    transform: translateX(-50%);
    scale: 0.8;
  }
}

@media (max-width: 400px) {
  .widges {
    margin-top: 0.5rem;
    gap: 0.3rem;
  }
}

.widges > div:first-of-type {
  height: 4.8rem;

  @media (width <= 1024px) {
    min-width: 223px;
    height: 65px;
  }
}

.widges > div:last-of-type {
  width: 178px;
  height: 69px;
}

.widges > div:last-of-type > a {
  width: 178px !important;
  height: 69px !important;
}

header {
  z-index: 998;
}

.header-services.active {
  z-index: 1001 !important;
}

.top-mobile {
  height: 72px !important;
  margin-top: 24px !important;
}

.close-menu svg path {
  fill: #fff !important;
}

.top-mobile .logo-mobile {
  display: flex !important;
  align-items: center;
}

.header-services ul li {
  min-height: unset !important;
}
