/* ==========================================================
   SHAREMARKETGYAN
   RECOMMENDED BOOKS SLIDER
========================================================== */


/* ==========================================================
   SECTION
========================================================== */

.smg-books-section {
  padding: 70px 0;
}


/* ==========================================================
   HEADER
========================================================== */

.smg-books-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  text-align: center;
}

.smg-books-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.smg-books-header h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.25;
  color: var(--heading);
}

.smg-books-header p {
  max-width: 650px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-light);
}


/* ==========================================================
   NAVIGATION BUTTONS
========================================================== */

.smg-books-navigation {
  display: flex;

  gap: 8px;

  flex-shrink: 0;
}


.smg-books-arrow {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #dbe3ee;
  border-radius: 50%;

  background: #ffffff;
  color: var(--heading);

  cursor: pointer;

  font-size: 0.85rem;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}


.smg-books-arrow:hover {
  background: var(--primary);
  color: #ffffff;

  border-color: var(--primary);

  transform: translateY(-2px);
}


.smg-books-arrow:disabled {
  opacity: 0.35;

  cursor: not-allowed;

  transform: none;
}


/* ==========================================================
   SLIDER WRAPPER
========================================================== */

.smg-books-slider-wrapper {
  position: relative;

  width: 100%;
}


/* ==========================================================
   SLIDER
========================================================== */

.smg-books-slider {
  display: flex;

  gap: 18px;

  overflow-x: auto;

  scroll-behavior: smooth;

  scroll-snap-type: x mandatory;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;

  padding: 4px 2px 12px;
}


.smg-books-slider::-webkit-scrollbar {
  display: none;
}


/* ==========================================================
   BOOK CARD
========================================================== */

.smg-book-card {
  flex: 0 0 calc((100% - 54px) /4);

  min-width: 0;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid #e2e8f0;
  border-radius: 15px;

  background: #ffffff;

  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.05);

  scroll-snap-align: start;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}


.smg-book-card:hover {
  transform: translateY(-4px);

  border-color: rgba(37, 99, 235, 0.22);

  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.10);
}


/* ==========================================================
   BOOK COVER
========================================================== */

.smg-book-cover {
  height: 190px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px;

  background: #f8fafc;

  overflow: hidden;
}


.smg-book-cover img {
  width: auto;
  height: 100%;

  max-width: 100%;

  object-fit: contain;

  display: block;

  border-radius: 4px;

  box-shadow:
    0 5px 14px rgba(15, 23, 42, 0.12);

  transition: transform 0.3s ease;
}


.smg-book-card:hover .smg-book-cover img {
  transform: scale(1.025);
}


/* ==========================================================
   BOOK CONTENT
========================================================== */

.smg-book-content {
  display: flex;
  flex-direction: column;

  flex: 1;

  padding: 13px;
}


/* ==========================================================
   CATEGORY
========================================================== */

.smg-book-category {
  align-self: flex-start;

  display: inline-block;

  margin-bottom: 6px;
  padding: 4px 7px;

  border-radius: 20px;

  background: #eff6ff;
  color: var(--primary);

  font-size: 0.58rem;
  font-weight: 800;

  line-height: 1.2;

  letter-spacing: 0.04em;

  text-transform: uppercase;
}


/* ==========================================================
   TITLE
========================================================== */

.smg-book-content h3 {
  margin: 0 0 4px;

  font-size: 0.94rem;
  line-height: 1.3;

  color: var(--heading);
}


/* ==========================================================
   AUTHOR
========================================================== */

.smg-book-author {
  margin: 0;

  font-size: 0.74rem;
  line-height: 1.35;

  font-weight: 700;

  color: var(--text-light);
}


/* ==========================================================
   AMAZON LINK
========================================================== */

.smg-book-amazon {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 6px;

  margin-top: 11px;
  padding: 8px 9px;

  border: 1px solid #dbeafe;
  border-radius: 7px;

  background: #f8fafc;

  color: var(--primary);

  font-size: 0.7rem;
  font-weight: 800;

  text-decoration: none;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}


.smg-book-amazon:hover {
  background: var(--primary);
  color: #ffffff;

  border-color: var(--primary);
}

/* ==========================================================
   BOOK SLIDER FOOTER
========================================================== */

.smg-books-footer {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 9px;

  margin-top: 18px;

  text-align: center;

  color: var(--text-light);

  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
}


/* ==========================================================
   PROGRESS TRACK
========================================================== */

.smg-books-progress {
  width: 160px;
  height: 4px;

  overflow: hidden;

  border-radius: 10px;

  background: #e2e8f0;
}


/* ==========================================================
   PROGRESS INDICATOR
========================================================== */

.smg-books-progress-bar {
  display: block;

  width: 15%;
  height: 100%;

  border-radius: 10px;

  background: var(--primary);

  transition: width 0.3s ease;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1100px) {

  .smg-book-card {
    flex-basis: calc((100% - 36px) / 3);
  }

}


/* ==========================================================
   SMALL TABLET
========================================================== */

@media (max-width: 800px) {

  .smg-books-section {
    padding: 55px 0;
  }


  .smg-books-header {
    align-items: flex-start;
  }


  .smg-book-card {
    flex-basis: calc((100% - 18px) / 2);
  }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 560px) {

  .smg-books-header {
    display: block;
  }


  .smg-books-header h2 {
    font-size: 1.6rem;
  }


  .smg-books-navigation {
    margin-top: 16px;
  }


  .smg-books-arrow {
    width: 38px;
    height: 38px;
  }


  .smg-book-card {
    flex-basis: 78%;
  }


  .smg-book-cover {
    height: 210px;
  }


  .smg-books-footer {
    margin-top: 12px;
  }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 380px) {

  .smg-book-card {
    flex-basis: 86%;
  }

}