@use "~bootstrap/scss/bootstrap";
@use "~simplebar/dist/simplebar";
@use "~ekko-lightbox/dist/ekko-lightbox";
@use "sass:meta";

//@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap');
//@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');

$text-grey: #676465;
$text-darkest-grey: #231F20;
$text-dark-grey: #414042;
$text-medium-grey: #808080;
$text-light-grey: #E6E7E8;
$text-yellow: #FFDE17;
$text-orange: #F15A29;
$text-light-orange: #F8941D;
$text-blue: #00A79D;
$text-green: #C8FF23;
$bg-blue: #172B4C;
$footer-grey: #939598;

@mixin center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

*, *:before, *:after {
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, fill 0.15s ease-in-out;
}

body {
  font-family: "Fira Sans Condensed", sans-serif;
  color: $text-dark-grey;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)), url('/images/background.png') right center no-repeat fixed;
  font-size: 0.9rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
  color: $text-orange;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.1;
  color: $text-blue;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.1;
  color: inherit;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.1;
  color: $text-orange;
}

h5 {
  font-size: 1rem;
  line-height: 1.1;
  color: $text-blue;
}

h6 {
  font-size: 1rem;
  line-height: 1.1;
  color: inherit;
}

a {
  text-decoration: underline;
  color: $text-orange;

  &:hover {
    text-decoration: none;
    color: $text-orange;
  }
}

hr {
  border-color: #000000;
}

img[style*='float:left'], img[style*='float: left'] {
  margin: 0 1rem 0.5rem 0;
}

img[style*='float:right'], img[style*='float: right'] {
  margin: 0 0 0.5rem 1rem;
}

a.readmore {
  color: $text-orange;
  text-transform: uppercase;
  text-decoration: none;

  [class*="fa-"] {
    color: #ffffff;
  }

  &:hover {
    text-decoration: underline;
  }
}

blockquote {
  background: $text-blue;
  padding: 1rem 1rem 1rem 4rem;
  font-size: 1.25rem;
  color: #ffffff;
  position: relative;
  font-weight: normal;
  overflow: hidden;
  border-radius: 2rem 0 2rem 0;

  p {
    position: relative;
    z-index: 2;
  }

  p:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  &:before {
    content: "“";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 10rem;
    line-height: 1;
    opacity: 0.3;
    z-index: 1;
  }

  //&:after {
  //  content: "”";
  //  position: absolute;
  //  right: 0.5rem;
  //  bottom: -0.5rem;
  //  font-size: 8rem;
  //  line-height: 0;
  //  opacity: 0.3;
  //  z-index: 1;
  //}

  &.blockquoteLeft {
    margin: 1rem;
  }

  &.blockquoteRight {
    margin: 1rem;
  }

  .blockquoteAuthor {
    text-align: right;
    color: #ffffff;
    font-style: normal;
  }
}

.main-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  position: relative;

  > div {
    display: flex;
    margin-left: auto;
  }

  h1 {
    margin: 0;
    display: flex;
    max-width: 100%;

    a {
      flex-shrink: 1;

      img {
        max-width: 100%;
      }
    }
  }

  .socialmedia-links {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    margin-right: 2rem;

    a {
      color: inherit;
    }
  }

  button.navbar-toggler {
    background-color: $text-blue;
    color: #ffffff;
    border-radius: 0;

    &:hover {
      background-color: #000000;
    }
  }

  .navbar {
    width: 100%;
    position: absolute;
    flex-basis: 100%;
    flex-grow: 1;
    flex-shrink: 0;
    z-index: 100;
    color: #ffffff;
    max-width: 600px;
    right: 0;
    bottom: -1rem;
  }

  .navbar div.navbar-collapse {
    background: $text-blue;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .navbar li {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    border-top: 1px solid #ffffff;
  }

  .navbar > div > ul > li:first-child {
    border-top: none;
  }

  .navbar > div > ul > li:last-child {
    border-bottom: 1px solid #ffffff;
  }

  .navbar > div.navbar-collapse {
    padding: 2rem;
  }

  .navbar a.nav-link {
    color: #ffffff;
    padding: 0.5rem 1rem;
    flex-grow: 1;
    text-decoration: none;
  }

  .navbar a.nav-link:hover, .navbar a.nav-link:active, .navbar a.nav-link.active {
    color: #000000;
  }

  .navbar a.nav-link + button {
    flex-grow: 0;
    border-radius: 0;
    margin: 0;
    outline: none;
    color: #000000;
  }

  .navbar a.nav-link + button.collapsed {
    color: #ffffff;
  }

  .navbar a.nav-link + button.navbar-toggler:hover {
    background: transparent;
    color: #000000;
  }

  .navbar div.navbar-collapse div.navbar-collapse {
    position: static;
    flex-grow: 1;
    flex-basis: 100%;
    background: transparent;
  }

  .navbar ul ul a.nav-link {
    padding-left: 2rem;
  }

  .navbar ul ul ul a.nav-link {
    padding-left: 3rem
  }

  .navbar ul ul ul ul a.nav-link {
    padding-left: 4rem
  }

  .navbar ul ul ul ul ul a.nav-link {
    padding-left: 5rem
  }

  .navbar a.lastactive i {
  }

  .navbar-collapse .nav-item .navbar-toggler .fa-chevron-up,
  .navbar-collapse .nav-item .navbar-toggler.collapsed .fa-chevron-down {
    display: inline;
  }

  .navbar-collapse .nav-item .navbar-toggler .fa-chevron-down,
  .navbar-collapse .nav-item .navbar-toggler.collapsed .fa-chevron-up {
    display: none;
  }
}

