/**
 * Kompas Ilmu - Home Page Stylesheet (home-style.css)
 */

/* Hero Promo Banner */
.promo-hero-section {
  background: linear-gradient(135deg, #006da8 0%, #008FD7 60%, #159be3 100%);
  position: relative;
  overflow: hidden;
}

.promo-hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.promo-hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.03em;
}

.promo-hero-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 440px;
}

.btn-lihat-promo {
  background-color: #FFFFFF;
  color: #0077b3 !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 26px;
  border-radius: 8px;
  border: none;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-lihat-promo:hover {
  background-color: #F8FAFC;
  color: #005f8f !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

/* Promo Cards Right Side */
.promo-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.promo-card-item:hover {
  transform: translateY(-4px);
  color: inherit;
}

.promo-book-box {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 75, 120, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  transition: box-shadow 0.2s ease;
}

.promo-card-item:hover .promo-book-box {
  box-shadow: 0 12px 28px rgba(0, 75, 120, 0.25);
}

.promo-book-sm {
  width: 140px;
  height: 200px;
}

.promo-book-lg {
  width: 160px;
  height: 235px;
}

.promo-book-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.25s ease;
}

.promo-card-item:hover .promo-book-img {
  transform: scale(1.04);
}

.promo-price-old {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
  margin-top: 8px;
}

.promo-price-new {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-top: 2px;
}

/* Slider Produk Terlaris */
.terlaris-wrapper {
  background: linear-gradient(135deg, #006da8 0%, #008FD7 60%, #1293dc 100%);
  border-radius: 16px;
  padding: 1.75rem 2.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 143, 215, 0.18);
}

.terlaris-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.terlaris-items-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 6px 2px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.terlaris-track {
  display: flex;
  gap: 18px;
  will-change: transform;
  touch-action: pan-y pinch-zoom;
}

.terlaris-card {
  flex: 0 0 135px;
  width: 135px;
  height: 190px;
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.terlaris-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.terlaris-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.terlaris-card:hover .terlaris-card-img {
  transform: scale(1.04);
}

.terlaris-arrow-btn {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.terlaris-arrow-btn:hover {
  background-color: #FFFFFF;
  color: #0077b3;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.terlaris-prev {
  left: 14px;
}

.terlaris-next {
  right: 14px;
}

/* Info Cards Preview on Home */
.info-card {
  background-color: #FFFFFF;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-card, #EAEFF5);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.07);
  border-color: #CBD5E1;
  color: inherit;
}

.info-card .card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  transition: transform 0.25s ease;
}

.info-card:hover .card-img-top {
  transform: scale(1.02);
}

.info-card .card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.info-card .badge {
  background-color: #008FD7 !important;
  font-family: var(--font-sans, inherit);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.info-card .card-title {
  font-family: var(--font-heading, inherit);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #0F172A;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.info-card:hover .card-title {
  color: #008FD7 !important;
}

.info-card .card-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748B;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .promo-hero-title {
    font-size: 2rem;
  }
  .promo-book-box {
    border-radius: 8px;
    padding: 0;
  }
  .promo-book-sm {
    width: 92px;
    height: 138px;
  }
  .promo-book-lg {
    width: 108px;
    height: 162px;
  }
  .promo-book-img {
    border-radius: 8px;
  }
  .promo-price-old {
    font-size: 0.68rem;
    margin-top: 5px;
  }
  .promo-price-new {
    font-size: 0.78rem;
  }
}

@media (max-width: 768px) {
  .terlaris-wrapper {
    padding: 1.5rem 1.25rem;
  }
  .terlaris-title {
    font-size: 1.3rem;
  }
  .terlaris-track {
    gap: 12px;
  }
  .terlaris-card {
    flex: 0 0 115px;
    width: 115px;
    height: 160px;
    border-radius: 8px;
  }
  .terlaris-card-img {
    border-radius: 8px;
  }
  .terlaris-prev {
    left: 6px;
  }
  .terlaris-next {
    right: 6px;
  }
}


