/****************************************************************************** 
* Footer
******************************************************************************/

  .footer {

    ul {
      margin-left: 0;
      padding-left: 0;

      li {
        list-style-type: none;
      }
    }

    .container {
      align-items: center;
      display: flex;
      justify-content: flex-start;
    }
  }

/****************************************************************************** 
* Footer Widgets
******************************************************************************/

  .footer-widgets {
    background-color: $color-900;
    padding: 4rem 0 3rem 0;

    p, 
    h6 {
      color: $white;
    }

    ul {
      list-style-type: none;
      margin: 0;
      padding: 0;

      li {
        margin-bottom: 1rem;
      }
    }

    a {
      border-bottom: 1px dotted rgba($white, 0.24);
      color: rgba($white, 0.48);
      padding-bottom: 0.125rem;
      text-decoration: none;

      &:hover,
      &:focus,
      &:active {
        color: $color-200;
      }
    }

    .container {
      display: block;
    }

    .widgets {
      align-items: flex-start;
      border-bottom: 1px solid rgba($white, 0.12);
      display: flex;
      grid-gap: 2rem;
      justify-content: space-between;
      margin-bottom: 3rem;
      padding-bottom: 2rem;

      &:last-of-type {
        border-bottom: 0;
        margin-bottom: 0;
        padding-bottom: 0;
      }

      .widgets-container {
        flex: 1 1;
      }
    }
  }

/****************************************************************************** 
* Footer Gallery
******************************************************************************/

  .footer-gallery {
    background-color: $white;
    padding: 3rem 0;

    .container {
      max-width: 100vw;

      .widgets {
        margin: 0 auto;
        overflow: hidden;
        position: relative;
        width: $container-width - 64px;
      }
    }

    .gallery-outer {

      &::before {
        bottom: 1rem;
        box-shadow: 0 0 1rem 1px $grey-500;
        content: '';
        height: 65%;
        left: -1rem;
        position: absolute;
        width: 1rem;
        z-index: 10;
      }

      &::after {
        bottom: 1rem;
        box-shadow: 0 0 1rem -1px $grey-500;
        content: '';
        height: 65%;
        position: absolute;
        right: -1rem;
        width: 1rem;
        z-index: 10;
      }

      .gallery {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        min-height: 10rem;
        width: 9999px;

        figure {
          cursor: pointer;
          margin: 0 4rem;
        }
      }
    }
  }

/****************************************************************************** 
* Footer Menu
******************************************************************************/

  .footer-menu {
    background-color: $color-800;

    ul.footer-menu  {
      align-items: center;
      background-color: transparent;
      display: flex;
      height: 60px;
      justify-content: flex-start;
      margin: 0;
      /*border-left: 1px solid rgba($black, 0.12);*/
      padding: 0;

      li {
        border-right: 1px solid rgba($black, 0.12);
        border-top: 1px solid rgba($black, 0.06);
        position: relative;
      }

      a {
        align-items: center;
        color: $color-200;
        display: flex;
        height: 60px;
        justify-content: center;
        padding: 1rem;
        text-decoration: none;
        &:hover,
        /*&:focus,*/
        &:active {
          background-color: rgba($black, 0.24);
          color: $color-200;
        }
      }

      li.menu-item-has-children,
      li.page_item_has_children {

        a {
          padding-right: 2rem;
        }

        > a:after {
          align-items: center;
          color: $color-400;
          content: '\f107';
          display: flex;
          font-family: 'FontAwesome';
          height: 60px;
          position: absolute;
          right: 1rem;
          top: 0;
        }

        a.current-menu-item {
          background-color: rgba($black, 0.24);
          color: $color-100;

          &::after {
            content: '\f106';
          }
        }
      }
    }

    ul.sub-menu,
    ul.children {
      align-items: flex-start;
      background-color: $color-800;
      // border-top: 1px solid rgba($black, 0.06);
      bottom: 60px;
      display: none;
      flex-direction: column;
      justify-content: flex-start;
      margin: 0;
      min-width: 15rem;
      padding: 0;
      position: absolute;

      li {
        flex: 1 1;
        white-space: nowrap;
      }

      a {
        background-color: rgba($black, 0.12);
        color: $color-300;
        justify-content: flex-start;

        &:hover,
        &:focus,
        &:active {
          background-color: rgba($black, 0.06);
        }
      }

      ul.sub-menu,
      ul.children {
        bottom: 100%;
        left: 0;
        /* Horizontal Version */
        /*border-left: 0;*/
        /*left: calc(100% + 1px);*/
      }
    }
  }

