/* Academia Yamilet · Biblioteca / Recursos v100 */

[data-shell-page="library"].academy-library-page{
  width:100%;
  min-width:0;
  padding-bottom:calc(112px + env(safe-area-inset-bottom,0px));
}

/* Hero de biblioteca cuando existen recursos */
[data-shell-page="library"].academy-library-page>.shell-page-heading{
  position:relative;
  min-height:250px;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:24px!important;
  padding:28px!important;
  margin:0 0 16px!important;
  overflow:hidden;
  border:1px solid rgba(18,63,53,.10)!important;
  border-radius:24px!important;
  background:
    linear-gradient(90deg,rgba(10,49,41,.95) 0%,rgba(14,65,54,.88) 46%,rgba(14,65,54,.36) 100%),
    url('../imagenes-academia-yamilet-final/15-recursos-descargables.webp') center 46%/cover no-repeat!important;
  box-shadow:0 18px 44px rgba(18,63,53,.13)!important;
}
[data-shell-page="library"].academy-library-page>.shell-page-heading>div:first-child{
  position:relative;
  z-index:1;
  max-width:650px;
}
[data-shell-page="library"]>.shell-page-heading .kicker{
  color:#e2bd5c!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
[data-shell-page="library"]>.shell-page-heading h2{
  margin:7px 0 8px!important;
  color:#fff!important;
  font:600 clamp(34px,4vw,52px)/1 Georgia,"Times New Roman",serif!important;
  letter-spacing:-.035em!important;
}
[data-shell-page="library"]>.shell-page-heading p{
  max-width:560px!important;
  margin:0!important;
  color:rgba(238,246,242,.82)!important;
  font-size:13px!important;
  line-height:1.55!important;
}
[data-shell-page="library"]>.shell-page-heading .shell-summary{
  position:relative;
  z-index:1;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(92px,1fr))!important;
  gap:8px!important;
}
[data-shell-page="library"]>.shell-page-heading .shell-summary article{
  min-width:92px!important;
  min-height:72px!important;
  padding:12px!important;
  border:1px solid rgba(255,255,255,.15)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.10)!important;
  backdrop-filter:blur(9px);
  box-shadow:none!important;
}
[data-shell-page="library"]>.shell-page-heading .shell-summary strong{color:#fff!important;font-size:22px!important}
[data-shell-page="library"]>.shell-page-heading .shell-summary span{color:rgba(238,246,242,.76)!important;font-size:8px!important}

/* Hero cuando todavía no hay recursos */
[data-shell-page="library"] .academy-library-hero{
  position:relative;
  min-height:250px;
  align-items:end!important;
  overflow:hidden;
  padding:28px!important;
  background:
    linear-gradient(90deg,rgba(10,49,41,.95) 0%,rgba(14,65,54,.86) 48%,rgba(14,65,54,.34) 100%),
    url('../imagenes-academia-yamilet-final/15-recursos-descargables.webp') center 46%/cover no-repeat!important;
  box-shadow:0 18px 44px rgba(18,63,53,.13)!important;
}
[data-shell-page="library"] .academy-library-hero h2{font-size:clamp(32px,4vw,48px)!important;max-width:620px}
[data-shell-page="library"] .academy-library-hero p{max-width:560px;font-size:13px!important}

/* Herramientas */
[data-shell-page="library"] .academy-library-toolbar{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) auto auto!important;
  gap:10px!important;
  margin:0 0 15px!important;
  padding:10px!important;
  border:1px solid rgba(18,63,53,.08);
  border-radius:18px;
  background:rgba(255,255,255,.82);
  box-shadow:0 8px 24px rgba(18,63,53,.04);
}
[data-shell-page="library"] .academy-library-search{
  height:42px!important;
  border-radius:12px!important;
  background:#fff!important;
}
[data-shell-page="library"] .academy-library-filters{gap:6px!important}
[data-shell-page="library"] .academy-library-filters button{
  min-height:38px!important;
  border-radius:11px!important;
  font-size:9px!important;
}
[data-shell-page="library"] .academy-library-visible{
  min-width:64px!important;
  display:grid;
  place-content:center;
}

