/* Side Navigation */

/* global */

.pages-nav ul {
  margin: 1.2rem 0 0;
  padding: 1rem 0;
  list-style: none;
  img {
    display: none;
  }
}
.btn.btn-primary {
  padding-block: 1rem;
  box-shadow:
    rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
    rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
}
.btn.btn-primary:hover {
  box-shadow: none;
}
.pages-nav a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 1.25rem 1rem;
  font-size: 1.25rem;
}

.pages-nav li {
  position: relative;
}
.pages-nav > ul > li::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.05);

  @media (max-width: 991px) {
    background-color: transparent;
  }
}
.pages-nav li:after {
  font-family: "FontAwesome";
  content: "\f104";
  position: absolute;
  top: 0.75rem;
  left: 5px;
  color: var(--prime1);
  font-size: 1.4rem;
  content: none;
}

.pages-nav li:last-child {
  border-bottom: 0;
}

.pages-nav li > span {
  display: block;
  position: relative;
  /*padding-right: 30px;*/
}

.pages-nav a:hover,
.pages-nav a:focus,
.pages-nav a.on {
  color: var(--prime1);
}

.pages-nav a.on {
  font-weight: bold;
}

/* sub levels */

.pages-nav li.on > ul {
  display: block;
}

.pages-nav li > ul {
  display: none;
  margin-right: 7px;
}

/* toggle menu button */

.pages-nav button {
  position: absolute;
  top: 0;
  right: 0;

  font-family: "FontAwesome";
  font-style: normal;

  width: 25px;
  height: 100%;

  padding: 5px;
  background: none;
  border: 0;
  color: #56bcaf;

  display: none;
}

.pages-nav button:before {
  content: "\f053";
}

.pages-nav button.opened:before {
  content: "\f078";
}

.pages-nav button.no-sub-menu {
  font-size: 80%;
  padding-top: 2px;

  display: none;
}

.pages-nav button.no-sub-menu:before {
  content: "\f1db";
}

.pages-nav button.external-link:before {
  content: "\f08e";
}

/* Side Title */

aside {
  background: #fff;
  margin-bottom: 1.5rem;
  margin-top: 5rem;
  box-shadow: none;
  border-radius: 0;
}

aside nav {
  position: relative;
  border-radius: 0;
}
aside nav::after {
  content: "";
  position: absolute;
  right: -1.75rem;
  top: 0;
  border-right: 2px solid #eee;
  height: 100%;
  width: 1px;
}

@media (max-width: 1150px) {
  aside nav::after {
    right: -1.5rem;
  }
}
.pages-nav-title {
  background: transparent;
  color: var(--prime1);
  font-weight: 500;
  font-size: calc(0.25vw + 1.5rem);
  margin: 0;
  padding: 2rem 0rem;
  position: relative;
}
.pages-nav-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background-color: var(--prime4);
}
@media (max-width: 991px) {
  aside {
    display: none;
  }
  .pages-nav > ul > li::before {
    width: 100%;
  }
}

/** PIC nav **/
.sub-pages-nav.with-pic ul {
  width: inherit;
  align-items: unset;
}
.sub-pages-nav.with-pic li {
  aspect-ratio: unset;
  min-width: 100px;
  flex: 1 1 30%;
  max-width: 30%;

  &::after {
    content: none;
  }
}

.sub-pages-nav.with-pic .grade {
  background: linear-gradient(
    160deg,
    rgba(18, 189, 221, 0) 0%,
    rgba(126, 3, 93, 0.9) 100%
  );
  position: absolute;
  margin: auto;
  inset: 0;
  filter: drop-shadow();
  transition: all 0.2s ease;
}
.sub-pages-nav.with-pic a {
  background-color: #fff;
  position: relative;
  height: 100%;
  text-align: right;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  aspect-ratio: unset;
  border-radius: 5px;
  text-align: center;
  padding: 1rem;
  box-shadow: -2px 4px 10px 1px rgba(0, 0, 0, 0.142);
}
.sub-pages-nav.with-pic a img {
  object-fit: contain;
  object-position: center;
  width: 100%;
  height: 155px;
  border: 1px solid var(--prime2);
  padding: 10px;
}
.sub-pages-nav.with-pic a .info {
  position: relative;
  margin: 5px auto;
  inset: 0;
  width: 100%;
  color: var(--text);
  transition: all 0.4s ease;
}

.sub-pages-nav.with-pic .name {
  display: block;
  line-height: normal;
  font-size: calc(0.2vw + 16px);
  font-weight: 500;
  position: relative;
  /* padding-bottom: 3rem; */
  position: relative;
  transition: all 0.52s ease;
  line-height: 1;
  overflow-y: hidden;
  bottom: 0;
}

.sub-pages-nav.with-pic .name::after {
  top: 0.57rem;
  position: relative;
  content: "";
  width: 100px;
  height: 1px;
  border-radius: 5px;
  background-color: var(--prime2);
  display: block;
}
.sub-pages-nav.with-pic p {
  line-height: 1.1;
  transition: all 0.52s ease;
  overflow-y: clip;
  position: absolute;
  font-size: calc(0.1vw + 16px);
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  transform: translateY(180px);
  padding-inline-end: 1.5rem;
}
.sub-pages-nav.with-pic p.hasText {
  max-height: 120px;
}

@media (min-width: 992px) {
  .sub-pages-nav.with-pic a:hover {
    text-decoration: none;
  }
  .sub-pages-nav.with-pic a:hover .grade {
    background: linear-gradient(
      180deg,
      rgba(18, 189, 221, 0) 0%,
      rgba(2, 23, 80, 1) 100%
    );
  }
  /* .sub-pages-nav.with-pic a:hover p {
    opacity: 1;
    transform: translateY(1rem);
  } */
  .sub-pages-nav.with-pic a:hover img {
    border: 1px solid var(--prime1);
  }
  .sub-pages-nav.with-pic a:has(.hasText):hover .name {
    bottom: 95px;
  }
}

@media (max-width: 1200px) {
  .sub-pages-nav.with-pic li {
    flex: 1 1 50%;
    max-width: 50%;
  }
}

@media (max-width: 767px) {
  .sub-pages-nav.with-pic li {
    flex: 1 1 100%;
    max-width: 100%;
    aspect-ratio: unset;

    & a {
      aspect-ratio: unset;
      height: auto;
    }

    & .info {
      padding: 1rem 0;
    }
  }
}
