/* This file is for universal/ubiquitous styles */
@import url("imports.css");

/* tag level */

html {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Mulish", "Open sans", sans-serif;
  font-weight: 500;

  background-color: var(--background-colour);
  color: var(--contrast-text);
}

h1 {
  font-family: "Arima", Boldonse, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

h2 {
  font-family: "Arima";
  font-weight: bold;
}

h3 {
  font-family: "Arima";
  font-weight: normal;
}

h4,
h5,
h6 {
  font-family: "Arima";
  font-weight: bold;
}

p {
  font-family: "Mulish";
  font-weight: normal;
}

a {
  font-family: "Mulish", "Open Sans", "Montserrat";
  color: inherit;
  transition: color 0.25s ease;
  &:hover,
  &:focus,
  &:active {
    color: var(--coral);
    text-decoration: none;
  }
}
button {
  font-family: "Mulish";
  font-weight: normal;
}

main {
  margin: 1rem;
  margin-bottom: 10vh;
  min-height: 60vh;
}

/* footer */
footer {
  position: relative;
  bottom: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  min-height: max-content;
  background-color: var(--footer-colour);

  @media screen and (max-width: 767px) {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: max-content;
  }

  .footer__nav {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    color: var(--contrast-text);
    height: 100%;
    align-items: flex-start;
    width: 40vw;

    @media screen and (max-width: 767px) {
      justify-content: center;
      align-items: center;
      text-align: center;
      width: 100%;

      .footer__nav--top-row {
        margin-bottom: 0.3rem;
      }
      .footer__nav--bottom-row {
        margin-top: 0.3rem;
        padding-bottom: 1rem;
      }
    }
  }
  .footer__nav ul {
    list-style-type: none;
    display: inline-block;
    padding-inline-start: 0;

    li {
      font-size: 75%;
    }

    @media screen and (max-width: 767px) {
      justify-content: space-evenly;
    }
  }
  .footer__nav li,
  .footer__nav h5 {
    display: inline-block;
    margin-right: 0.8vw;
    @media screen and (max-width: 767px) {
      display: block;
      margin-right: unset;
      margin-bottom: 0.5rem;
    }
  }

  .footer-logo {
    width: 30vw;
  }

  .footer__logo-text {
    width: 10vw;
    font-size: 80%;
    color: var(--footer-text-colour);
    &:hover {
      h1 {
        text-shadow: 2px 1px 2px var(--red-12);
      }
    }
    h1 {
      margin-bottom: 0;
    }
    h3 {
      margin-top: 0;
    }
  }

  .footer__collab-logos-area {
    display: grid;
    grid-template-columns: repeat(3, minmax(4vw, 6vw));
    justify-items: center;
    align-items: center;

    img {
      width: 80%;
    }

    @media screen and (max-width: 767px) {
      display: none;
    }
  }

  .footer__collab-logos-area--mobile {
    display: none;

    @media screen and (max-width: 767px) {
      img {
        width: clamp(8vw, 10vw, 12vw);
        height: min-content;
        padding-inline: 1.5vw;
      }

      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      position: relative;
      bottom: 1.5rem;
      padding-top: 0.5rem;
      width: 100%;
    }
  }

  a {
    text-decoration: none;
  }
}

/* class level */

/* header */

.title-bar {
  /* background-color: var(--off-white); maybe make this the case when sticky?*/
  background-image: url("../images/logos/mod_header_bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--stone-8);
  background-blend-mode: overlay;
  padding: 1rem;
  align-items: center;
  justify-content: space-between;
  display: grid;
  grid-template-columns: 1fr 6fr 5fr;
  z-index: 2;

  h1,
  h2.title--mobile {
    font-family: Boldonse;
  }

  .title__logo-text {
    align-self: end;
    padding-top: 2.4vh;
    color: var(--turquoise);
    text-shadow: 0px 2px 1px var(--red-12);
    font-size: 86% !important;
    grid-column: 3;
    text-align: end;

    a {
      &:hover {
        color: var(--light-blue);
      }
      h1 {
        margin-bottom: 1.6vh;
      }
      h3 {
        margin: 0;
      }
    }

    @media screen and (max-width: 767px) {
      display: none;
    }
  }

  .material-symbols-outlined {
    color: var(--cyan-6);
  }
  a {
    text-decoration: none;
  }

  .title--mobile {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  /* mobile header styling */
  .title-bar {
    align-items: center;
    background-color: var(--stone-9);
    grid-template-columns: 6fr 5fr 1fr;
    grid-template-rows: 0.5fr 1fr;

    .link--home {
      grid-column: 1;
      grid-row: 2;

      .title--mobile {
        display: block;
        color: var(--turquoise);
        text-align: center;
      }
    }

    .title-bar__icons {
      grid-column: 3;
      grid-row: 2;
      align-items: end;
      justify-items: end;
    }
  }
}

.title-bar__icons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: start;

  .material-symbols-outlined:not(#drawer .material-symbols-outlined) {
    padding-inline: 0.25rem;
    border-radius: 7px;
    background: transparent;

    &:hover {
      transform: scale(1.02);

      color: var(--turquoise);
    }
  }

  .darkmode {
    /*   this doesn't work   */
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  }

  margin-right: 1vw;
  min-width: 8vw;

  span {
    border: 2px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
}

.material-symbols-outlined.sm {
  font-size: 1.2rem;
}

.title--construction {
  color: var(--dark-grey);

  display: flex;
  padding: 0.4rem;
  background-color: var(--pink-2);
  padding-inline: 10vw;
  text-align: center;

  .title__text--construction {
    font-size: 3rem;
    font-family: "Open Sans";
  }
}

.project-notice {
  margin: 2rem;
  margin-inline: 5rem;
  & > p {
    max-inline-size: none !important;
    margin-top: 1rem;
    font-size: var(--font-size-3);
    > a {
      color: var(--blue-6);
      &:hover {
        color: var(--orange-5);
      }
    }
  }
}

/* menu */
.drawer {
  position: fixed;
  top: 0;
  right: -40vw; /* Set initial position off-screen */
  width: 30vw;
  height: 100%;
  background-color: var(--light-blue);
  -webkit-box-shadow: 0px 2px 12px 3px rgba(0, 0, 0, 0.36);
  -moz-box-shadow: 0px 2px 12px 3px rgba(0, 0, 0, 0.36);
  box-shadow: 0px 2px 12px 3px rgba(0, 0, 0, 0.36);

  transition: right 0.5s ease;
  padding: 0.2rem;
  z-index: 3;

  @media screen and (max-width: 767px) {
    right: -100vw;
    width: 70vw;
  }

  .drawer__menu-icons {
    display: flex;
    justify-content: center;

    .material-symbols-outlined {
      transition: all 0.3s ease;
      &:hover {
        color: var(--coral);
      }
    }
  }

  #drawer__button--close {
    background-color: rgba(255, 255, 255, 0.3);
    border: var(--border-size-1) solid var(--cyan-6);
    border-radius: var(--radius-2);
    color: var(--cyan-7);
    float: right;
    margin-inline-end: 2vw;
    font-size: 1.2rem;
    line-height: 1rem;
    padding-bottom: 0.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
    &:hover {
      transform: scale(1.05);
      color: var(--coral);
    }
  }

  .drawer__heading,
  .drawer__list-nav {
    padding-inline-start: 1rem;
  }

  .drawer__list-nav {
    margin-top: 1.5rem;
    list-style-type: none;
    color: var(--cyan-8);
    > li {
      margin-bottom: 1rem;
      &:hover .material-symbols-outlined {
        color: var(--coral);
      }
      a {
        display: flex;
        align-items: center;
      }
    }
    .material-symbols-outlined {
      font-size: 1.25rem;
      margin-right: 0.3rem;
      transition: color 0.3s ease;
    }
  }

  .drawer__heading {
    color: var(--cyan-8);
    border-bottom: solid 1px var(--deep-blue);
  }

  &.open {
    left: 0;
  }
}

/* shared across list views */
.page__description {
  text-align: center;
  color: var(--contrast-text--secondary);
  font-size: medium;

  .utility__wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* justify-content: space-around; */
    margin-bottom: 2rem;

    .viewby {
      grid-column: 3;
      font-size: 0.7rem;
      text-align: end;
    }
  }
}

/* pagination */
.button--toggle-pagination {
  /* float: right; */
  background-color: transparent;
  color: var(--cyan-6);
  font-weight: 600;
  padding: 0.5vw 1vw;
  font-size: inherit;
  /* border-color: var(--light-blue); */

  transition: color 0.3s ease;
  &:hover {
    color: var(--light-blue);
    text-decoration: underline;
  }
}
.pagination {
  margin-inline: auto;
  text-align: center;
  margin-top: 1rem;

  .current {
    display: block;
    font-size: 0.9rem;
    margin-top: 2.4rem;
    margin-bottom: 1rem;
    color: var(--coral);
  }

  .pagination__button {
    font-size: 0.8rem;
    background-color: var(--pink-10);
    border-color: var(--pink-9);
    font-weight: 400;
    color: var(--sand-0);
    transition: background-color 0.3s ease;

    &:hover {
      background-color: var(--pink-9);
    }
  }
}