header.pagetitle {
  background: #414042;
  color: $text-light-orange;
  padding: 1rem;
  flex-basis: 100%;

  h2 {
    color: inherit;
    margin: 0;
  }

  h3 {
    color: #ffffff;
    margin: 1rem 0 0 0;
  }
}

/* Homepage */
.homepage-section {
  flex-basis: 100%;
  max-width: 100%;
}

.homepage-section .icon-next {
  --fa-primary-opacity: 1.0;
  --fa-secondary-opacity: 1.0;
  --fa-primary-color: #ffffff;
  --fa-secondary-color: #{meta.inspect($text-grey)}; //SASS passes custom property values as-is so we have to force interpolation
  text-align: center;
  margin: 1rem auto;
  display: block;
}

#homepage-intro {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;

  .intro-main {
    flex-grow: 1;
    position: relative;
    display: flex;
  }

  .carousel {
    position: absolute;
    z-index: 1;
  }

  .carousel, .carousel-inner, .carousel-item {
    width: 100%;
    height: 100%;
  }

  .carousel .item-container {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .carousel img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }
}

.home-intro-text {
  background: rgba(0, 0, 0, 0.5);
  color: $text-yellow;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 100%;

  h2 {
    color: #ffffff;
  }
}

.home-links {
  align-items: stretch;
  justify-content: stretch;
  flex-grow: 0;
  flex-shrink: 0;
  flex-wrap: wrap;

  a {
    display: block;
    text-decoration: none;
    background-color: $text-yellow;
    color: #000000;
    text-align: center;
    padding: 1rem;
    flex-basis: 100%;

    span {
      display: block;
    }

    .link-title {
      font-size: 1.5rem;
      display: block;
    }

    &:nth-child(4n+1) {
      background-color: $text-yellow;
    }

    &:nth-child(4n+2) {
      background-color: $text-orange;
    }

    &:nth-child(4n+3) {
      background-color: $text-blue;
    }

    &:nth-child(4n+4) {
      background-color: $text-green;
    }

    &:hover {
      color: #ffffff;
      text-decoration: none;
      background-color: #000000;
    }
  }
}

#homepage-culture {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  h2 {
    color: $text-orange;
    text-align: center;
    margin: 1rem;
  }

  span {
    display: block;
  }

  span + span {
    color: $text-blue;
  }

  div {
    background: $text-orange;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  a {
    margin: auto;
    padding: 3rem;
    color: #ffffff;
    background: $bg-blue;
    text-decoration: none;
    font-size: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 400px;
  }

  a [class*='fa-'] {
    margin-top: 2rem;
    --fa-primary-opacity: 1.0;
    --fa-secondary-opacity: 1.0;
    --fa-primary-color: #ffffff;
    --fa-secondary-color: #{meta.inspect($text-orange)}; //SASS passes custom property values as-is so we have to force interpolation
  }
}