/****************************************************************************** 
* Footer Brand
******************************************************************************/

  .footer-brand {
    font-size: 2rem;
    font-weight: 700;

    .brand-name {
      display: none;
    }

    .brand-name-first-letter {
      line-height: 0;
    }

    .site-brand a {
      align-items: center;
      background-color: rgba($black, 0.12);
      border: 1px solid rgba($black, 0.06);
      border-bottom: 0;
      color: $color-200;
      display: flex;
      height: 60px;
      justify-content: center;
      padding: 0;
      text-decoration: none;
      text-shadow: 2px 2px rgba($black, 0.24);
      width: 60px;
    }
  }

/****************************************************************************** 
* Footer Copyright
******************************************************************************/

  .footer-copyright {
    background-color: $grey-100;
    border-top: 1px solid rgba($black, 0.06);
    color: $black;
    padding: 2rem 0;

    .site-credits {
      align-items: center;
      display: flex;
      justify-content: space-between;
      width: 100%;
    }

    p {
      line-height: 2;
      margin: 0;
    }

    a {
      color: $color-800;
      text-decoration: none;
      white-space: nowrap;

      &:hover,
      &:focus,
      &:active {
        color: $color-600;
      }
    }

    .back-top-short {
      display: none;
    }
  }

/****************************************************************************** 
* Footer Mobile
******************************************************************************/

  @media (max-width: $breakpoint-tablet) {

    .footer {

      .container {
        flex-direction: column;
        max-width: 100vw;
        padding: 0;
      }

      .menu {
        width: 100%;
      }
    }

    .footer-widgets {
      padding: 2rem 0 1rem 0;

      .container {
        padding: 0 2rem;
      }

      .widgets {
        flex-wrap: wrap;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        /* flex-direction: column; Uncomment if you want to have 1 column Widgets */

        &:last-of-type {
          margin-bottom: 0;
        }

        .widgets-container {
          flex: 1 0 calc(50% - 2rem) !important; /* Overwrite index.js calculated column width */

          ul, 
          p {
            margin-bottom: 0;
          }
        }
      }
    }

    .footer-gallery {

      .container {

        .widgets {
          max-width: auto;
          width: calc(100% - 4rem);
        }
      }
    }

    .footer-menu {
      flex-direction: column;
      position: relative;

      ul.footer-menu {
        height: auto;

        li {
          border-right: 0;
          border-top: 1px solid rgba($black, 0.06);
          width: 100%;

          a {
            justify-content: flex-start;
            padding: 2rem;
          }
        }

        li.menu-item-has-children,
        li.page_item_has_children {

          > a:after {
            right: 2rem;
            top: 0.3rem;
          }
        }
      }

      ul.sub-menu,
      ul.children {
        position: static;
      }
    }

    .footer-brand {
      background-color: rgba($black, 0.12);
      border-bottom: 0.125rem solid rgba($black, 0.24);
      border-top: 0.125rem solid rgba($black, 0.24);
      font-size: 1.5rem;
      width: 100%;

      .brand-name {
        display: block;
      }

      .brand-name-first-letter {
        display: none;
      }

      .site-brand a {
        background-color: transparent;
        border: 0;
        margin: 0 auto;
        padding: 2rem;
        width: 100%;
      }
    }

    .footer-copyright {
      padding: 2rem 2rem 1.5rem 2rem;

      .back-top-long {
        display: none;
      }
      
      .back-top-short {
        display: inline-block;
      }
    }
  }

  @media (max-width: $breakpoint-mobile) {

    .widgets {
      flex-direction: column;
    }

    .site-credits {
      flex-direction: column;
      text-align: center;
    }
  }
