@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "poppins", sans-serif;
  overflow-x: hidden;
}

:root {
  --primary-color: #095c3b;
  --secondary-color: #016a3f;
  /* --theme-bg-color: linear-gradient(to bottom, rgb(0 102 60) 0%, rgba(0 102 60) 20%, rgba(6,132,80,1) 100%); */
  --gradient-color: linear-gradient(#91c597, #d1e8ca, #91c597);
}

/* ----------------------------------------------------------------------- */
/* header section  */

/* ----------------------------------------------------------------------- */
/* nav-bar  */
.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.19); */
}
.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--secondary-color);
  padding: 0 2%;
}
.link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.logo {
  width: 200px;
  height: 70px;
}
.logo a {
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.logo img {
  width: 100%;
  height: 100%;
}
.searchbar {
  width: 47%;
}
.header-search {
  border: 1px solid var(--primary-color);
  border-radius: 50px;
  position: relative;
  background-color: rgb(171, 165, 165);
}
.input-group {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  position: relative;
  width: 100%;
}
.input-group .new-input {
  border: none;
  font-size: 115%;
  height: 40px;
  line-height: 45px;
  display: block;
  padding: 0.375rem 0.75rem 0.375rem 1.5rem;
  background: transparent;
  flex: 1 1 auto;
  font-size: 14px;
}
.input-group ::placeholder {
  color: rgba(0, 0, 0, 0.813);
}
.input-group .new-input:focus {
  outline: none;
}
.search-btn {
  border: none;
  margin-left: -1px;
  display: flex;
}
.search-btn .btn {
  border: none;
  background-color: transparent;
  width: 50px;
  z-index: 2;
  cursor: pointer;
}

.search-btn .btn i {
  font-size: 25px;
  overflow: hidden;
}
.user-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  gap: 10px;
  /* height: 38px;
  width: 100px; */
  cursor: pointer;
  border-radius: 6px;
  background-color: rgb(206, 203, 203);
  transition: all 0.5s ease-in-out;
  text-decoration: none;
  color: var(--primary-color);
}
.user-menu:hover {
  background-color: white;
}
.user-menu a {
  text-decoration: none;
  color: black;
}
.separator {
  border-bottom: 3px solid black;
}

.nav-down {
  padding: 0 8%;
  background-color: #95c696;
}

.dept-list {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
.dept-list li {
  list-style: none;
  padding: 11px 50px 11px 50px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  position: relative;
  transition: all 0.5s ease-in-out;
}

.dept-list li:hover {
  background-color: #d2e8cc;
}

.dept-list li::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  /* height: 2px; */
  background-color: black;
  transition: all 0.5s ease-in-out;
}
.dept-list li:hover::after {
  width: 100%;
}
.dept-list li a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.5s ease-in-out;
}
.dept-list li:hover a {
  color: black;
}

main {
  margin-top: 121px;
  /* padding-bottom: 10px; */
  min-height: 100vh;
}
/* ------------------------------------------------------------------------- */
/* all books section  */
section {
  padding: 2% 7%;
  background: #d2e8cc;
}
.section-heading {
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h1 {
  font-size: 35px;
}
.view-all-btn {
  padding: 10px 20px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  transition: all 0.5s ease-in-out;
  color: var(--primary-color);
  font-weight: 500;
  /* overflow:visible; */
}
.view-all-btn {
  text-decoration: none;
}
.view-all-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}
.view-all-btn i {
  padding-left: 5px;
  overflow-y: hidden;
}

.books-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.container {
  position: relative;
}
.book {
  transition: all 0.5s ease-in-out;
  border-radius: 5px;
  border: 0.5px solid rgba(163, 118, 118, 0.454);
  cursor: pointer;
  background-color: white;
  height: 400px;
}
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #218f6181;
  overflow: hidden;
  width: 100%;
  height: 0;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
  backdrop-filter: blur(3px);
}
.container:hover .overlay {
  height: 20%;
}
.container:hover .book,
.book:hover {
  cursor: pointer;
  box-shadow: 0px 5px 20px 0px rgba(2, 2, 38, 0.2);
  background: rgba(255, 255, 255, 0.371);
}
.book-img {
  width: 90%;
  height: 65%;
  overflow-y: hidden;
  margin: 0 auto;
  padding: 10px 0;
}
.book .book-img img {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(79, 78, 78, 0.292);
}
.book-header,
.book-publication,
.book-author,
.book-detail-btn {
  width: 90%;
  text-align: center;
  margin: 0 auto;
}
.book-header {
  font-size: 1rem;
}
.book-publication {
  font-size: 0.8rem;
}
.book-author {
  font-weight: 500;
  font-size: 0.9rem;
}
.book-detail-btn {
  cursor: pointer;
  white-space: nowrap;
  font-size: 20px;
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transition: all 0.5s ease-in-out;
  border: 2px solid black;
  border-radius: 5px;
}

.book-detail-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

.divider {
  padding-top: 50px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.325);
  background: #d2e8cc;
}

#loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  background: #d2e8cc;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

#loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #016a3f;
  border-top: 4px solid #b6da9c81;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
main {
  background-color: #d2e8cc;
}
.hidden {
  display: none !important;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.dept-name:has(> a.active) {
  font-weight: bold;
  background-color: #d2e8cc;
  border-bottom: 3px solid var(--primary-color);
}