#homepage-sponsors {
  h2 {
    color: $text-orange;
    text-align: center;
    margin: 2rem 1rem 1rem 1rem;
  }

  span {
    color: $text-grey;
    font-size: 1.5rem;
    display: block;
  }

  .home-sponsor-links {
    background: $text-yellow;
    display: flex;
    justify-content: space-evenly;
    padding: 3rem 4rem;
    flex-wrap: wrap;

    a {
      flex-basis: 100%;
      margin-top: 1rem;
      margin-bottom: 1rem;
      background: white;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}

footer {
  margin-top: 2rem;
  padding-top: 2rem;
  background: $footer-grey;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  color: $text-dark-grey;

  div {
    padding: 1rem;

    &:first-child {
    }

    > ul {
      margin: 1rem 0;
    }
  }

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

  li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  li ul li {
    margin-left: 2rem;
  }

  a {
    color: #ffffff;

    &:hover {
      color: #ffffff;
    }
  }

  .rmc-link {
    text-decoration: none;
    position: relative;
    display: block;
    color: inherit;

    span {
      position: absolute;
      left: 0;
      top: 3rem;
    }
  }
}

main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Pageparts */

.pagepart {
  padding: 1rem;
  overflow: hidden;
  flex-basis: 100%;

  h1, h2, h3, h4, h5, h6 {
    clear: both;
  }

  .header-pp {
    margin: 0;
  }

  &.default {
    //padding: 0;
    //margin: 1rem;
  }

  &:not(.default) {
    color: #ffffff;

    h1, h2, h3, h4, h5, h6, a {
      color: #ffffff;
    }

    blockquote {
      background: $text-light-grey;
      color: #000000;
    }

    .blockquoteAuthor {
      color: #000000;
    }

    hr {
      border-color: #ffffff;
    }
  }

  &.orange {
    background: $text-orange;
  }

  &.blue {
    background: $text-blue;
  }

  &.grey {
    background: $text-medium-grey;
  }

  //&:not(.default) + .pagepart:not(.default) {
  //  padding-top: 0;
  //}

  img {
    max-width: 100%;
  }

  .image-pp {
    position: relative;
  }

  .image-pp figcaption {
    font-style: italic;
    position: absolute;
    bottom: 0;
    width: 100%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);

    p {
      padding: 0;
      margin: 0.5rem;
    }
  }
}

.link-pp a {
  display: flex;
  text-decoration: none;
  color: $text-orange;
  background: $text-light-grey;

  .image {
    flex-shrink: 0;
    display: none;
  }

  .link-body {
    flex-grow: 1;
    padding: 1rem;
  }

  .link-title {
    font-size: 1.75rem;
    display: block;
  }

  &:hover .link-title {
    text-decoration: underline;
  }

  .link-description {
    display: block;
    color: $text-grey;
  }
}

.pagepart:not(.default) .link-pp {
  a {
    background: #ffffff;
  }

  .link-title {
    color: $text-orange;
  }
}

.pagepart.blue .link-pp {
  .link-title {
    color: $text-blue;
  }
}

.pagepart.download {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;

  + .pagepart.download {
    margin-top: 0 !important;
    padding-top: 0;

    .download-pp > div {
      border-top: none;
    }

    .download-pp h4 {
      visibility: hidden;
    }
  }
}

.pagepart.download + .pagepart:not(.default):not(.download) {
  padding-top: 1rem;
}

.download-pp {
  display: flex;
  flex-direction: column;

  h4 {
    flex-shrink: 0;
  }

  > div {
    margin-left: 1rem;
    display: flex;
    flex-basis: 100%;
    max-width: 100%;
    background: $text-light-grey;
    //color: #000000;
    border: 1px solid #ffffff;
    border-width: 1px 0;

    h5 {
      //color: #ffffff;
    }
  }

  .file-desc {
    padding: 1rem;
    flex-grow: 1;
    flex-basis: 100%;
  }

  .file-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: $text-blue;
    color: #ffffff;
  }

  a.download {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: $text-blue;
    color: #ffffff;
    padding: 1rem;
    flex-basis: 15%;
  }
}

.pagepart:not(.default) .download-pp {
  color: $text-grey;

  h5 {
    color: $text-dark-grey;
  }

  > div {
    border-width: 0 0 1px 0;
  }
}

.pagepart:not(.default):not(.grey) .download-pp {

  .file-icon, a {
    background-color: $text-dark-grey;
  }
}

