@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200..700&display=swap');

html {
  /**
   * Account for sticky headers when using scrolling.
   * See https://getpublii.com/blog/one-line-css-solution-to-prevent-anchor-links-from-scrolling-behind-a-sticky-header.html
   */
  scroll-padding-top: 5rem;
}

body {
  background-color: #E1E1E1;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
}

a {
  color: #7879F1;
  text-decoration: none;
}

.photo {
  width: 275px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: auto;
}

.main-content .cit-photo,
.cit-photo {
  text-align: center;
  font-size: 1rem;
}

.link-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.logo {
  width: 130px;
  height: 130px;
}

.title_lead {
  font-weight: 700;
}

.active {
  font-weight: 600;
}

#footer {
  text-align: center;
  padding: 3rem;
  background-color: #7879F1;
  margin-top: 3rem;
}

#footer h2 {
  font-size: 3rem;
}

#footer p {
  font-size: 1.5rem;
  color: #353535;
}

.icon {
  font-size: 26px;
  color: white;
  line-height: 1;
}

.main-content .icon {
  color: #7879F1;
}

.author {
  font-style: normal;
  color: black
}

.title {
  font-style: normal;
  font-weight: bold;
  color: black
}

.cover-small {
  width: 150px;
  height: 150px;
  background-size: 150px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.cover-large {
  width: 275px;
  height: 275px;
  background-size: 275px;
  font-size: 1.6rem;
  border-radius: 10px;
}

.separator {
  height: 3%;
}

.upper-half {
  height: 45%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3%;
  font-weight: 300;
}

.lower-half {
  height: 51%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-weight: 400;
  padding-top: 3%;
  text-transform: uppercase;
}

.card-img-150 {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px !important;
}


#autocomplete {
  position: absolute;
  inset: 0px auto auto 0px;
  margin: 0px;
  transform: translate(0px, 40px);
  background-color: white;
  width: 100%;
  border: 1px solid #E1E1E1;
  border-radius: 0 0 0.25rem 0.25rem;
}

#autocomplete .hit {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-style: normal;
  font-weight: 600;
  line-height: 17px;
  color: black;
  height: 60px;
  padding: 10px;
}

#autocomplete .hit:hover {
  background-color: #f6f6f6;
}

#autocomplete .authors {
  margin-left: 5px;
  color: grey;
  font-size: 0.9rem;
}

.team-member img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

@media (min-width: 768px) {
  .collapse.dont-collapse-md {
    display: block;
    height: auto !important;
    visibility: visible;
  }
}

.btn-genre {
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 50px;
  color: #000000;
}

.btn-tag {
  background: #E1E1E1;
  border-radius: 15px;
  color: black;
  font-size: 1.2rem;
}

nav.sticky-top {
  background-color: #7879F1;
}

#button-search {
  color: #7879F1;
  font-size: 1.5rem;
  background-color: #d9ccfe;
  width: 38px;
}

#button-search img {
  width: 32px;
  height: 34px;
}

nav .container {
  display: flex;
  padding: 0.75rem 0;
  flex-direction: column;
  height: 296px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 1rem;
}

/**
 * Navigation bar.
 * There are 3 different configurations (mobile, tablet, desktop).
 * All implemented using CSS so CSS is hacky.
 * Also to implement stickiness of the search bar we need to
 * affect its parent element (and specify top value to offset it)
 */

nav .logo-title {
  height: 100%;
  display: block;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 50%;
  padding: 0 0.75rem;
}

nav .logo-title .logo {
  flex-grow: 1;
}

nav .logo-title .site-title {
  margin-bottom: 5px;
}

nav .site-description {
  width: 50%;
}

nav .controls {
  display: flex;
  align-items: center;
  width: 50%;
  gap: 0.75rem;
}

nav .controls .buttons {
  display: flex;
  flex-direction: row;
  width: 60%;
  justify-content: space-between;
}

nav .controls .search-container {
  width: 40%;
}

nav .buttons .nav-item:hover {
  background-color: #6465EC;
  border-radius: 5px;
}

.buttons .nav-link {
  text-align: center;
}

.buttons .nav-item {
  flex-grow: 1;
}

