@font-face {
  font-family: 'Boldonse';
  src: url('/assets/fonts/Boldonse-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Archivo Black';
  src: url('/assets/fonts/Archivo_Black/ArchivoBlack-Regular.ttf')
    format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: 'Inter', sans-serif;
  color: #404040;
  font-size: 1.6rem;
  line-height: 1.4;
  background-color: #f4f5f7;
  letter-spacing: 0.01rem;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

a:visited,
a:link {
  color: inherit;
  text-decoration: none;
}

.secao {
  padding: 9.54rem 2rem;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  /* background-color: rgb(129, 255, 3); */
}

:root {
  --container-max-width: 112rem;
  --layout-inline-padding: max(
    2rem,
    calc((100vw - var(--container-max-width)) / 2)
  );
  --laranja-hashimoto: #ff6200;
  --azul-Fonte: #24236a;
  --fonte-body: #404040;
  --secao-azul: linear-gradient(to right, #0b2c44, #061622);
}

.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--laranja-hashimoto);
  padding: 1.5rem;
  border-radius: 1rem;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.138);
}

.botao:hover {
  background-color: #ff6d2f;
}

header {
  --header-inline-padding: var(--layout-inline-padding);
  --header-block-padding: 3rem;
  --header-overlay-bleed: 1.4rem;
  background-color: #ffffff;
  padding: var(--header-block-padding) var(--header-inline-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8rem;
  z-index: 2000;

  &.header-at-top {
    background-color: transparent;
    height: auto;
    margin-top: 3px;
    padding: 1.6rem var(--header-inline-padding);
  }

  &.header-at-top::before {
    content: '';
    position: absolute;
    top: 0.6rem;
    bottom: 0.6rem;
    left: max(
      0.8rem,
      calc(var(--header-inline-padding) - var(--header-overlay-bleed))
    );
    right: max(
      0.8rem,
      calc(var(--header-inline-padding) - var(--header-overlay-bleed))
    );
    background-color: #ffffff22;
    backdrop-filter: blur(0.8rem);
    border-radius: 1.2rem;
    z-index: 0;
  }

  &.header-at-top > * {
    position: relative;
    z-index: 1;
  }

  &.header-at-top > .nav-completo {
    position: static;
  }

  & .nav-completo {
    display: flex;
    align-items: center;
    gap: 4rem;
  }

  & img {
    z-index: 1000;
  }

  & .header-logo {
    position: relative;
    z-index: 1000;
  }

  & .menu-toggle {
    border: 0;
    background: transparent;
    cursor: pointer;
    display: none;
  }

  & .menu-toggle img {
    width: 2.8rem;
    height: 2.8rem;
    display: block;
  }

  & .menu-open {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 1rem;
    align-items: center;
    justify-content: center;
    background-color: var(--laranja-hashimoto);
    box-shadow:
      0 0 0.5rem 0.1rem rgba(0, 0, 0, 0.15),
      inset 0 0 0.4rem 0.1rem rgba(0, 0, 0, 0.1);
  }

  & .menu-backdrop {
    display: none;
  }

  & .container-icons {
    display: flex;
    flex-flow: column;
    gap: 2.5rem;
  }

  & .p-descrcao-icon {
    font-size: 1.6rem;
    font-weight: 400;
    color: #404040;
    margin-top: 0.5rem;
  }

  & .icon-servico {
    width: 4rem;
    height: 4rem;
    background-color: #f15922;
    border-radius: 1rem;
  }

  & .header-itens {
    font-size: 1.65rem;
    display: flex;
    gap: 5rem;
    font-weight: 600;
  }

  & .header-drop {
    position: static;
  }

  & .header-drop > ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.2rem;
    position: absolute;
    background-color: #ffffff;
    left: var(--header-inline-padding);
    right: var(--header-inline-padding);
    top: calc(100% - var(--header-block-padding));
    width: auto;
    padding: 2.4rem 2rem;
    z-index: 999;
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.8rem);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0s linear 0.22s;
  }
  & .header-drop:is(:hover, :focus-within) > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  & .item-icon {
    min-width: 16rem;
    height: 100%;
    padding: 3rem;
    border-radius: 1rem;
    border-right: 1px solid rgba(0, 0, 0, 0.063);
  }
  & .item-icon > .header-link {
    display: block;
    width: 100%;
    height: 100%;
  }
  & .item-icon:last-child {
    border-right: 0;
  }
  & .item-icon:hover {
    background-color: #e9e9e9;
  }

  & .header-link {
    text-decoration: none;
    color: var(--azul-Fonte);
  }

  & .dropdown-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
  }

  & .header-link:hover,
  & .header-link:active {
    color: var(--laranja-hashimoto);
  }

  &.header-at-top .header-itens > li > .header-link,
  &.header-at-top .header-itens > li > .header-link:hover,
  &.header-at-top .header-itens > li > .header-link:active {
    color: #ffffff;
  }

  &.header-at-top .header-drop > ul {
    background-color: #ffffff;
    backdrop-filter: none;
  }

  &.header-at-top .item-icon {
    border-right-color: rgba(0, 0, 0, 0.063);
  }

  &.header-at-top .item-icon:hover {
    background-color: #e9e9e9;
  }

  &.header-at-top .header-drop > ul .icon-texto p:not(.p-descrcao-icon) {
    color: inherit;
  }

  &.header-at-top .header-drop > ul .p-descrcao-icon {
    color: #404040;
  }

  &.header-at-top.header-hover-active {
    background-color: #ffffff;
    height: 8rem;
    margin-top: 0;
    padding: var(--header-block-padding) var(--header-inline-padding);
  }

  &.header-at-top.header-hover-active::before {
    content: none;
  }

  &.header-at-top.header-hover-active .header-itens > li > .header-link {
    color: var(--azul-Fonte);
  }

  &.header-at-top.header-hover-active .header-itens > li > .header-link:hover,
  &.header-at-top.header-hover-active .header-itens > li > .header-link:active {
    color: var(--laranja-hashimoto);
  }

  &.header-at-top.header-hover-active .header-drop > ul {
    background-color: #ffffff;
    backdrop-filter: none;
  }

  &.header-at-top.header-hover-active .item-icon {
    border-right-color: rgba(0, 0, 0, 0.063);
  }

  &.header-at-top.header-hover-active .item-icon:hover {
    background-color: #e9e9e9;
  }

  &.header-at-top.header-hover-active
    .header-drop
    > ul
    .icon-texto
    p:not(.p-descrcao-icon) {
    color: inherit;
  }

  &.header-at-top.header-hover-active .header-drop > ul .p-descrcao-icon {
    color: #404040;
  }

  & .header-botao {
    display: flex;
    gap: 1.3rem;
    align-items: center;
    justify-content: center;
    background-color: var(--laranja-hashimoto);
    color: white;
    font-weight: 600;
    padding: 1rem 3.4rem;
    border-radius: 1rem;
    letter-spacing: 0.1rem;
    box-shadow:
      0 0 0.5rem 0.1rem rgba(0, 0, 0, 0.15),
      inset 0 0 0.4rem 0.1rem rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
  }
  & .header-botao:hover {
    color: white;
    background-color: #ff6d2f;
  }

  & .servico-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
  }

  & .servico-header::after {
    content: '\25BE';
    font-size: 1.6rem;
    line-height: 1;
    color: currentColor;
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.22s ease;
  }

  & .header-drop:is(:hover, :focus-within) .servico-header::after {
    transform: rotate(180deg);
  }

  & .icon-servico {
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }

  & .icon-servico::before {
    content: '';
    width: 2.2rem;
    height: 2.2rem;
    background-image: url('/assets/icons/street-lamp-arm.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: brightness(0) invert(1);
  }

  & .item-icon:nth-child(2) .icon-servico::before {
    background-image: url('/assets/icons/engineering.svg');
  }

  & .item-icon:nth-child(3) .icon-servico::before {
    background-image: url('/assets/icons/solar-panel-2.svg');
  }

  & .item-icon:nth-child(4) .icon-servico::before {
    background-image: url('/assets/icons/construction.svg');
  }
  & .svg-header:hover {
    fill: #f15922;
  }
}

