@import url('https://fonts.googleapis.com/css?family=PT+Sans|PT+Serif&display=swap');

/* Variables */
:root {
  --NAED-blue: #b2ccec;
  --header-height: 7.5rem;
  --header-height-mobile: 5.5rem;
  --footer-height: 6.375rem;
  --footer-height-mobile: 4.375rem;
  --pt-helvetica: sans-serif, helvetica, verdana;
  --pt-sans: 'PT Sans', sans-serif;
}

/* Typography */
* {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: rgb(0, 0, 0);
}

.italic {
  font-style: italic;
}

.bold {
  font-weight: bold;
}

html {
  font-size: 100%;
}

body {
  line-height: 1.4;
}

h1,
h2,
h4 {
  margin-top: 0;
}

h1 {
  font-size: 2.6rem;
  margin-bottom: 2.8rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1.6rem;
}

h4 {
  font-size: 1.2rem;
  margin-bottom: 0;
}

p {
  margin-top: 0;
  margin-bottom: 1.4rem;
  font-size: 1.2rem;
}

ul {
  font-size: 1.2rem;
}

/* Header */
header {
  position: fixed;
  display: flex;
  min-height: var(--header-height);
  height: fit-content;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background-color: var(--NAED-blue);

  aside {
    padding: 1rem;
    height: fit-content;
    width: fit-content;
    margin-left: 5rem;

    .logo-text {
      font-style: italic;
      font-family: var(--pt-helvetica);
      font-size: 2.625rem;
      margin: 0;
    }

    .logo-text-desc {
      font-style: italic;
      font-family: var(--pt-sans);
      font-size: 1.1rem;
    }
  }

  #toggle-menu-button {
    display: none;
  }

  nav {
    margin-right: 7rem;
    width: fit-content;
    height: fit-content;

    ul {
      li {
        display: inline;
        margin: 0 0.9rem;
        font-family: var(--pt-sans);
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 1px;
      }
    }

    a {
      &.selected {
        color: red;
      }
    }
  }
}

/* Hem */
#hem {
  display: flex;
  width: 100%;
  min-height: 100vh;
  height: fit-content;

  background-image: url('../images/apartments-background.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;

  div {
    margin: auto;
    width: 100%;
    padding: 0.7%;

    font-family: var(--pt-sans);
    text-align: center;
    color: white;
    background-color: black;

    h2 {
      margin-bottom: 1rem;
    }

    h3 {
      font-size: 1.755rem;
    }
  }
}

/* Tjänster */
#tjanster {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  height: fit-content;

  background-image: url('../images/window.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;

  h2 {
    margin-left: 10%;
    padding-top: 2.5rem;
    padding-left: 2.5rem;
    width: fit-content;
    font-family: var(--pt-sans);
  }

  article {
    margin-left: 10%;
    width: 30rem;
    padding: 2.5rem;
    padding-top: 0;
    font-family: var(--pt-sans);

    ul li {
      list-style-position: outside;
      margin-left: 1em;
    }
  }
}

/* Om */
#om {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 0 2rem;
  width: 100%;
  min-height: 100vh;
  height: fit-content;

  background-color: black;
  color: white;

  div {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    padding: 0 2.5rem;
    margin-top: var(--header-height);

    h2 {
      font-family: var(--pt-sans);
    }

    article {
      width: 27rem;
      font-family: var(--pt-sans);
      text-align: left;
    }
  }

  img {
    box-sizing: border-box;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 20rem;
  }
}

/* Kontakt */
#kontakt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  height: fit-content;

  background-image: url('../images/window.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;

  h2 {
    margin-left: 10%;
    padding-top: 2.5rem;
    padding-left: 2.5rem;
    width: fit-content;
    font-family: var(--pt-sans);
  }

  h2 {
    margin-top: var(--header-height);
    font-family: var(--pt-sans);
    text-align: center;
    font-style: normal;
  }

  address {
    margin-left: 10%;
    width: 40rem;
    padding: 2.5rem;
    padding-top: 0;
    height: fit-content;

    font-family: var(--pt-sans);
    font-style: normal;

    p {
      margin-bottom: 0;
      font-weight: bold;
    }

    a {
      display: inline-block;
      margin-bottom: 1.4rem;
      text-decoration: none;
      color: #0000ee;
    }
  }
}

/* Footer */
footer {
  display: flex;
  width: 100%;
  height: var(--footer-height);
  background-color: var(--NAED-blue);

  p {
    margin: auto;
    padding: 1rem;
    width: fit-content;
    height: fit-content;
    text-align: center;
    font-size: 1rem;
    font-family: var(--pt-sans);
  }
}

/* Mobile specific styles */
@media (width <= 900px) {
  header {
    min-height: 5.5rem; /* TODO: CSS variable */
    justify-content: center;

    aside {
      padding: initial;
      margin: initial;
    }

    #toggle-menu-button {
      display: initial;
      position: absolute;
      right: 0;
      padding: 1.7rem;
      border: none;
      background-color: transparent;

      img {
        width: 1.75rem;
        height: 2rem;
      }

      &.showMenu {
        background-color: rgba(0, 0, 0, 0.2);
      }

      &:hover {
        cursor: pointer;
      }

      &:focus {
        outline: none;
      }
    }

    nav {
      display: none;
      position: absolute;
      margin-right: 0;
      top: 5.5rem; /* TODO: CSS variable */
      width: 100%;
      background-color: rgba(0, 0, 0, 0.8);
      color: #b2ccec; /* TODO: CSS variable */
    }

    ul li {
      list-style: none;
      margin: 0 !important;
      font-size: 1.1rem !important;
      letter-spacing: 1px;
      text-align: right;

      &:hover {
        cursor: pointer;
        background-color: #b2ccec; /* TODO: CSS variable */

        a {
          color: black;
        }
      }

      a {
        box-sizing: border-box;
        display: block;
        width: 100%;
        padding: 1rem;
        color: #b2ccec; /* TODO: CSS variable */

        &.selected {
          color: red;
        }
      }
    }
  }

  #hem div {
    h2 {
      padding: 0 !important;
      margin-top: 1.6rem !important;
    }
  }

  article {
    width: initial !important;
    margin-left: initial !important;
  }

  h2 {
    margin-left: initial !important;
    padding-top: 0 !important;
    margin-top: 5.5rem !important; /* TODO: CSS variable */
  }

  #om div {
    padding: 0 !important;
    margin-top: 0 !important;
  }

  address {
    width: initial !important;
    margin-left: 0 !important;
  }

  footer {
    height: 4.375rem; /* TODO: CSS variable */
  }
}
