/* Dr. Harrasi library. All rules are scoped; shared audio/player CSS stays intact. */
.library-page{background:var(--paper-2,#f6f9fc)}
.library-page [hidden]{display:none!important}
.library-page :focus-visible{outline:3px solid #1f567f;outline-offset:4px}
.library-page .library-hero{padding:54px 0 48px;background:radial-gradient(ellipse at 12% 20%,#dff6fb 0,transparent 42%),linear-gradient(120deg,#edf4fa,#fff);border-bottom:1px solid #dbe6ef}
.library-page .library-hero h1{font-size:clamp(32px,4.7vw,56px);margin-bottom:18px}
.library-page .library-hero p{font-size:18px;color:#51677e;line-height:2;max-width:720px;margin-bottom:0}
.library-page .library-hero-line{width:70px;height:4px;background:#bfd800;border-radius:9px;margin-top:28px}
.library-page .library-section{padding-block:42px 54px}
.library-page .library-section-heading{margin-bottom:28px}
.library-page .library-kicker{font-size:11px;font-weight:800;letter-spacing:1.8px;color:#41627d;direction:ltr;display:block;margin-bottom:9px}
.library-page .library-section-heading h2{font-size:28px}
.library-page .library-hub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.library-page .library-resource{position:relative;background:#fff;border:1px solid #dbe6ef;border-radius:28px;padding:26px;box-shadow:0 14px 38px #07182708;transition:transform .25s,box-shadow .25s;display:flex;flex-direction:column;min-width:0}
.library-page .library-resource:hover{transform:translateY(-5px);box-shadow:0 20px 48px #07182712}
.library-page .library-resource-visual{height:145px;border-radius:19px;background:linear-gradient(140deg,#0b1e35,#1f567f);color:#8fd7e7;display:flex;justify-content:center;align-items:center;margin-bottom:23px;position:relative;overflow:hidden}
.library-page .library-resource-visual svg{width:96px;height:96px}
.library-page .library-resource-visual>span[lang]{position:absolute;left:18px;bottom:12px;font-size:13px;color:#dff6fb}
.library-page .library-resource h3{font-size:23px;margin-bottom:12px}
.library-page .library-resource p{color:#5c7186;font-size:15px;line-height:1.95;flex:1}
.library-page .library-resource small{color:#41627d;display:block;margin-bottom:23px}
.library-page .library-card-link{display:flex;align-items:center;justify-content:space-between;color:#123659;border-top:1px solid #edf4fa;padding-top:16px;font-size:14px}
.library-page .library-wave{font-size:36px;letter-spacing:7px;direction:ltr}
.library-page .library-mic{font-size:70px;font-family:Arial}
.library-page .library-breadcrumb{display:flex;flex-wrap:wrap;gap:10px;font-size:13px;color:#51677e;margin-bottom:22px}
.library-page .library-breadcrumb a:hover{text-decoration:underline}
.library-page .library-stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:25px}
.library-page .library-stats span{border:1px solid #dbe6ef;background:#ffffffc9;border-radius:12px;padding:9px 15px;color:#51677e;font-size:13px}
.library-page .library-stats b{color:#123659;margin-left:5px;font-size:18px}
.library-page .library-filters{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:12px;padding:22px;background:#fff;border:1px solid #dbe6ef;border-radius:22px;align-items:end}
.library-page .library-filters label,.library-page .reader-toolbar label{display:grid;gap:7px;color:#41627d;font-size:12px;min-width:0}
.library-page input,.library-page select{width:100%;min-width:0;border:1px solid #ccdce8;background:#f9fcfe;color:#123659;border-radius:11px;padding:11px 12px;font-size:14px}
.library-page .library-filters>button{grid-column:1/-1;justify-self:end}
.library-page .library-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #123659;border-radius:11px;padding:9px 14px;background:#123659;color:#fff;font-size:13px;font-weight:700;cursor:pointer;gap:5px;white-space:normal;text-align:center;transition:background .2s}
.library-page .library-button:hover{background:#1f567f;color:#fff}
.library-page .library-button-soft{background:#fff;color:#123659;border-color:#ccdce8}
.library-page .library-button-soft:hover{background:#edf4fa;color:#123659}
.library-page .library-button:disabled{opacity:.45;cursor:default}
.library-page .library-categories{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}
.library-page .library-categories .library-button{border-radius:99px;padding-inline:17px}
.library-page .library-categories button[aria-pressed=true]{background:#123659;color:#fff;border-color:#123659}
.library-page .library-result-line{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-block:28px 18px;color:#60758b;font-size:14px}
.library-page .library-result-line p{margin:0}
.library-page #collection-heading{font-size:25px;margin-bottom:20px;overflow-wrap:anywhere}
.library-page .library-collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.library-page .library-collection,.library-page .library-book{background:#fff;border:1px solid #dbe6ef;border-radius:23px;box-shadow:0 12px 34px #07182707;padding:22px;min-width:0}
.library-page .library-collection h3,.library-page .library-book h3{font-size:18px;direction:ltr;text-align:start;letter-spacing:0;overflow-wrap:anywhere;line-height:1.65;margin-block:17px 10px}
.library-page .library-collection p,.library-page .library-book p{color:#60758b;font-size:13px}
.library-page .library-cover{height:155px;background:linear-gradient(130deg,#123659,#0b1e35);border-radius:16px;position:relative;overflow:hidden;display:flex;align-items:center;padding:22px;direction:ltr;border-left:9px solid #294d6b;box-shadow:inset 3px 0 6px #06111f55;color:#fff}
.library-page .library-cover:after{content:"";position:absolute;right:-30px;bottom:-75px;width:165px;height:165px;border:1px solid #8fd7e744;border-radius:50%;box-shadow:0 0 0 18px #8fd7e712,0 0 0 36px #8fd7e709}
.library-page .library-cover span{font-size:18px;line-height:1.5;letter-spacing:0;max-width:85%;z-index:1;font-weight:700}
.library-page .library-cover small{position:absolute;bottom:10px;right:14px;color:#8fd7e7;font-size:10px;letter-spacing:1.5px}
.library-page .library-tag{display:inline-block;border:1px solid #dbe6ef;border-radius:99px;padding:4px 10px;background:#f6f9fc;font-size:11px;color:#41627d;margin:0 0 6px 5px}
.library-page .library-book-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.library-page .library-book-actions a{font-size:12px;flex:1}
.library-page .library-book .library-tag{direction:ltr}
.library-page .library-empty{grid-column:1/-1;text-align:center;padding:40px;background:#fff;border:1px dashed #ccdce8;border-radius:22px;color:#60758b}
.library-page .library-reader{padding-block:28px 10px}
.library-page .reader-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;min-width:0}
.library-page .reader-heading>div{min-width:0}
.library-page .reader-heading h1{font-size:25px;direction:ltr;text-align:start;overflow-wrap:anywhere;letter-spacing:0}
.library-page .reader-links{display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0}
.library-page #reader-status{font-size:14px;color:#41627d;min-height:24px}
.library-page .reader-notice{background:#fff;border:1px solid #dbe6ef;border-radius:18px;padding:24px;margin-bottom:18px}
.library-page .reader-shell{background:#e8eff5;border:1px solid #ccdce8;border-radius:22px;overflow:hidden;position:relative}
.library-page .reader-toolbar{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:13px;background:#fff;border-bottom:1px solid #ccdce8;position:relative;z-index:2}
.library-page .reader-toolbar #page-form{display:flex;gap:7px;align-items:center;font-size:12px;direction:ltr}
.library-page .reader-toolbar #page-number{width:64px;padding:9px 6px;text-align:center;min-height:44px}
.library-page .reader-toolbar select{width:137px;padding:9px 8px;min-height:44px}
.library-page .reader-toolbar>label{display:flex;align-items:center;gap:6px}
.library-page .reader-toolbar output{min-width:45px;text-align:center;font-size:12px;color:#41627d}
.library-page .reader-viewport{height:min(74vh,840px);min-height:320px;overflow:auto;padding:20px;overscroll-behavior:contain;perspective:1800px;touch-action:pan-x pan-y pinch-zoom}
.library-page .reader-pages{display:flex;align-items:flex-start;justify-content:center;min-width:100%;position:relative;transform-style:preserve-3d}
.library-page .reader-sheet{position:relative;background:#fff;box-shadow:0 12px 26px #07182724;flex:none;min-height:150px}
.library-page .reader-sheet+.reader-sheet{border-left:1px solid #07182722}
.library-page .reader-sheet canvas{display:block;max-width:none}
.library-page .reader-sheet figcaption{position:absolute;bottom:3px;right:6px;background:#ffffffe6;color:#60758b;padding:0 5px;border-radius:3px;font:10px Arial;pointer-events:none}
.library-page .reader-sheet{margin:0}
.library-page .reader-turn-overlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-start;pointer-events:none;transform-style:preserve-3d}
.library-page .reader-turn-canvas{flex:none;box-shadow:0 4px 18px #07182730;backface-visibility:hidden}
.library-page .reader-paper-leaf{background:#fff;overflow:hidden}
.library-page .reader-paper-leaf canvas{display:block;width:100%!important;height:100%!important;box-shadow:none}
.library-page .reader-accessible-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:pre-wrap;border:0}
.library-page .reader-pages.spread:after{content:"";position:absolute;top:0;bottom:0;left:50%;width:26px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#07182725,transparent);pointer-events:none}
.library-page .reader-pages.continuous{display:block}
.library-page .reader-pages.continuous .reader-sheet{margin:0 auto 20px;border:0}
.library-page .reader-pages.continuous .reader-placeholder{background:#ffffffaa;box-shadow:none}
.library-page .reader-hint{font-size:12px;color:#60758b;text-align:center;padding:14px;margin:0;background:#fff}
.library-page .reader-shell:fullscreen{width:100%;height:100%;border-radius:0;display:flex;flex-direction:column;background:#e8eff5}
.library-page .reader-shell:fullscreen .reader-viewport{height:auto;flex:1;min-height:0}
@media(min-width:900px){.library-page .reader-pages.is-turning-next .reader-sheet:last-of-type{animation:library-turn-next .32s ease-in-out;transform-origin:left center}.library-page .reader-pages.is-turning-prev .reader-sheet:first-of-type{animation:library-turn-prev .32s ease-in-out;transform-origin:right center}}
@keyframes library-turn-next{0%{transform:rotateY(0deg);filter:brightness(1)}50%{transform:rotateY(-80deg);filter:brightness(.8)}100%{transform:rotateY(0deg);filter:brightness(1)}}
@keyframes library-turn-prev{0%{transform:rotateY(0deg)}50%{transform:rotateY(80deg);filter:brightness(.8)}100%{transform:rotateY(0deg)}}
@media(max-width:1024px){.library-page .library-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.library-page .library-search{grid-column:span 2}.library-page .reader-heading{display:block}.library-page .reader-links{margin-top:12px}}
@media(max-width:768px){.library-page .library-hub-grid{grid-template-columns:1fr}.library-page .library-resource{padding:22px}.library-page .library-resource-visual{height:130px}.library-page .library-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.library-page .library-collection,.library-page .library-book{padding:16px}.library-page .library-cover{height:130px;padding:16px}.library-page .library-cover span{font-size:15px}.library-page .library-hero{padding-block:35px}.library-page .reader-viewport{height:65vh;padding:10px}.library-page .reader-toolbar{gap:6px;padding:9px}.library-page .reader-toolbar .library-button{padding:8px 10px}}
@media(max-width:480px){.library-page .library-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:15px}.library-page .library-search{grid-column:1/-1}.library-page .library-collection-grid{grid-template-columns:1fr}.library-page .library-hero p{font-size:16px}.library-page .library-section{padding-block:28px 35px}.library-page .library-stats{gap:6px}.library-page .library-stats span{padding:7px 10px;font-size:11px}.library-page .library-categories{gap:6px}.library-page .library-categories .library-button{padding-inline:11px;font-size:12px}.library-page .reader-toolbar #page-form{order:-1;justify-content:center;width:100%}.library-page .reader-links .library-button{flex:1}.library-page .reader-hint{line-height:1.9}}
@media(prefers-reduced-motion:reduce){.library-page *{animation:none!important;transition:none!important}}


/* ============================================================
  Educational Resources Hub refresh (2026-10-15)
  Uses the live site's audio gateway hero and animated cards.
  Scoped to podcasts.html via .library-page to avoid regressions.
  ============================================================ */
.library-page .audio-gateway-hero{
  padding:clamp(76px,7.5vw,110px) 0 clamp(76px,7vw,100px);
  background:radial-gradient(circle at 50% 120%,rgba(31,86,127,.14),transparent 50%),#061626;
}
.library-page .audio-gateway-copy{max-width:870px;text-align:center}
.library-page .audio-gateway-copy h1{font-size:clamp(38px,5.2vw,62px);line-height:1.35}
.library-page .audio-gateway-copy p{font-size:clamp(14.5px,1.4vw,17px);line-height:2.08}
.library-page .audio-choice-section{padding:clamp(54px,6vw,74px) 0 clamp(74px,8vw,108px)}
.library-page .audio-choice-intro{max-width:800px;margin-bottom:36px}
.library-page .audio-choice-section .audio-gateway-cards--resources{
  width:min(100%,1200px);
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}
.library-page .audio-choice-section .audio-gateway-card{
  min-width:0;
  min-height:415px;
  padding:30px 20px 23px;
  border-radius:30px;
}
.library-page .audio-choice-section .audio-gateway-card h2{
  font-size:clamp(24px,2.3vw,32px);
  line-height:1.52;
  margin-bottom:11px;
}
.library-page .audio-choice-section .audio-gateway-card p{
  font-size:14px;
  line-height:1.95;
  margin-bottom:17px;
}
.library-page .audio-choice-section .audio-gateway-card__meta{font-size:11px;white-space:nowrap}
.library-page .audio-choice-section .audio-gateway-card__chips{gap:6px;margin-bottom:17px}
.library-page .audio-choice-section .audio-gateway-card__chips span{min-height:29px;padding:0 9px;font-size:11px}
.library-page .audio-choice-section .audio-gateway-card__cta{min-height:54px;border-radius:17px;font-size:14px}
.library-page .audio-choice-section .audio-card-motion{flex:none;width:100px;height:100px;margin-bottom:16px}
.library-page .audio-gateway-card--books{
  --audio-card-glow:rgba(142,216,232,.17);
  --audio-card-glow-strong:rgba(183,214,11,.16);
  --audio-card-accent:#d4e983;
}
/* The same live glass-icon tile, with a CSS-drawn animated paper leaf. */
.library-page .audio-choice-section .audio-card-motion--books{
  position:relative;
  align-items:center;
  justify-content:center;
  padding:0;
  gap:0;
  overflow:hidden;
  perspective:420px;
}
.library-page .audio-card-motion--books .resource-book-leaf{
  position:absolute;
  z-index:3;
  top:27px;
  width:30px;
  height:45px;
  display:block;
  border:2px solid #123f61;
  background:linear-gradient(120deg,#eaf7fb,#fff 65%);
  box-shadow:0 3px 8px rgba(8,34,58,.09);
}
.library-page .audio-card-motion--books .resource-book-leaf--left{
  left:21px;
  border-radius:7px 1px 1px 6px;
  transform:skewY(-6deg);
}
.library-page .audio-card-motion--books .resource-book-leaf--right{
  right:21px;
  border-radius:1px 7px 6px 1px;
  transform:skewY(6deg);
}
.library-page .audio-card-motion--books .resource-book-leaf--turn{
  left:50%;
  width:29px;
  margin-left:0;
  border-radius:1px 7px 5px 1px;
  background:linear-gradient(120deg,#f9fbe5,#e6f1f8);
  transform-origin:left center;
  animation:resourceBookTurn 4s ease-in-out infinite;
}
.library-page .audio-card-motion--books .resource-book-leaf--left::after,
.library-page .audio-card-motion--books .resource-book-leaf--right::after{
  content:"";position:absolute;top:12px;left:7px;width:14px;height:2px;
  background:#8ed8e8;box-shadow:0 8px #8ed8e8,0 16px #8ed8e8;opacity:.75;
}
@keyframes resourceBookTurn{
  0%,18%,85%,100%{transform:rotateY(0deg)}
  48%,56%{transform:rotateY(-158deg)}
}
@media(max-width:1050px){
  .library-page .audio-choice-section .audio-gateway-cards--resources{gap:14px}
  .library-page .audio-choice-section .audio-gateway-card{padding:25px 15px 20px}
  .library-page .audio-choice-section .audio-gateway-card h2{font-size:clamp(23px,2.7vw,28px)}
}
@media(max-width:820px){
  .library-page .audio-gateway-hero{padding:76px 0 72px}
  .library-page .audio-choice-section .audio-gateway-cards--resources{grid-template-columns:1fr;max-width:560px;gap:17px}
  .library-page .audio-choice-section .audio-gateway-card{min-height:0;padding:28px 25px 24px}
  .library-page .audio-choice-section .audio-gateway-card h2{font-size:clamp(26px,4.5vw,34px)}
  .library-page .audio-choice-intro{margin-bottom:25px}
}
@media(max-width:520px){
  .library-page .audio-gateway-hero{padding:60px 0 62px}
  .library-page .audio-gateway-copy h1{font-size:clamp(33px,8.2vw,43px)}
  .library-page .audio-gateway-copy p{line-height:1.95}
  .library-page .audio-choice-section{padding:35px 0 65px}
  .library-page .audio-choice-intro h2{font-size:clamp(24px,6.5vw,30px)}
  .library-page .audio-choice-section .audio-gateway-card{padding:26px 18px 22px;border-radius:27px}
  .library-page .audio-choice-section .audio-gateway-card p{font-size:14px}
  .library-page .audio-choice-section .audio-card-motion{width:86px;height:86px}
  .library-page .audio-card-motion--books .resource-book-leaf{top:21px}
  .library-page .audio-card-motion--books .resource-book-leaf--left{left:15px}
  .library-page .audio-card-motion--books .resource-book-leaf--right{right:15px}
}
@media(prefers-reduced-motion:reduce){
  .library-page .audio-card-motion--books .resource-book-leaf--turn{animation:none!important}
}

/* ============================================================
  Resources hub hero size alignment fix (2026-10-15)
  Match the vertical rhythm of pages like blog.html more closely.
  ============================================================ */
.library-page .audio-gateway-hero{
  min-height:clamp(460px,54vw,570px);
  display:grid;
  place-items:center;
  padding-block:clamp(78px,8vw,106px);
}
.library-page .audio-gateway-inner{width:100%}

@media(max-width:820px){
  .library-page .audio-gateway-hero{
    min-height:auto;
    padding-block:clamp(68px,14vw,88px);
  }
}

@media(max-width:520px){
  .library-page .audio-gateway-hero{
    padding-block:58px 60px;
  }
}