@media (max-width: 980px) {
  body.header-menu-open {
    overflow: hidden;
  }

  header {
    transition:
      transform 0.24s ease,
      opacity 0.24s ease;
    will-change: transform;

    &.header-at-top > .nav-completo,
    &.menu-aberto > .nav-completo {
      position: fixed;
    }

    &.header-mobile-hidden {
      transform: translateY(calc(-100% - 1rem));
      opacity: 0;
      pointer-events: none;
    }

    &.header-at-top {
      height: 8rem;
      margin-top: 0;
      padding: var(--header-block-padding) var(--header-inline-padding);
      --header-overlay-bleed: 0rem;
    }

    &.header-at-top::before {
      left: var(--header-inline-padding);
      right: var(--header-inline-padding);
    }

    & .menu-open {
      display: flex;
      position: relative;
      z-index: 2102;
    }

    &.menu-aberto .menu-open {
      display: none;
    }

    & .menu-close {
      display: flex;
      width: 4.4rem;
      height: 4.4rem;
      border-radius: 1rem;
      align-items: center;
      justify-content: center;
      align-self: flex-end;
      background-color: rgba(255, 255, 255, 0.14);
    }

    & .menu-backdrop {
      position: fixed;
      inset: 0;
      border: 0;
      background: rgba(3, 12, 20, 0.56);
      z-index: 2100;
      cursor: pointer;
    }

    &.menu-aberto .menu-backdrop {
      display: block;
    }

    & .nav-completo {
      position: fixed;
      right: 0;
      top: 0;
      bottom: 0;
      width: min(36rem, 86vw);
      min-height: 100dvh;
      padding: 2rem;
      background: linear-gradient(180deg, #0b2c44 0%, #082238 100%);
      display: flex;
      flex-flow: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 2.2rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      z-index: 2101;
      transform: translateX(102%);
      opacity: 0;
      pointer-events: none;
      transition:
        transform 0.28s ease,
        opacity 0.28s ease;
    }

    &.menu-aberto .nav-completo {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
    }

    & nav {
      width: 100%;
    }

    & .header-itens {
      flex-direction: column;
      gap: 2rem;
      width: 100%;
    }

    & .header-link,
    &.header-at-top .header-itens > li > .header-link,
    &.header-at-top .header-itens > li > .header-link:hover,
    &.header-at-top .header-itens > li > .header-link:active {
      color: #ffffff;
      font-size: 2rem;
      display: inline-flex;
      align-items: center;
    }

    & .header-link:hover,
    & .header-link:active,
    & .header-link:focus,
    & .header-link:focus-visible {
      color: #ffffff;
    }

    & .container-header-botao {
      width: 100%;
    }

    & .header-botao {
      width: 100%;
      justify-content: center;
      padding: 1.2rem 2rem;
    }

    & .header-drop {
      position: relative;
    }

    & .header-drop > .dropdown-toggle {
      color: #ffffff;
    }

    & .header-drop:is(:hover, :focus-within) > .dropdown-toggle {
      color: #ffffff;
    }

    & .header-drop .servico-header::after {
      transform: rotate(0deg);
    }

    & .header-drop:is(:hover, :focus-within) .servico-header::after {
      transform: rotate(0deg);
    }

    & .header-drop.menu-dropdown-open > .dropdown-toggle {
      color: var(--laranja-hashimoto);
    }

    & .header-drop.menu-dropdown-open .servico-header::after {
      transform: rotate(180deg);
    }

    & .header-drop ul {
      position: static;
      left: auto;
      right: auto;
      top: auto;
      width: 100%;
      background: transparent;
      border-radius: 0;
      margin-top: 0.5rem;
      padding: 0;
      box-shadow: none;
      z-index: auto;
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      visibility: visible;
      max-height: 0;
      opacity: 0;
      transform: none;
      overflow: hidden;
      pointer-events: none;
      transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
    }

    & .header-drop.menu-dropdown-open ul {
      max-height: 200rem;
      opacity: 1;
      pointer-events: auto;
      padding-top: 0.4rem;
      overflow: visible;
    }

    & .item-icon {
      border-right: 0;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 1rem;
      padding: 1.6rem;
      background-color: rgba(255, 255, 255, 0.06);
    }

    & .item-icon:hover {
      background-color: rgba(255, 255, 255, 0.16);
    }

    & .icon-texto p {
      color: #ffffff;
    }

    & .p-descrcao-icon {
      color: rgba(255, 255, 255, 0.78);
    }
  }
}
