.spot-purple-corner,
.title-bg {
  will-change: transform;
}

.navbar-desktop {
  position: fixed;
  top: 0;
  right: 0;
  font-family: IRANSansX-Regular;
  color: white;
  background: linear-gradient(to bottom, rgb(47, 0, 77), rgba(148, 0, 148, 0));
  font-size: 20px;
  padding: 1rem 1rem;
  z-index: 40;
  width: 100%;
  text-align: right;
  backdrop-filter: blur(12px);
}
.navbar-desktop ul {
  display: flex;
  justify-content: center;
}
.navbar-desktop ul li {
  display: flex;
  margin: 0 1rem;
  padding: 0 12px;
  align-items: center;
  border-radius: 6px;
}
.navbar-desktop ul li:hover:not(.nohover) {
  cursor: pointer;
  background-color: rgb(74, 0, 74);
  transition: all 0.6s;
}
.navbar-desktop ul .nohover:hover {
  opacity: 0.8;
  cursor: pointer;
}

.navbar-mobile {
  background-image: linear-gradient(to right, rgba(192, 169, 255, 0.429), rgba(14, 0, 35, 0.977));
  color: white;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  z-index: 50;
  width: 70%;
  max-width: 0;
  backdrop-filter: blur(12px);
  transition: all 0.4s;
}
.navbar-mobile ul {
  padding-top: 2rem;
  font-family: IRANSansX-Regular;
  width: 18rem;
}
.navbar-mobile ul li {
  text-align: center !important;
  padding: 2vh 0;
}
.navbar-mobile ul li a img {
  margin: auto;
}
.navbar-mobile ul li a:hover {
  color: rgb(214, 152, 255);
}

.award-ctn {
  margin: auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.award-ctn a {
  width: 50%;
  max-width: 20rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.award-ctn a img {
  padding: 15%;
}

.book-card {
  display: flex;
  flex-direction: column;
  width: 20rem;
  border: 1px solid rgba(0, 0, 0, 0.362);
  border-radius: 2px;
  margin: 2rem;
  background-color: rgba(255, 255, 255, 0.391);
  transition: all 0.4s;
  height: 23rem;
}
.book-card:hover {
  cursor: pointer;
  box-shadow: 6.8px 13.6px 13.6px hsla(0, 0%, 0%, 0.17);
  transform: scale(1.05) translate(-0.5rem, -0.5rem);
}
.book-card .head-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 13rem;
}
.book-card .head-card img {
  width: 7rem;
}
.book-card .head-card img:hover {
  opacity: 0.7;
}
.book-card .head-card h3 {
  flex-grow: 1;
  vertical-align: middle;
  font-weight: bold;
  width: 12rem;
  padding: 1rem;
}
.book-card .body-card p {
  padding: 0 1rem 1rem 1rem;
  line-height: 2;
  text-align: justify;
}

#books {
  position: relative;
  overflow: hidden;
}
#books::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/purple-background.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
}

.naghd-ctn {
  position: relative;
  overflow: hidden;
}
.naghd-ctn::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/purple-background2.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
}

.ctn-naghd-card .naghd-card {
  display: flex;
  flex-direction: column;
  width: 90vw;
  max-width: 40rem;
  background-color: rgb(250, 245, 255);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.138);
  margin: 3rem;
}
.ctn-naghd-card .naghd-card .naghd-head {
  display: flex;
  align-items: center;
}
.ctn-naghd-card .naghd-card .naghd-head img {
  width: 8rem;
  margin: 10px;
}
.ctn-naghd-card .naghd-card p {
  margin: 1rem;
  line-height: 2;
  text-align: justify;
}
.ctn-naghd-card .naghd-card p .read-more {
  cursor: pointer;
  color: rgb(56, 56, 255);
}

.book-view-book-ctn {
  background-color: rgba(166, 0, 255, 0.099);
  margin: auto;
  margin-top: 14rem;
  width: 90%;
  max-width: 80rem;
  border-radius: 1rem;
  line-height: 2;
  overflow: auto;
}
.book-view-book-ctn img {
  padding: 2rem;
}
.book-view-book-ctn p {
  padding: 1rem;
  text-align: justify;
  line-height: 2;
}

.video-ctn {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90rem;
  margin: auto;
}
.video-ctn .video-card {
  margin: 2rem;
}
.video-ctn .video-card iframe {
  aspect-ratio: 1.78;
  width: 25rem;
}

.landing-video {
  width: 100%;
  aspect-ratio: 16/9;
}

.aboutme-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.aboutme-video {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

@media only screen and (min-width: 768px) {
  .landing-video {
    max-width: 45rem;
  }
}
@media only screen and (min-width: 1024px) {
  .aboutme-details {
    display: flow-root;
  }
  .aboutme-video {
    float: inline-end;
    width: 45%;
    margin-inline-start: 2rem;
    margin-bottom: 1rem;
  }
  .landing-video {
    max-width: 100%;
  }
}
@media only screen and (max-width: 559.98px) {
  .video-ctn .video-card {
    margin: 2rem 1rem;
  }
  .video-ctn .video-card iframe {
    aspect-ratio: 1.78;
    width: 20rem;
  }
}
/* Initial hidden states for the entrance animation. */
.landing-page .hero,
.landing-page h1.title,
.landing-page h1.title + p,
.landing-page .navbar-desktop,
.landing-page .spot-purple-corner,
.landing-page .title-bg {
  opacity: 0;
  transform: translateY(20px); /* Slight downward offset before animating in. */
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Header background is transparent until the animation runs. */
.landing-page header {
  background: transparent;
  transition: background 1s ease;
}

/* Animated (visible) states. */
.landing-page .hero.animate,
.landing-page .title.animate,
.landing-page .title + p.animate,
.landing-page .navbar-desktop.animate,
.landing-page .spot-purple-corner.animate,
.landing-page .title-bg.animate {
  opacity: 1;
  transform: translateY(0);
}

.landing-page header.animate {
  background: #d8b4fe;
}