@media (min-width: 1200px) {
  nav .container {
    height: 265px;
  }
}

@media (min-width: 1400px) {
  nav .container {
    height: 245px;
  }
}

@media (max-width: 991.98px) {
  nav .container {
    flex-direction: row;
    height: auto;
  }

  nav .controls {
    width: 100%;
  }

  nav .controls .buttons {
    justify-content: space-evenly;
    width: 50%;
  }

  nav .controls .search-container {
    width: 50%;
  }
}

@media (max-width: 575.98px) {
  nav .container {
    flex-direction: column;
    padding: 0 0.75rem 0.75rem 0.75rem;
  }

  nav .logo-title {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  nav.main-page .logo-title {
    margin-bottom: 2rem;
  }

  nav .logo-title .logo {
    width: 100px;
    height: 100px;
  }

  nav .site-description {
    width: 100%;
  }

  nav .show-on-main {
    display: none;
  }

  nav.main-page .show-on-main {
    display: block;
  }

  nav .controls {
    flex-direction: column;
  }

  nav .controls .buttons {
    justify-content: space-evenly;
    width: 100%;
  }

  nav .controls .search-container {
    width: 100%;
  }
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book a {
  text-decoration: none;
  color: black;
  transition: all 0.2s ease;
  padding: 1rem;
}

.book a:hover,
.book a:active {
  transform: scale(1.1);
  background-color: #390281;
  color: white;
}

.book img {
  width: 10rem;
  height: 10rem;
  object-fit: cover;
  border-radius: 10%;
}

.book h3 {
  margin: 0.25rem 0;
}

.btn-genre[aria-expanded="true"] .bi-chevron-down,
.btn-genre[aria-expanded="false"] .bi-chevron-up {
  display: none;
}

.main-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  /* width: 85%; */
  margin: 2rem auto 2rem auto;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.15);
}

.main-content h6 {
  font-style: normal;
  font-weight: 600;
  line-height: 17px;
  color: black;
  font-size: 1rem;
}

.main-content .card .author {
  font-size: 0.9rem;
}

.main-content p {
  font-style: normal;
  font-weight: normal;
}

.main-content .tag {
  font-style: normal;
  font-weight: 600;
  font-size: 28px;
  line-height: 34px;
}

.main-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
}

article li {
  margin-bottom: 0.5rem;
}

.main-content li {
  flex: 1;
}


.tag {
  font-weight: normal;
  font-size: 1.2rem;
  line-height: 20px;
  color: #000000;
  padding: 0.6rem 0.75rem;
  display: inline-block;
  cursor: pointer;
  width: 100%;
}

.catalog-title h1 {
  font-weight: 600;
  font-size: 1.6rem;
}

.tag-selected,
.tag-selected i.bi::before {
  font-weight: 600 !important;
  color: #7879F1;
}

.books-text {
  font-style: normal;
  font-weight: 600;
  line-height: 20px;
  color: #8774FF;
}

article section {
  margin-top: 2rem;
}

article h1 {
  margin-bottom: 1rem;
}

article .CodeMirror {
  border: 1px solid #eee;
  height: auto;
}

.link-type-availability {
  color: #848484;
  display: block;
}

#birthdays .card .card-img-top {
  width: 100px;
  height: 100px;
}

#birthdays .card {
  display: inline-block;
}

.filters .head {
  color: #7879F1;
  font-size: 1.2rem;
  padding: 0.6rem 0.75rem;
  font-weight: bold;
}

.filters .head i {
  margin-right: 0.5rem;
}

.filters .form-floating {
  margin-top: 0.5rem;
}

.form-select {
  cursor: pointer;
}

.books-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  grid-gap: 2rem 3rem;
  justify-content: space-between;
}


@media (max-width: 991.98px) {

  /** Reduce gap on smaller screens so that we can fit 3 books rather than 2 */
  .books-list {
    grid-gap: 2rem 0.5rem;
  }
}

.main-content hr {
  margin: 2rem 0;
}

.youtube-player {
  aspect-ratio: 16 / 9;
  max-width: 560px;
  width: 100%;
  display: block;
}
