// COLORS USED IN Code-is-science
// Name derived from http://chir.ag/projects/name-that-color/#
@abbey: #4C4C4D;
@bahama-blue: #006699;
@cinnabar: #E7403C;
@curious-blue: #3597D3;
@jaffa: #F47A37;
@gallery: #EEEEEE;
@seashell: #F1F1F1;
@white: #FFF;

body,
html {
  margin: 0;
  padding: 0;
}

body {
  font-family: arial, sans-serif;
  background-color: @white;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/*Main*/
* {
  box-sizing: border-box;
}

#main {
  overflow: auto;
}

main {
  margin-top: 0.5em;
  display: flex;
  flex-grow: 1;

  article {
    margin: 0.5em;
    flex: 1 1;
  }

  .side-menu {
    flex: 0 0 auto;
    width: 100%;

    @media only screen and (min-width: 700px) {
      width: 25%;
    }
  }
}

.side-menu {
  width: 25%;
  min-width: 25vw;
  padding-right: 10px;
  margin-right: 10px;
  margin-top: 1em;
  background-color: @seashell;
  border-radius: 4px;
  border: 2px solid @seashell;
}

.side-menu {
  h2,
  h3,
  p {
    margin-left: 20px;
  }
}

.item {
  padding: 8px;
  margin-top: 7px;
  border-bottom: 1px solid @seashell;
  list-style-type: none;
}

.main {
  float: left;
  width: 60%;
  padding: 0 20px;
  overflow: hidden;
}
/*Media Queries*/
@media only screen and (max-width:700px) {
  /* For mobile phones: */
  .main,
  .side-menu {
    width: 100%;
  }

  main {
    flex-direction: column;
  }
}
/*Main Container*/
.main {
  display: -webkit-flex;
  display: flex;
  width: 80%;
  height: auto;
  background-color: @seashell;
  border-radius: 4px;
  border: 2px solid @seashell;
}

.flex-item {
  margin: 10px;
  padding-left: 5px;
}

.journal {
  -webkit-flex: 2;
  flex: 2;
}

.discipline {
  -webkit-flex: 2;
  flex: 2;
}

.OSS {
  -webkit-flex: 2;
  flex: 2;
}

.list {
  list-style-type: none;
  padding: 0;
  line-height: 4;
}

.list a:link {
  color: @curious-blue;
}

.list a:hover {
  color: @cinnabar;
}
/*Navigation*/

.main-navigation {
  background-color: @bahama-blue;
  overflow: hidden;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.nav-bar > li {
  align-self: center;
  list-style-type: none;

  &.main-logo {
    flex: 0 0 auto;
    width: 100%;

    @media screen and (min-width: 700px) {
      width: 50%;
    }

    @media screen and (min-width:900px) {
      width: 70%;
    }
  }
}

.nav-bar > li a {
  display: block;
  color: white;
  text-decoration: none;
  border-bottom: 3px solid @bahama-blue;
}

.nav-bar > li a:not(.logo) {
  text-align: center;
  padding: 14px 18px;
}

@media all and (max-width: 700px){
  .nav-bar{
	  flex-wrap: wrap;
	  justify-content: flex-start;
  }
}

.nav-bar li a:hover:not(.logo):not(.active) {
  border-bottom: 3px solid @cinnabar;
  color: @cinnabar;
}

.active {
  border-bottom: 3px solid @cinnabar;
}
/*Media Queries*/
@media only screen and (max-width:800px) {
  /* For tablets: */
  .logo {
    margin: 0.5em;
  }

  .journal {
    -webkit-flex: 3;
    flex: 3;
  }

  .discipline {
    -webkit-flex: 3;
    flex: 3;
  }

  .OSS {
    -webkit-flex: 2;
    flex: 2;
  }

  .container {
    width: 100%;
    margin: 0;
  }
}
@media only screen and (max-width:500px) {
  /* For mobile phones: */
  .main,
  .side-menu {
    width: 100%;
  }

  .container {
    width: 100%;
    margin: 0;
  }
}

#main {
  /* Sizing */
  max-width: 1200px;
  width: 90%;
  /* Position */
  position: relative;
  margin: 120px auto 20px;
  /* Flex properties */
  display: flex;
  flex-direction: row;
}
/*Logo*/

.logo {
  margin: 10px 30px;
}

nav {
  z-index: 5;
  /* Flex properties */
  display: flex;
  flex-direction: column;
  /* Material shadow */
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.search {
  margin-top: 23px;
}

/*To avoid conflicts used class instead of type*/
input[type=text] {
  width: 60%;
  padding: 10px 20px;
  border: 2px solid @cinnabar;
  border-radius: 4px;
}

input[type=text]:focus {
  border: 2px solid @curious-blue;
  border-radius: 4px;
}

input.search {
  width: 20%;
  box-sizing: border-box;
  border: 2px solid @curious-blue;
  border-radius: 4px; //  background-image: url('../images/searchicon.png');
  background-position: 5px 10px;
  background-repeat: no-repeat;
  padding: 12px 20px 12px 40px;
  margin-left: 2em;
}

input[type=button] {
  border-radius: 4px;
  padding: 14px 40px;
  background: @cinnabar;
  border: 2px solid @cinnabar;
  text-align: center;
  color: @white;
  font-weight: bold;
  text-transform: uppercase;
}

input[type=button]:hover {
  background: @curious-blue;
  border: 2px solid @curious-blue;
}
/*Headings*/
h2,
h4 {
  color: @abbey;
}

h3 {
  color: @cinnabar;
}
/*Footer*/
.footer-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;

  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;

  background-color: @bahama-blue;
  padding: 20px 0;
  margin-top: 10px;
  color: @white;

  > * {
    padding: 0 0.2em;
    -ms-flex-item-align: center;
    align-self: center;
  }
}

.div-one {
  float: left;
}

.div-one a,
.div-three a,
.div-two a {
  color: @cinnabar;
}

.div-one a:hover,
.div-three a:hover,
.div-two a:hover {
  color: @white;
}

.div-two {
  float: left;
  margin-left: 30%;
}

.div-three {
  float: right;
}

/*Form*/
label {
  float: left;
  width: 5em;
  text-align: right;
  margin-right: 10px;
}

.container {
  margin: 10px auto;
  width: 60%;
  overflow: hidden;
  padding: 30px;
  box-shadow: 0 4px 8px 0 rgba(231,64,60, 0.2), 0 2px 20px 0 rgba(231,64,60, 0.19);
  font-size: 15px;
  border-radius: 4px;
}

.contact-methods {
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  text-align: center;
  list-style: none;

  @media only screen and (min-width: 1200px) {
    // max-width so that in large desktops
    // list does not extend to 100%.
    max-width: 920px;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  li {
    flex: 0 0 auto;
    text-align: center;
    width: 50%;

    // 1200px is added here to allow
    // contact@codeisscience.com not get
    // out of container

    @media only screen and (min-width: 1200px) {
      width: 25%;
    }
  }

  .icon {
    fill: @abbey;
    width: 3em;
    height: 3em;
  }

  .contact-method {
    margin: 0.5em;
    background-color: @gallery;
    padding: 1em;
    border-radius: 2px;
  }

  .contact-link {
    & > a {
      color: @curious-blue;
      font-size: 14px;
      margin-top: 10px;

      &:hover {
        color: @abbey;
      }
    }
  }
}

.footer-links {
  color: @white;

  &:hover {
    color: @jaffa;
  }
}
