/* Academia ETERNI · Mi biblioteca premium V48 */

:root{
  --lib-bg:#f8f4ef;
  --lib-paper:#fffdfa;
  --lib-plum:#43284b;
  --lib-plum-soft:#67516e;
  --lib-gold:#b58b4d;
  --lib-sage:#eaf1e8;
  --lib-rose:#f6ece8;
  --lib-line:rgba(67,40,75,.10);
  --lib-shadow:0 22px 58px rgba(45,28,51,.08);
  --lib-shadow-book:0 28px 52px rgba(49,34,39,.18);
}

body[data-student-page="library"]{
  background:
    radial-gradient(circle at 84% 8%,rgba(181,139,77,.10),transparent 24rem),
    linear-gradient(180deg,#fbf8f4 0%,var(--lib-bg) 100%);
}

.library-hero{
  padding:48px 0 28px;
}

.library-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:34px;
  align-items:end;
}

.library-hero-copy{
  max-width:760px;
}

.library-hero-copy h1{
  margin:7px 0 12px;
  color:var(--lib-plum);
  font:600 clamp(54px,7vw,78px)/.92 "Cormorant Garamond",serif;
}

.library-hero-copy p{
  max-width:690px;
  margin:0;
  color:#756b78;
  font-size:15px;
  line-height:1.7;
}

.library-count-card{
  padding:24px 26px;
  border:1px solid var(--lib-line);
  border-radius:28px;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,239,232,.94));
  box-shadow:var(--lib-shadow);
}

.library-count-card span,
.library-count-card strong,
.library-count-card small{
  display:block;
}

.library-count-card span{
  color:var(--lib-gold);
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}

.library-count-card strong{
  margin-top:9px;
  color:var(--lib-plum);
  font:600 33px/1 "Cormorant Garamond",serif;
}

.library-count-card strong b{
  font:inherit;
}

.library-count-card small{
  margin-top:10px;
  color:#766d79;
  line-height:1.5;
}

.library-content-section{
  padding:16px 0 78px;
}

.library-section-heading{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:30px;
  margin-bottom:22px;
}

.library-section-heading h2{
  margin:5px 0 0;
  color:var(--lib-plum);
  font:600 clamp(38px,5vw,52px)/.96 "Cormorant Garamond",serif;
}

.library-section-heading>p{
  max-width:370px;
  margin:0;
  color:#857a86;
  font-size:12px;
  line-height:1.55;
  text-align:right;
}

.premium-book-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
  align-items:stretch;
}

.premium-book-grid .premium-book-card[hidden]{
  display:none!important;
}

.premium-book-card{
  position:relative;
  overflow:hidden;
  display:grid!important;
  grid-template-columns:minmax(190px,42%) minmax(0,1fr);
  min-height:390px;
  border:1px solid var(--lib-line)!important;
  border-radius:30px!important;
  background:linear-gradient(145deg,#fffdfa 0%,#f4ede6 100%)!important;
  box-shadow:var(--lib-shadow)!important;
  transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;
}

.premium-book-card:nth-child(2){
  background:linear-gradient(145deg,#fffdfa 0%,#edf2ea 100%)!important;
}

.premium-book-card:hover{
  transform:translateY(-5px);
  border-color:rgba(181,139,77,.28)!important;
  box-shadow:0 30px 70px rgba(45,28,51,.12)!important;
}

.premium-book-visual{
  position:relative;
  display:grid;
  place-items:center;
  min-height:390px;
  overflow:hidden;
  padding:30px;
  border-right:1px solid rgba(67,40,75,.07);
}

.book-glow{
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(181,139,77,.20),rgba(181,139,77,0) 70%);
  filter:blur(4px);
}

.premium-book-card:nth-child(2) .book-glow{
  background:radial-gradient(circle,rgba(111,137,111,.18),rgba(111,137,111,0) 70%);
}

.premium-book-visual img{
  position:relative;
  z-index:1;
  width:min(200px,86%);
  height:auto;
  max-height:315px;
  object-fit:contain;
  border-radius:10px;
  box-shadow:var(--lib-shadow-book);
  transform:perspective(900px) rotateY(-4deg);
  transition:transform .28s ease,box-shadow .28s ease;
}

.premium-book-card:hover .premium-book-visual img{
  transform:perspective(900px) rotateY(0deg) translateY(-3px);
  box-shadow:0 34px 62px rgba(49,34,39,.22);
}

.premium-book-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:34px 32px;
}

