/* =================================================================
   IATE CLUBE DE ITACURUÇÁ — Biblioteca ("estante" de publicações)
   Cards de livro premium com lombada, brilho e tilt 3D no hover.
   Abrem o PDF no modal já existente (.pdfmodal). Depende de styles.css.
   ================================================================= */

.shelf{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  justify-items:center;align-items:start;
  gap:clamp(28px,3vw,46px);margin-top:14px;perspective:1300px;
  max-width:1080px;margin-left:auto;margin-right:auto;
}
.book{
  width:100%;max-width:248px;cursor:pointer;text-align:center;
  background:none;border:0;padding:0;
}
.book__cover{
  position:relative;aspect-ratio:3/4;border-radius:4px 11px 11px 4px;overflow:hidden;
  background:linear-gradient(150deg,var(--navy-700),var(--navy-900));
  box-shadow:0 26px 50px rgba(8,24,38,.34);
  transform-style:preserve-3d;will-change:transform;
  transition:transform .4s var(--ease),box-shadow .4s var(--ease);
}
.book:hover .book__cover{box-shadow:0 42px 74px rgba(8,24,38,.46)}
.book__cover img{width:100%;height:100%;object-fit:cover;display:block}
/* lombada */
.book__cover::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:15px;z-index:2;
  background:linear-gradient(90deg,rgba(0,0,0,.42),rgba(255,255,255,.10) 42%,rgba(0,0,0,.22));
}
/* brilho que cruza no hover */
.book__cover::after{
  content:"";position:absolute;inset:0;z-index:2;opacity:0;transition:opacity .4s var(--ease);
  background:linear-gradient(110deg,rgba(255,255,255,.22),transparent 42%);
}
.book:hover .book__cover::after{opacity:1}
/* overlay "Ler publicação" */
.book__open{
  position:absolute;inset:0;z-index:3;display:grid;place-items:center;
  background:rgba(8,24,38,.55);opacity:0;transition:opacity .3s var(--ease);
}
.book:hover .book__open,.book:focus-visible .book__open{opacity:1}
.book__open span{
  border:1px solid #fff;color:#fff;padding:11px 20px;border-radius:2px;
  font-family:var(--sans);font-size:.7rem;letter-spacing:.2em;text-transform:uppercase;
}
/* fallback do leme se a capa falhar */
.book__cover.is-empty{
  background-color:var(--navy-800);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.22' stroke-width='2'%3E%3Ccircle cx='50' cy='50' r='46'/%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Cg stroke-width='4'%3E%3Cline x1='50' y1='2' x2='50' y2='30'/%3E%3Cline x1='50' y1='70' x2='50' y2='98'/%3E%3Cline x1='2' y1='50' x2='30' y2='50'/%3E%3Cline x1='70' y1='50' x2='98' y2='50'/%3E%3Cline x1='15' y1='15' x2='35' y2='35'/%3E%3Cline x1='65' y1='65' x2='85' y2='85'/%3E%3Cline x1='85' y1='15' x2='65' y2='35'/%3E%3Cline x1='35' y1='65' x2='15' y2='85'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-position:center;background-repeat:no-repeat;background-size:46%;
}
.book__cover.is-empty img{display:none}

.book__meta{margin-top:22px}
.book__meta h3{font-family:var(--serif);font-weight:500;font-size:1.5rem;color:var(--ink);line-height:1.1}
.book__label{
  display:inline-block;margin-top:7px;
  font-family:var(--sans);font-size:.62rem;letter-spacing:.24em;text-transform:uppercase;color:var(--coral-deep);
}
.book:focus-visible{outline:3px solid var(--coral);outline-offset:5px;border-radius:8px}

/* grid harmônico com 4 itens: 4 no desktop, 2×2 no tablet, empilhado no mobile */
@media (max-width:900px){
  .shelf{grid-template-columns:repeat(2,minmax(0,1fr));max-width:560px;gap:clamp(30px,5vw,52px)}
}
@media (max-width:520px){
  .shelf{grid-template-columns:1fr;max-width:280px;gap:40px}
}

@media (prefers-reduced-motion:reduce){
  .book__cover{transition:none}
  .book__cover::after{display:none}
}
