body {
  background-image: url(images/star.png);
  background-repeat: no-repeat;
  background-position: -15% 140%;
}

/* global */

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

.pages-nav a {
  color: inherit;
  text-decoration: none;
  padding: 10px 0;
  display: block;
}

.pages-nav a:hover,
.pages-nav a:focus {
  text-decoration: underline;
}

.pages-nav li {
  position: relative;
}

.pages-nav li > span {
  display: block;
  position: relative;
  padding-right: 30px;
}

.pages-nav a:hover,
.pages-nav a:focus,
.pages-nav a.on {
  color: #031930;
}

.pages-nav a.on {
  font-weight: bold;
}

/* sub levels */

.pages-nav li.on > ul {
  display: block;
}

.pages-nav li > ul {
  display: none;
  margin-right: 25px;
}

/* 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: #031930;
}

.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;
}

.pages-nav button.no-sub-menu:before {
  content: "\f1db";
}

.pages-nav button.external-link:before {
  content: "\f08e";
}

/* Side Title */

aside h2 {
  color: #031930;
  margin-top: 2rem;
  font-weight: normal;
  font-size: 1.5rem;
}

@media (max-width: 991px) {
  aside {
    display: none;
  }
}

/**/

.card {
  margin-top: 2rem;
  border-radius: 0;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Back to top */

#back-to-top {
  position: fixed;
  bottom: -15px;
  left: 50%;
  margin-left: -26px;
  z-index: 9999;
  text-align: center;
  line-height: 0;
  padding: 1rem;
  padding-bottom: 1.5rem;
  font-size: 1.8rem;
  background: rgba(18, 78, 142, 0.8);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  color: #fff;
  cursor: pointer;
  border: 0;
  border-radius: 1rem;
  text-decoration: none;
  transition: opacity 0.2s ease-out;
  opacity: 0;
}

#back-to-top:hover {
  background: rgba(18, 78, 142, 1);
}

#back-to-top.show {
  opacity: 1;
}

/** PIC nav **/
.sub-pages-nav.with-pic li {
  aspect-ratio: 1;
}

.sub-pages-nav.with-pic .grade {
  background: linear-gradient(
    160deg,
    rgba(18, 189, 221, 0) 0%,
    rgba(5, 37, 125, 0.9) 100%
  );
  position: absolute;
  margin: auto;
  inset: 0;
  filter: drop-shadow();
  transition: all 0.2s ease;
}
.sub-pages-nav.with-pic a {
  background-position: center;
  height: 100%;
  text-align: right;
  display: flex;
  overflow: hidden;
  position: relative;
  background-size: cover;
  aspect-ratio: 1;
  padding: 1rem;
}
.sub-pages-nav.with-pic a .info {
  position: relative;
  margin: auto;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sub-pages-nav.with-pic .name {
  display: block;
  line-height: normal;
  font-size: calc(0.87vw + 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 .name {
    bottom: 0;
  }
  .sub-pages-nav.with-pic a:has(.hasText):hover .name {
    bottom: 95px;
  }
}