.pagepart:not(.default).download + .pagepart .download-pp > div {
  border-width: 1px 0 0 0;
}

.video-pp {
  background: $text-light-grey;
  padding: 1rem;
  overflow: hidden;

  div {
    max-height: 90vh;
  }

  figcaption {
    margin-top: 1rem;
    font-style: italic;
  }
}

.pagepart:not(.default) .video-pp {
  background: transparent;
  border: 1px solid #ffffff;
}

.totop-pp {
  display: flex;
  justify-content: flex-end;

  a {
    color: $text-dark-grey;
  }

  .icon {
    --fa-primary-opacity: 1.0;
    --fa-secondary-opacity: 1.0;
    --fa-primary-color: #ffffff;
    --fa-secondary-color: #{meta.inspect($text-dark-grey)}; //SASS passes custom property values as-is so we have to force interpolation
  }
}

/** Map **/
#mapcontainer {
  width: 100%;
  height: 100vh;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

#profile {
  position: absolute;
  z-index: 80;
  left: 4rem;
  top: 8rem;

  .profile-header {
    display: flex;
  }

  .portrait {
    margin-right: 2rem;
  }

  .summary {
    background: #ffffff;
    color: #000000;
    padding: 1rem;
    max-width: 300px;
    overflow: hidden;
  }

  h2 {
    color: #ffffff;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
  }

  h4 {
    color: $text-light-orange;
    margin: 0;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
  }

  a {
    text-decoration: none;
    float: right;

    &:hover {
      text-decoration: underline;
    }

    i, svg {
      color: #000000;
    }
  }
}

.gallery-pp {
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
  }

  li {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-basis: 25%;
    display: flex;
    align-items: center;
    justify-content: center;

    a {
      height: 100%;
      width: 100%;
      background: red;
      position: relative;
    }

    svg {
      color: #ffffff;
      position: absolute;
      @include center;
      opacity: 0.6;
    }

    &:hover svg {
      opacity: 1;
    }

    img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }
}

.ekko-lightbox-nav-overlay a {
  color: #ffffff;
}

#workshops_deploy {
  float: right;
  margin-right: 1rem;
}

#nav_workshops {
  clear: right;
}

#workshop-list {
  position: absolute;
  right: 0;
  top: -2rem;
  background: rgba(248, 148, 29, 0.8);
  z-index: 90;
  border-radius: 2rem;
  overflow: hidden;

  ul {
    list-style: none;
    margin: 1rem;
    padding: 0;

    li {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    ul {
      margin: 0 0 0 1rem;
    }
  }

  a {
    color: #000000;
    text-decoration: none;
    font-size: 1.2rem;
    cursor: default;

    &[href] {
      cursor: pointer;
    }

    &[href]:hover {
      color: #ffffff;
    }

    &.category {
      color: $text-dark-grey;
    }
  }

  h3 {
    background: $text-darkest-grey;
    padding: 1rem;

    span {
      color: $text-yellow;
    }

    span + span {
      color: $text-light-orange
    }

    span + span + span {
      color: $text-blue;
    }

    span + span + span + span {
      color: $text-orange;
    }
  }
}

#workshop-intro {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: wrap;
  position: relative;

  img {
    margin-right: 1rem;
    flex-grow: 0;
    flex-shrink: 0;
    align-self: flex-start;
  }

  div {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 50%;
  }

  #minimap {
    display: none;
    margin-right: 0;
    flex-grow: 0;
    flex-shrink: 0;
  }

  h3 span {
    color: $text-blue;
  }

  #workshop_subnav {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50%;
    max-width: 300px;

    #workshop-list {
      top: 0;
      width: 100%;
      right: 0;
      margin-right: 0;
    }
  }
}

.pagepart.resources-header {
  > div {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;

    > div {
      flex-basis: 50%;
      padding-left: 0;
      color: #000000;

      &:first-child {
        padding-left: 0;
      }
    }
  }

  &.reviews > div > div {
    flex-basis: 50%;
    color: #000000;

    .name {
      color: #ffffff;
      margin-bottom: 0;
      font-size: 1.2rem;
      font-weight: bold;
      text-align: right;
    }

    .organization {
      color: $text-light-orange;
      font-weight: bold;
      font-size: 1.2rem;
      text-align: right;
    }
  }


}
