/* One bookshelf treatment for the home rail and the doctors catalog. */
.books_row { gap:34px; padding-top:28px; padding-bottom:40px; }
.books_row li { width:190px; }
.books_row a,.ds_book_grid a { position:relative; display:block; }
.books_row .books_cover,.ds_book_grid .books_cover {
  --book-height:224px;
  --book-width:calc(var(--book-height) * var(--book-ratio));
  --book-thickness:calc(var(--book-width) * .14);
  --book-half:calc(var(--book-thickness) / 2);
  position:relative; display:grid; place-items:center;
  height:var(--book-height); width:100%; aspect-ratio:auto;
  overflow:visible; background:transparent; border-radius:0;
  perspective:1000px; box-shadow:none; transform:none; transition:none;
  margin:0 0 26px;
}
.ds_book_grid .books_cover { --book-height:clamp(200px,17vw,250px); }
/* Cancel the legacy card tilt; only the bound book moves. */
.books_row a:hover .books_cover,.ds_book_grid a:hover .books_cover { transform:none; box-shadow:none; }
.books_cover::after {
  content:""; position:absolute; z-index:0; pointer-events:none;
  bottom:-13px; left:14%; width:76%; height:15px; border-radius:50%;
  background:radial-gradient(ellipse,rgba(35,53,42,.24),rgba(35,53,42,0) 72%);
  filter:blur(4px);
}
.books_object {
  position:relative; z-index:1; display:block;
  width:var(--book-width); height:100%;
  transform-style:preserve-3d; transform:rotateY(24deg);
  transition:transform .55s cubic-bezier(.2,.7,.2,1);
}
.books_front {
  position:absolute; display:block; inset:0;
  transform:translateZ(var(--book-half)); backface-visibility:hidden;
  border-radius:1px 3px 3px 1px; background:#f6f2e8;
  box-shadow:3px 4px 9px rgba(27,43,34,.12);
}
.books_front::after {
  content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  background:linear-gradient(90deg,rgba(0,0,0,.23),rgba(255,255,255,.08) 2%,rgba(0,0,0,.09) 4%,rgba(255,255,255,.28) 5%,transparent 8%,transparent 96%,rgba(0,0,0,.07));
  box-shadow:inset -1px 0 rgba(0,0,0,.08);
}
.books_spine {
  position:absolute; display:block; left:calc(0px - var(--book-half)); top:0;
  width:var(--book-thickness); height:100%;
  transform:rotateY(-90deg); backface-visibility:hidden;
  background-color:#5d6a5e; background-image:linear-gradient(90deg,rgba(0,0,0,.35),rgba(0,0,0,.09) 65%,rgba(255,255,255,.15)),var(--book-art);
  background-size:100% 100%,auto 100%; background-position:center,left center;
  border-radius:2px 0 0 2px;
}
.books_object::after {
  content:""; position:absolute; top:3px; right:calc(0px - var(--book-half));
  width:var(--book-thickness); height:calc(100% - 6px);
  transform:rotateY(90deg); backface-visibility:hidden;
  background:repeating-linear-gradient(90deg,#e3dfd2 0 1px,#fbf8ef 1px 3px);
}
.books_row .books_cover img,.ds_book_grid .books_cover img {
  display:block; width:100%; height:100%; object-fit:contain; border-radius:inherit;
}
.books_row .books_title,.ds_book_grid .books_title { margin-top:0; }
.books_row .books_credit,.ds_book_grid .books_credit { display:block; margin-top:8px; color:#59695c; font-size:12px; line-height:1.6; word-break:keep-all; overflow-wrap:anywhere; }
.ds_book_grid .books_description { display:block; margin-top:10px; color:#59695c; font-size:13px; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; }
.books_row a:focus-visible,.ds_book_grid a:focus-visible { outline:3px solid #557b5b; outline-offset:8px; border-radius:4px; }
.books_row a:focus-visible .books_object,.ds_book_grid a:focus-visible .books_object { transform:translateY(-5px) rotateY(8deg); }
@media(hover:hover) and (pointer:fine) {
  .books_row a:hover .books_object,.ds_book_grid a:hover .books_object { transform:translateY(-5px) rotateY(8deg); }
}
@media(min-width:768px) and (max-width:1199px) {
  .ds_book_grid .books_cover { --book-height:clamp(150px,19vw,220px); }
}
@media(max-width:767px) {
  .books_row { gap:26px; }
  .books_row li { width:156px; }
  .books_row .books_cover { --book-height:180px; }
  .ds_book_grid { gap:34px 20px; }
  .ds_book_grid .books_cover { --book-height:clamp(144px,48vw,200px); }
  .books_row .books_credit,.ds_book_grid .books_credit { font-size:11px; }
  .ds_book_grid .books_description { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .books_object { transition:none; }
  .books_row a:hover .books_object,.ds_book_grid a:hover .books_object,
  .books_row a:focus-visible .books_object,.ds_book_grid a:focus-visible .books_object { transform:rotateY(24deg); }
}
