/* ============================================================
   eBookIt — Premium Bookstore Styles
   Colors: #428FE7 (primary), #2E77C6 (dark), #75AAE8 (light),
           #0A0F1A (near-black), #F6F6F2 (off-white)
   ============================================================ */

/* ── Typography ──────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.navbar .nav-link {
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.75rem !important;
  border-radius: 6px;
  transition: background 0.2s, opacity 0.2s;
}

.navbar .nav-link:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}

/* Hamburger toggler — white lines, no filter hack */
.navbar-toggler {
  border: 1.5px solid rgba(255,255,255,0.4) !important;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(66,143,231,0.35);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  filter: none !important;
}

/* Admin dropdown */
.dropdown-menu {
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(10,15,26,0.12);
  border-radius: 10px;
  padding: 0.4rem;
  min-width: 160px;
}
.dropdown-item {
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  transition: background 0.15s;
}
.dropdown-item:hover {
  background: var(--section-alt);
  color: var(--primary-color);
}

/* ── Hero ────────────────────────────────────────────────── */
@keyframes heroShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-section {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(26, 39, 68, 0.80), rgba(26, 39, 68, 0.72)), url('/static/img/hero-books-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Subtle dot-grid overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Bottom fade into page */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(13,27,62,0.15));
  pointer-events: none;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
  font-size: clamp(2rem, 5vw, 3rem);
}

.hero-subtitle {
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}

/* Search bar in hero */
.hero-search .form-control {
  background: rgba(255,255,255,0.97);
  border: none;
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 10px 0 0 10px;
  color: var(--text-dark);
  box-shadow: none;
}
.hero-search .form-control:focus {
  box-shadow: none;
  background: #fff;
}
.hero-search .btn-search {
  background: #0A0F1A;
  border: none;
  color: #fff;
  padding: 0 1.5rem;
  border-radius: 0 10px 10px 0;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.hero-search .btn-search:hover {
  background: var(--secondary-color);
  color: #fff;
}
.hero-search .input-group {
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  border-radius: 10px;
}

/* ── Category Pills ──────────────────────────────────────── */
.category-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.18s;
  letter-spacing: 0.01em;
}
.category-pill:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(66,143,231,0.35);
}

/* Legacy pill class used in index.html */
.btn-outline-primary.rounded-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-width: 1.5px;
  transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.btn-outline-primary.rounded-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(66,143,231,0.3);
}

/* ── Book Cards ──────────────────────────────────────────── */
.book-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(10,15,26,0.06);
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(66,143,231,0.18), 0 4px 12px rgba(10,15,26,0.1);
  border-color: rgba(66,143,231,0.3);
}

.book-cover-wrap {
  background: linear-gradient(160deg, #f0f5ff 0%, #e8f1fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
}
.book-cover {
  width: 100%;
  height: 260px;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.book-card:hover .book-cover {
  transform: scale(1.04);
}
.book-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  width: 100%;
  opacity: 0.4;
}

.book-info {
  min-height: 80px;
  padding: 0.6rem 0.75rem 0.75rem;
}
.book-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-author {
  font-size: 0.77rem;
  color: var(--muted-text);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28em 0.6em;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  box-shadow: 0 2px 8px rgba(66,143,231,0.35);
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), #256bba);
  box-shadow: 0 4px 16px rgba(66,143,231,0.45);
  transform: translateY(-1px);
  border: none;
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-width: 1.5px;
  font-weight: 600;
}
.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 14px rgba(66,143,231,0.3);
  transform: translateY(-1px);
}
.btn-outline-primary:active {
  transform: translateY(0);
}
.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

/* ── Section headings ────────────────────────────────────── */
.section-heading {
  font-size: 1.6rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 0;
}
.section-heading-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ── Value Props ─────────────────────────────────────────── */
.value-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(10,15,26,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(66,143,231,0.12);
  border-color: rgba(66,143,231,0.25);
}
.value-card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(66,143,231,0.12), rgba(66,143,231,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.value-card .icon-wrap i {
  font-size: 1.6rem;
  color: var(--primary-color);
}
.value-card h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.value-card p {
  font-size: 0.88rem;
  color: var(--muted-text);
  line-height: 1.6;
  margin: 0;
}

/* ── Book detail page ────────────────────────────────────── */
.book-description {
  line-height: 1.75;
  color: var(--text-dark);
  font-size: 0.96rem;
}
.book-description p {
  margin-bottom: 0.9rem;
}

/* ── Audio player ────────────────────────────────────────── */
audio {
  border-radius: 8px;
  width: 100%;
}

/* ── Pagination ──────────────────────────────────────────── */
.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(66,143,231,0.35);
}
.page-link {
  color: var(--primary-color);
  border-radius: 6px !important;
  margin: 0 2px;
  transition: all 0.15s;
}
.page-link:hover {
  background: var(--section-alt);
  color: var(--primary-color);
}

/* ── Forms ───────────────────────────────────────────────── */
input::placeholder, textarea::placeholder {
  color: rgba(0,0,0,0.3) !important;
}
.form-control::placeholder {
  color: rgba(0,0,0,0.3) !important;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(66,143,231,0.15);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .book-cover {
    height: 200px;
  }
  .book-cover-wrap {
    min-height: 180px;
  }
  .hero-title {
    font-size: 1.75rem;
  }
}

/* Collapsed navbar spacing on mobile */
#mainNavbar .navbar-nav {
  padding: 0.5rem 0;
}
#mainNavbar .nav-item {
  margin-bottom: 2px;
}

/* ── Bookstore overrides for dark-brand + bright-accent ── */
.btn-primary {
  background: linear-gradient(135deg, #428FE7, #2E77C6) !important;
  border-color: #428FE7 !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3580D4, #2568B0) !important;
  border-color: #3580D4 !important;
}
.btn-outline-primary {
  color: #428FE7 !important;
  border-color: #428FE7 !important;
}
.btn-outline-primary:hover {
  background-color: #428FE7 !important;
  border-color: #428FE7 !important;
  color: #fff !important;
}
.badge.bg-primary {
  background: linear-gradient(135deg, #428FE7, #2E77C6) !important;
}
.text-primary {
  color: #428FE7 !important;
}
.page-item.active .page-link {
  background-color: #428FE7;
  border-color: #428FE7;
}
.page-link {
  color: #428FE7;
}
/* Footer background from HCWF shared template uses site-footer class */
.site-footer {
  background: var(--mm-footer-bg) !important;
}
