header {
  background-color: transparent;
  background-image: none;

  nav.navbar.navbar-default {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    margin: 0;
    padding: 1rem 0;
    transition: background-color 0.3s ease;

    &:hover {
      background-color: white;
    }

    .container {
      display: flex;
      align-items: center;

      @media (max-width: 991px) {
        display: block;
      }

      .navbar-header {
        display: flex;
        flex-direction: row;
        align-items: center;

        &::after,
        &::before {
          display: none;
        }

        @media (min-width: 992px) {
          display: flex;
          flex-direction: column;
        }

        .navbar-brand {
          margin-left: 0;
          padding: 0;

          @media (max-width: 767px) {
            margin-left: 15px;
          }

          img {
            max-height: 100px;
          }
        }

        button.navbar-toggle {
          background-color: transparent !important;
          margin-left: auto !important;
          border: 1px solid var(--color-primary);
          border-radius: 0.25rem;
          margin-bottom: 0;
          margin-right: 15px;
          width: fit-content;

          @media (min-width: 767px) {
            margin-right: 0;
          }

          span {
            background-color: var(--color-primary) !important;
          }
        }
      }

      .navbar-collapse {
        background-color: transparent !important;
        margin-left: auto;
        border: none;

        &.in {
          overflow: inherit;
        }

        @media (max-width: 991px) {
          margin-left: -15px;
        }

        .navbar-right {
          display: flex;
          flex-direction: column;
          margin-right: 0 !important;

          @media (min-width: 992px) {
            flex-direction: row;
            align-items: center;
          }

          > div {
            position: relative;
          }

          > a,
          > div a {
            position: relative;
            border: 1px solid var(--color-primary);
            background-color: var(--color-primary);
            padding: 1rem 2.5rem;
            font-family: "Lato", "Arial", sans-serif;
            font-weight: 600;
            font-size: 13px;
            color: var(--text-color-primary);
            box-shadow: 0 0 8px 1px rgba($color: #000000, $alpha: 0.3);
            transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;

            &:hover {
              color: var(--text-color-secondary) !important;
              background-color: var(--color-secondary);
              border-color: var(--color-secondary);
              box-shadow: 0 0 10px 1px rgba($color: #000000, $alpha: 0.5);

              > span {
                color: var(--text-color-secondary);
              }
            }

            @media (max-width: 991px) {
              display: block;
              width: 100%;
            }

            @media (min-width: 1200px) {
              margin-left: 0.5rem;
            }

            @media (min-width: 992px) and (max-width: 1199px) {
              padding: 1rem 1.75rem;
              font-size: 1.5rem;
              color: var(--color-primary);
              border-color: transparent;
            }

            > span {
              font-weight: 600;
              transition: color 0.3s ease;

              @media (min-width: 992px) and (max-width: 1199px) {
                display: none;
              }
            }

            > i {
              color: var(--text-color-primary);
              display: none;

              @media (min-width: 992px) and (max-width: 1199px) {
                display: block;
              }
            }
          }

          > ul {
            padding: 0;
            display: flex;
            align-items: center;
            margin-right: 1.5rem;

            @media (max-width: 991px) {
              flex-direction: column;
              margin-bottom: 0.75rem;
            }

            > li {
              margin: 0 0.15rem;

              &.dropdown-content {
                display: none;

                @media (min-width: 992px) {
                  display: block;
                }
              }

              &.dropdown-substitute {
                display: block;

                @media (min-width: 992px) {
                  display: none;
                }
              }

              a {
                border: none;
                color: var(--color-primary) !important;
                font-family: "Lato", "Arial", sans-serif;
                font-weight: 600;
                font-size: 16px;
                text-transform: uppercase !important;
                text-decoration: none;

                &:not(.dropdown-link) {
                  position: relative;
                  padding: 7px 0.5rem;
                }

                &::after {
                  display: none;
                }

                &:hover {
                  color: var(--color-secondary) !important;
                }

                &[data-bs-toggle="dropdown"] {
                  display: flex;
                  align-items: center;

                  i {
                    margin-left: 0.5rem;
                  }
                }
              }

              .dropdown-menu {
                top: 95%;

                @media (max-width: 768px) {
                  left: 50% !important;
                  right: auto !important;
                  transform: translateX(-50%);
                }
              }
            }
          }
        }
      }
    }
  }

  nav.navbar-default.scrolled .navbar-brand {
    padding: 0;
    background-color: transparent;

    img {
      max-height: inherit;
      width: inherit;
    }
  }
}

@media (max-width: 991px) {
  .navbar-header {
    float: none;
  }
  .navbar-left,
  .navbar-right {
    float: none !important;
  }
  .navbar-toggle {
    display: block;
  }
  .navbar-collapse {
    border-top: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  .navbar-fixed-top {
    top: 0;
    border-width: 0 0 1px;
  }
  .navbar-collapse.collapse {
    display: none !important;
  }
  .navbar-nav {
    float: none !important;
    margin-top: 7.5px;
  }
  .navbar-nav > li {
    float: none;
  }
  .navbar-nav > li > a {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .collapse.in {
    display: block !important;
  }
}