.premium-book-copy .access{
  align-self:flex-start;
  margin-bottom:14px;
  padding:8px 12px;
  border-radius:999px;
  background:var(--lib-sage)!important;
  color:#55705a!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.10em!important;
  text-transform:uppercase;
}

.premium-book-copy h3{
  margin:0;
  color:var(--lib-plum);
  font:600 clamp(34px,3.4vw,46px)/.94 "Cormorant Garamond",serif;
  text-wrap:balance;
}

.premium-book-copy p{
  margin:16px 0 24px;
  color:#756b78;
  font-size:15px;
  line-height:1.65;
}

.premium-book-copy .premium-read-button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  align-self:flex-start;
  min-width:145px;
  min-height:48px;
  margin-top:auto!important;
  padding:0 18px;
  border-radius:16px;
  color:#fff!important;
  background:var(--lib-plum)!important;
  box-shadow:0 12px 28px rgba(67,40,75,.18);
  font-size:12px!important;
  font-weight:800!important;
  text-decoration:none;
}

.premium-book-copy .premium-read-button::after{
  content:"→";
  margin-left:9px;
  font-size:16px;
  font-weight:500;
}

.premium-book-copy .premium-read-button:hover{
  background:var(--lib-plum-soft)!important;
  transform:translateY(-1px);
}

.premium-library-empty{
  margin-top:20px;
}

.library-discover-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:28px;
  align-items:center;
  margin-top:40px;
  padding:32px 34px;
  border:1px solid var(--lib-line);
  border-radius:30px;
  background:
    radial-gradient(circle at 90% 10%,rgba(181,139,77,.13),transparent 17rem),
    linear-gradient(135deg,#fffdfa,#efe7e1);
  box-shadow:0 18px 48px rgba(45,28,51,.06);
}

.library-discover-card h2{
  margin:5px 0 8px;
  color:var(--lib-plum);
  font:600 40px/1 "Cormorant Garamond",serif;
}

.library-discover-card p{
  max-width:680px;
  margin:0;
  color:#766c78;
  line-height:1.6;
}

.library-discover-card>a{
  padding:15px 20px;
  border-radius:16px;
  color:#fff;
  background:var(--lib-plum);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

@media(max-width:1100px){
  .library-hero-grid{
    grid-template-columns:1fr;
  }

  .library-count-card{
    width:min(360px,100%);
  }

  .premium-book-grid{
    grid-template-columns:1fr;
  }

  .premium-book-card{
    grid-template-columns:260px minmax(0,1fr);
  }
}

@media(max-width:720px){
  .library-hero{
    padding-top:30px;
  }

  .library-hero-copy h1{
    font-size:56px;
  }

  .library-section-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }

  .library-section-heading>p{
    text-align:left;
  }

  .premium-book-card{
    grid-template-columns:1fr;
  }

  .premium-book-visual{
    min-height:330px;
    border-right:0;
    border-bottom:1px solid rgba(67,40,75,.07);
  }

  .premium-book-visual img{
    width:min(190px,62%);
    max-height:290px;
  }

  .premium-book-copy{
    padding:28px;
  }

  .library-discover-card{
    grid-template-columns:1fr;
  }

  .library-discover-card>a{
    justify-self:start;
  }
}

@media(max-width:480px){
  .premium-book-visual{
    min-height:300px;
    padding:24px;
  }

  .premium-book-copy h3{
    font-size:38px;
  }

  .premium-book-copy .premium-read-button{
    width:100%;
  }
}
