/* ==========================================================================
   Avezz Books & Courses Browser (css/pages/books.css)
   1:1 UI/books-courses.html — 3-Column Vertical Poster Cards (card3.html #6)
   ========================================================================== */

:root {
  --bc-shadow-card: 0 20px 38px -12px rgba(15, 23, 42, 0.32), 0 4px 12px rgba(15, 23, 42, 0.14);
  --bc-indigo: #4f46e5;
  --bc-emerald: #10b981;
  --bc-rose: #f43f5e;
  --bc-amber: #f59e0b;
}

[data-theme="dark"] {
  --bc-shadow-card: 0 22px 44px -10px rgba(0, 0, 0, 0.72);
}

.bc-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 18px 64px;
}

/* Hub Toolbar */
.bc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bc-toolbar-left,
.bc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-type-segment {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.bc-type-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.bc-type-btn:hover { color: var(--text); }
.bc-type-btn[aria-current="page"] {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
}

.cat-bar-left .bc-type-btn {
  height: 24px;
  padding: 0 10px;
  font-size: 11.5px;
}

.bc-select {
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.hub-form-drawer { margin-bottom: 20px; }
.hub-form-drawer.hide { display: none; }

/* 3-Column Stage (4 even rows at 12/page) */
.bc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1060px) {
  .bc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .bc-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   CARD3.HTML #6 — DYNAMIC ACTION VERTICAL POSTER CARD
   ===================================================================== */
.bc-card {
  position: relative;
  background: #09090b;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--bc-shadow-card);
  aspect-ratio: 4 / 5;
  isolation: isolate;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.bc-card:hover { transform: translateY(-4px); }
.bc-card.has-open-menu { overflow: visible; z-index: 30; }
.bc-card.has-open-menu .bc-media-clip { overflow: hidden; border-radius: 24px; }

.bc-media-clip {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  z-index: 0;
}

.bc-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.bc-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.bc-card:hover .bc-cover {
  opacity: 1;
  transform: scale(1.04);
}

.bc-cover-fallback {
  position: absolute;
  inset: 0;
  background: var(--bc-grad, linear-gradient(145deg, #1e1b4b 0%, #312e81 48%, #0f172a 100%));
}

/* Top Bar (Author + More) */
.bc-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.22) 65%, transparent 100%);
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.bc-top > * { pointer-events: auto; }

.bc-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bc-author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.bc-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.bc-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bc-author-meta { min-width: 0; }

.bc-handle {
  display: block;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.bc-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.bc-follow-btn {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.bc-follow-btn:hover { background: rgba(255, 255, 255, 0.32); }
.bc-follow-btn.is-following {
  background: #ffffff;
  color: #111827;
  border-color: #ffffff;
}

.bc-more-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bc-more-btn:hover { background: rgba(0, 0, 0, 0.55); }

/* Right Floating Frosted Action Rail */
.bc-rail {
  position: absolute;
  right: 12px;
  bottom: 112px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
}

.bc-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.bc-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.bc-rail-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.bc-rail-circle .icon {
  width: 20px;
  height: 20px;
}

.bc-rail-btn:hover .bc-rail-circle {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.24);
}

.bc-rail-btn.like.active .bc-rail-circle {
  background: var(--bc-emerald);
  border-color: var(--bc-emerald);
  color: #ffffff;
}

.bc-rail-btn.deslike.active .bc-rail-circle {
  background: var(--bc-rose);
  border-color: var(--bc-rose);
  color: #ffffff;
}

.bc-rail-btn.share.active .bc-rail-circle {
  background: var(--bc-amber);
  border-color: var(--bc-amber);
  color: #111827;
}

.bc-rail-label {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.78);
  letter-spacing: 0.01em;
}

/* Bottom Content Overlay */
.bc-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 46px 68px 18px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 56%, transparent 100%);
  border-radius: 0 0 24px 24px;
  pointer-events: none;
}

.bc-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  pointer-events: auto;
}

.bc-type-pill {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  color: #ffffff;
}

.bc-type-pill--book { background: rgba(79, 70, 229, 0.92); }
.bc-type-pill--course { background: rgba(16, 185, 129, 0.92); }

.bc-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  padding: 2px 5px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.bc-tag:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.bc-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.015em;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.bc-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  line-height: 1.42;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State & Pagination */
.bc-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.bc-empty-state h3 {
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--text);
}

.bc-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}
