@import url('../../assets-custom/root.css');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Lato&family=Open+Sans&family=Roboto+Condensed:wght@300;400&family=Roboto+Mono:wght@500&family=Space+Grotesk&display=swap');

/* Offcanvas text color */
.offcanvas-body {
  color: white;
}

::-webkit-scrollbar {
    background-color: var(--ea-background-color-scrollbar);
    border-radius: 10px;
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--ea-primary-color);
    border-radius: 10px;
    width: 5px;
}

.swiper-slide{
  width: 50% !important;
}

body {
  background: var(--ea-secondary-color);
  color: #fff;
  margin: 0 auto;
  max-width: 1920px;
  position: relative;
}

/* Container body for the library pages */
.library-body {
  margin: 0 auto;
  max-width: 1920px;
  position: relative;
}

/* Re-usable margin top classes */
.ea-mt-50 {
  margin-top: 50px;
}
.ea-mt-100 {
  margin-top: 100px;
}
.ea-mt-150 {
  margin-top: 150px;
}

.ea-menu-font {
  font-family: var(--title-font);
  color: var(--library-side-nav) !important;
}

/* -----------------------------------------------
   NAV / SIDEBAR / OFFCANVAS
----------------------------------------------- */
#offcanvasScrolling {
  width: 14vw;
  min-width: 215px;
  background: var(--ea-secondary-color);
  max-width: 300px;
  max-height: 1100px;
  border: 1px solid #3b3d3a;
}

.logo {
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
}

.library-menu-item {
  position: relative;
}
.library-menu-item a,
.library-menu-item p {
  color: var(--library-left-navbar-items-link-text-color) !important;
  font-weight: 500;
  text-decoration: none;
  transition: 0.3s;
  font-size: 16px;
}

.library-categories .library-menu-item a {
  line-height: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Hover highlight line on the side nav */
.library-menu-item:not(.logout)::after {
  position: absolute;
  display: block;
  margin-top: auto;
  margin-bottom: auto;
  background-color: var(--ea-primary-color);
  content: '';
  height: 0;
  width: 2px;
  right: 2px;
  transition: 0.1s;
}
.library-menu-item:hover:after {
  height: 80%;
}
.library-menu-item:hover,
.library-menu-item:hover * {
  cursor: pointer;
  color: var(--ea-primary-color) !important;
}

/* Divider line in side nav */
.divider {
  display: block;
  margin-left: 5% !important;
  height: 2px;
  background-color: var(--library-side-nav);
  width: 80%;
  margin: 20px 0;
}

/* -----------------------------------------------
   TOP NAV / LAYOUT
----------------------------------------------- */
.library-navbar {
  width: 68vw;
  margin-left: 17%;
  max-width: 1520px;
}
.library-navbar .container {
  margin-left: 0;
}

/* The main area where categories appear */
.categories-container {
  margin-left: 17%;
  margin-right: 2vw;
  width: 80vw;
  overflow-x: hidden;
}

/* optional footer space */
.library-footer {
  padding-left: 20%;
}

/* Container block for each category + optional bottom border */
.category-block {
  margin-bottom: 50px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header row: Category title + "View All" */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.category-header h2 {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--index-container-heading-of-each-section-color, #eee);
}

/* The neon-green "View All" button */
.view-all-btn {
  background-color: var(--btn-background-color);
  color: #000;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  cursor: pointer;
}
.view-all-btn:hover {
  background-color: #ccff55;
}

/* Horizontal container for the 2 visible cards */
.book-cards {
  display: flex;
  gap: 30px;
  flex-wrap: nowrap;
  overflow: hidden;
  position: relative;
}

/* Each card */
.book-card {
  min-width: 300px;
  max-width: 550px;
  background-color: var(--ea-secondary-color); /* a subtle contrast from pure black */
  border-radius: 5px;
  transition: transform 0.3s;
  border: 1px solid #7575759c;
}
.book-card:hover {
  /* transform: scale(1.02); */
}
.swiper-button-next {
  color: var(--ea-primary-color) !important;
}
.swiper-button-prev {
  color: var(--ea-primary-color) !important;
}
.library-card-title {
  margin-bottom: 20px;
}
.library-card-body {
  padding: 20px;
}
.library-card-readmore {
  color: var(--ea-secondary-color);
  background-color: var(--ea-primary-color);
  padding: 10px;
  padding-inline: 25px;
  text-decoration: none;
}
.book-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.book-card h4 {
  font-size: 1.2rem;
  margin-top: 10px;
  color: var(--ea-primary-color); /* neon green for card title */
  text-align: center;
}
.book-card p {
  font-size: 0.95rem;
  color: #ccc;
  text-align: center;
}

.read-more-btn,
.more-btn {
  background-color: var(--ea-primary-color);
  color: #000;
  padding: 6px 12px;
  border: none;
  border-radius: 3px;
  font-weight: 600;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}
.swiper-scrollbar {
  background-color: var(--ea-primary-color) !important;
}

.read-more-btn:hover {
  background-color: #ccff55;
}

/* The arrow buttons under the two cards */
.card-arrows {
  text-align: center;
  margin-top: 12px;
}
.card-arrows .arrow-btn {
  background-color: var(--ea-primary-color);
  color: #000;
  margin: 0 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.card-arrows .arrow-btn:hover {
  background-color: #ccff55;
}

/* -----------------------------------------------
   RESPONSIVE MEDIA QUERIES
----------------------------------------------- */

/* under 1400px */
@media screen and (max-width: 1400px) {
  .library-book-info {
    top: 30%;
  }
  .library-book-info h3 {
    font-size: 23px;
  }
}

/* under 1200px */
@media screen and (max-width: 1200px) {
  .library-navbar {
    width: 300px;
  }
  .categories-container {
    margin-left: 210px;
  }
  .book-card {
    max-width: 430px;
  }
}

/* under 992px (tablet) */
@media screen and (max-width: 992px) {
  .canvas-toggle {
    background: var(--btn-background-color);
    color: var(--btn-library-text-color);
    border-radius: 126px;
    font-size: 12px;
  }
  .canvas-toggle:hover {
    background-color: var(--ea-primary-color);
    color: black;
  }
  .canvas-toggle:active {
    background-color: var(--ea-primary-color);
    color: white !important;
  }
  .categories-container {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .library-navbar {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .library-footer {
    padding-left: 0;
  }
  .book-cards {
    flex-wrap: wrap;
    justify-content: center;
  }
  .book-card {
    width: 80%;
    margin-bottom: 20px;
  }
}

/* under 768px (mobile-ish) */
@media screen and (max-width: 768px) {
  .library-navbar {
    margin-left: 5px !important;
    width: 80%;
  }
  .book-card {
    width: 90%;
    margin: 0 auto 20px auto;
  }
}

/* under 600px (smaller phones) */
@media screen and (max-width: 600px) {
  .arrow-btn {
    display: none;
  }
}

/* under 450px */
@media screen and (max-width: 450px) {
  .category-header h2 {
    font-size: 1.5rem;
  }
  .book-card h4 {
    font-size: 1.1rem;
  }
  .book-card p {
    font-size: 0.9rem;
  }

  .book-card {
    padding: 0px;
  }
}
