<template lang="pug">
  nav
    .l-main-wrapper
      span.nav-toggle
      .logo
        nuxt-link.nuxt-link(to="/")
          figure.picture
            //- img(data-src="~assets/Logo.svg" class="lazyload" alt="Logo Expert")
      ul
        li
          nuxt-link.nuxt-link(to="/") Nosotros
        li
          nuxt-link.nuxt-link(v-on:click.native="setTarget('#professional__wrapper')" to="/medicos") Médicos
        li
          nuxt-link.nuxt-link(to="/pacientes") Pacientes
      .button
        nuxt-link.btn.btn-primary(to="/") Descargar
</template>

<script>
import { mapActions } from 'vuex'

export default {
  methods: {
    ...mapActions(['setTarget'])
  }
}
</script>

<style lang="scss" scoped>
nav {
  width: 100%;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
  position: relative;
  transition-property: all;
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  --transform-translate-x: 0;
  --transform-translate-y: 0;
  --transform-rotate: 0;
  --transform-skew-x: 0;
  --transform-skew-y: 0;
  --transform-scale-x: 1;
  --transform-scale-y: 1;
  transform: translateX(var(--transform-translate-x))
    translateY(var(--transform-translate-y)) rotate(var(--transform-rotate))
    skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y))
    scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));
  .l-main-wrapper {
    display: flex;
    align-content: center;
    height: 100%;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }
  span.nav-toggle {
    font-size: 30px;
    display: inline-block;
    position: absolute;
    top: 20px;
    left: 20px;
  }
  .logo {
    margin: 40px 0 40px 0;
    a {
      padding-bottom: 0px;
    }
  }
  ul {
    display: none;
    flex-direction: column;
    justify-content: center;
    padding-left: 0;
    li {
      list-style-type: none;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      margin: 20px;
      text-align: center;
      border-bottom-style: solid;
      border-bottom-color: #ccc;
      border-bottom-width: 1px;
      padding: 5px 50px;
      &:first-child {
        margin-top: 0;
      }
      &:hover {
        opacity: 1;
      }
    }
  }
}
@media screen and (min-width: 800px) {
  [data-direction='up'] nav {
    --transform-translate-y: 0;
  }
  [data-direction='down'] nav {
    --transform-translate-y: -100%;
  }
  .is-scrolled {
    nav {
      padding: 10px 0;
      box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.05);
    }
  }
  nav {
    padding: 25px 0 10px;
    flex-direction: row;
    position: fixed;
    .l-main-wrapper {
      max-width: 1230px;
    }
    &.is-scrolling {
      box-shadow: 0 2px 10px 0 rgba(5, 5, 5, 0.15);
    }
    .logo {
      margin: 0;
      height: 40px;
    }
    span.nav-toggle {
      display: none;
    }
    ul {
      display: flex;
      justify-content: flex-end;
      width: 80%;
      flex-direction: row;
      li {
        display: inline-block;
        margin: 0 30px 0 0;
        text-align: left;
        border-bottom-style: none;
        padding: 0;
      }
    }
    .button {
      a {
        padding: 12px 22px;
        font-size: 13px;
        font-weight: 500;
        border-radius: 6px;
        position: relative;
        max-width: 100%;
        white-space: normal;
      }
    }
  }
}
@media screen and (min-width: 1400px) {
  nav {
    .l-main-wrapper {
      max-width: 1230px;
    }
  }
}
</style>