/* Grid y recursos */
[data-shell-page="library"]>.shell-grid.two{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
[data-shell-page="library"] .library-card{
  min-width:0!important;
  min-height:156px!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr)!important;
  align-items:start!important;
  gap:14px!important;
  padding:17px!important;
  border:1px solid rgba(18,63,53,.09)!important;
  border-radius:19px!important;
  background:linear-gradient(145deg,#fff,#fbfcf9)!important;
  box-shadow:0 8px 24px rgba(18,63,53,.045)!important;
}
[data-shell-page="library"] .library-card:hover{
  transform:translateY(-2px)!important;
  border-color:rgba(18,63,53,.18)!important;
  box-shadow:0 14px 34px rgba(18,63,53,.08)!important;
}
[data-shell-page="library"] .library-icon{
  position:relative;
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden;
  border-radius:16px!important;
  background:#eaf2ed!important;
  color:transparent!important;
  font-size:0!important;
}
[data-shell-page="library"] .library-icon::after{
  content:'R';
  display:grid;
  place-items:center;
  width:100%;height:100%;
  color:#17483d;
  font-size:16px;
  font-weight:900;
}
[data-shell-page="library"] .library-card[data-library-type="document"] .library-icon::after{content:'PDF';font-size:10px;letter-spacing:.05em}
[data-shell-page="library"] .library-card[data-library-type="audio"] .library-icon::after{content:'♪';font-size:22px}
[data-shell-page="library"] .library-card[data-library-type="exercise"] .library-icon::after{content:'✎';font-size:20px}
[data-shell-page="library"] .library-card[data-library-type="link"] .library-icon::after{content:'↗';font-size:20px}
[data-shell-page="library"] .library-card>div:last-child{
  min-width:0;
  display:flex;
  flex-direction:column;
  height:100%;
}
[data-shell-page="library"] .library-meta{
  display:inline-flex!important;
  align-self:flex-start;
  width:auto!important;
  margin:0 0 6px!important;
  padding:4px 7px!important;
  border-radius:999px!important;
  background:#f0f4ef!important;
  color:#547066!important;
  font-size:8px!important;
  font-weight:850!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
[data-shell-page="library"] .library-card h3{
  margin:0 0 6px!important;
  color:#263d33!important;
  font:600 20px/1.08 Georgia,"Times New Roman",serif!important;
  letter-spacing:-.02em!important;
}
[data-shell-page="library"] .library-card p{
  display:-webkit-box;
  margin:0!important;
  color:#76837b!important;
  font-size:11px!important;
  line-height:1.5!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
[data-shell-page="library"] .library-card .shell-card-footer{
  margin-top:auto!important;
  padding-top:12px!important;
  border-top:0!important;
}
[data-shell-page="library"] .library-card .shell-action{
  min-height:38px!important;
  padding:0 13px!important;
  border-radius:11px!important;
  font-size:10px!important;
  font-weight:850!important;
}
[data-shell-page="library"] .library-card .shell-action.primary{
  background:#123f35!important;
  color:#fff!important;
  border-color:#123f35!important;
}

/* Estado vacío */
[data-shell-page="library"] .academy-library-empty{
  min-height:190px!important;
  padding:25px!important;
  border-radius:20px!important;
}
[data-shell-page="library"] .academy-library-empty h3{font-size:24px!important}

@media(max-width:760px){
  [data-shell-page="library"].academy-library-page>.shell-page-heading,
  [data-shell-page="library"] .academy-library-hero{
    min-height:280px!important;
    grid-template-columns:1fr!important;
    align-content:end!important;
    gap:14px!important;
    padding:20px!important;
    background:
      linear-gradient(180deg,rgba(11,52,43,.34) 0%,rgba(11,52,43,.70) 42%,rgba(10,48,40,.96) 100%),
      url('../imagenes-academia-yamilet-final/15-recursos-descargables.webp') center 38%/cover no-repeat!important;
  }
  [data-shell-page="library"]>.shell-page-heading h2,
  [data-shell-page="library"] .academy-library-hero h2{font-size:32px!important;line-height:1.02!important}
  [data-shell-page="library"]>.shell-page-heading p,
  [data-shell-page="library"] .academy-library-hero p{font-size:12px!important;line-height:1.48!important}
  [data-shell-page="library"]>.shell-page-heading .shell-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
  }
  [data-shell-page="library"]>.shell-page-heading .shell-summary article{min-height:58px!important;padding:9px 11px!important}
  [data-shell-page="library"]>.shell-page-heading .shell-summary strong{font-size:18px!important}

  [data-shell-page="library"] .academy-library-toolbar{
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:8px!important;
  }
  [data-shell-page="library"] .academy-library-filters{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    padding:1px 1px 4px!important;
    scrollbar-width:none;
  }
  [data-shell-page="library"] .academy-library-filters::-webkit-scrollbar{display:none}
  [data-shell-page="library"] .academy-library-filters button{flex:0 0 auto!important;white-space:nowrap!important}
  [data-shell-page="library"] .academy-library-visible{display:none!important}

  [data-shell-page="library"]>.shell-grid.two{grid-template-columns:1fr!important;gap:10px!important}
  [data-shell-page="library"] .library-card{
    min-height:138px!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    gap:12px!important;
    padding:14px!important;
    border-radius:17px!important;
  }
  [data-shell-page="library"] .library-icon{width:48px!important;height:48px!important;min-width:48px!important;border-radius:14px!important}
  [data-shell-page="library"] .library-card h3{font-size:18px!important}
  [data-shell-page="library"] .library-card .shell-action{width:100%!important;justify-content:center!important}

  [data-shell-page="library"] .academy-library-empty{
    min-height:0!important;
    grid-template-columns:52px minmax(0,1fr)!important;
    gap:14px!important;
    padding:18px!important;
  }
  [data-shell-page="library"] .academy-library-empty-icon{width:52px!important;height:52px!important;font-size:22px!important;border-radius:15px!important}
  [data-shell-page="library"] .academy-library-empty h3{font-size:20px!important}
}

@media(max-width:430px){
  [data-shell-page="library"].academy-library-page>.shell-page-heading,
  [data-shell-page="library"] .academy-library-hero{min-height:265px!important}
  [data-shell-page="library"] .academy-library-empty{grid-template-columns:1fr!important}
}
