/* ============================================================
   DeskDude - Ebooks page
   Page-specific additions on top of the shared Minimalist system
   (styles-about-rebuild.css, class prefix cal-). Nav, footer,
   hero, buttons, tags and section heads all reuse the shared
   cal- classes directly and are NOT redefined here.

   Only the ebook-cover-card grid is genuinely new: cal-card and
   cal-bento do not have a slot for a tall book-cover image, so
   this file adds a small dedicated component. Class prefix: ebk-.
   ============================================================ */

.ebk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ebk-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s var(--ease);
}

.ebk-card:hover {
  border-color: var(--border-strong);
}

.ebk-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  padding: 24px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.ebk-cover img {
  max-height: 100%;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(42, 37, 29, 0.14), 0 14px 26px -16px rgba(42, 37, 29, 0.4);
  transition: transform 0.2s var(--ease);
}

.ebk-card:hover .ebk-cover img {
  transform: translateY(-2px);
}

.ebk-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 24px 4px;
}

.ebk-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ebk-card-body h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.3;
}

.ebk-card-body p {
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.ebk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ebk-actions {
  display: flex;
  gap: 10px;
  padding: 20px 24px 24px;
  margin-top: auto;
}

.ebk-actions .cal-btn {
  flex: 1;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 13.5px;
}

/* small spacing fix so a cal-tag can sit above cal-fit-card's h3/p
   without redefining the shared component */
.cal-fit-card .cal-tag {
  margin-bottom: 12px;
}

/* reuse the same cta-panel row layout established on services */
.ebk-cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.ebk-cta-panel h2 {
  margin-bottom: 10px;
  max-width: 34ch;
}

.ebk-cta-panel p {
  max-width: 46ch;
}

.ebk-cta-panel > a.cal-btn {
  flex: none;
}

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

@media (max-width: 620px) {
  .ebk-grid {
    grid-template-columns: 1fr;
  }
  .ebk-cover {
    height: 220px;
  }
  .ebk-actions {
    flex-direction: column;
  }
  .ebk-cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}
