
/* ================================================================
   E-Learning Catalogue
   Design language matched to the provided catalogue reference:
   black canvas, centered gold title, book-cover-first layout,
   minimal text, generous spacing.
   Mobile-first.
   ================================================================ */

:root{
  --catalogue-bg:#000;
  --catalogue-gold:#baa274;
  --catalogue-text:#fff;
  --catalogue-muted:#7c7c7c;
}

body.elearning-catalogue-page{
  background:var(--catalogue-bg);
  color:var(--catalogue-text);
}

/* Keep the shared topbar visually aligned with catalogue reference */
.elearning-catalogue-page .main-header{
  position:absolute;
  z-index:100;
  width:100%;
  background:transparent;
}

/* Main black stage */
.elearning-catalogue{
  background:#000;
  min-height:100vh;
}

.catalogue-head-space{
  height:118px;
}

.catalogue-main{
  background:#000;
  padding:24px 0 86px;
}

.catalogue-container{
  width:min(100% - 30px, 1320px);
  margin:0 auto;
}

/* Title — clean and centered like source */
.catalogue-title-wrap{
  position:relative;
  text-align:center;
  padding:38px 0 48px;
}

.catalogue-kicker{
  margin:0 0 8px;
  color:#a9b7ac;
  font-size:12px;
  line-height:1.5;
  font-weight:400;
  letter-spacing:.24em;
  text-transform:uppercase;
}

.catalogue-title-wrap h1{
  margin:0;
  color:var(--catalogue-gold);
  font-size:clamp(28px, 8vw, 42px);
  line-height:1.2;
  font-weight:300;
  letter-spacing:.01em;
}

/* E-Book catalogue: a predictable, fluid grid across phone, tablet and desktop.
   The DearFlip runtime may set inline dimensions; limit them to each grid cell. */
.smart-dflip-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px 12px;
  width:100%;
  max-width:1120px;
  margin:0 auto;
  align-items:start;
}
.smart-dflip-grid > .ebook-entry{
  min-width:0;
  width:100%;
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  text-align:center;
}
.smart-dflip-grid ._df_thumb.smart-book{
  box-sizing:border-box !important;
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid rgba(133,176,145,.25) !important;
  border-radius:12px !important;
  background:#102219 !important;
  box-shadow:0 8px 24px rgba(0,0,0,.24) !important;
  overflow:hidden !important;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:transform .2s ease,border-color .2s ease;
}
.smart-dflip-grid ._df_thumb.smart-book:focus-visible,
.smart-dflip-grid .smart-book-fallback:focus-visible{
  outline:3px solid #a8d77e !important;
  outline-offset:3px;
}
@media(hover:hover) and (pointer:fine){
  .smart-dflip-grid ._df_thumb.smart-book:hover{
    transform:translateY(-3px);
    border-color:rgba(168,215,126,.65) !important;
  }
}
/* DearFlip versions wrap the cover differently: contain every variant.
   Avoid forcing height:100% on the title element. */
.smart-dflip-grid ._df_thumb .df-book-wrapper,
.smart-dflip-grid ._df_thumb .df-book-cover,
.smart-dflip-grid ._df_thumb .df-book-cover-wrapper{
  box-sizing:border-box !important;
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  aspect-ratio:210/297 !important;
  overflow:hidden !important;
  border-radius:10px 10px 0 0 !important;
  background-position:center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
}
.smart-dflip-grid ._df_thumb .df-book-cover-img,
.smart-dflip-grid ._df_thumb .df-book-cover img,
.smart-dflip-grid ._df_thumb img.df-book-cover-img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  object-fit:cover !important;
  object-position:center !important;
}
.smart-dflip-grid .df-book-title,
.smart-dflip-grid ._df_thumb .df-book-title{
  box-sizing:border-box !important;
  display:-webkit-box !important;
  position:static !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:10px 9px 12px !important;
  color:#f2f6f0 !important;
  background:#102219 !important;
  text-align:center !important;
  font-size:clamp(12px,1.5vw,15px) !important;
  font-weight:600 !important;
  line-height:1.5 !important;
  letter-spacing:0 !important;
  overflow:hidden !important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow-wrap:anywhere;
  opacity:1 !important;
}
.smart-dflip-grid .df-book-tag,
.smart-dflip-grid .df-book-open,
.smart-dflip-grid .df-book-info{display:none !important;}

/* Fall back to regular links when the local Flipbook runtime is unavailable. */
.smart-dflip-grid .smart-book-fallback{
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
  height:100%;
  color:#f2f6f0;
  text-decoration:none;
  border:1px solid rgba(133,176,145,.25);
  border-radius:12px;
  background:#102219;
  overflow:hidden;
}
.smart-dflip-grid .smart-book-fallback__cover{
  display:block;
  position:relative;
  width:100%;
  aspect-ratio:210/297;
  overflow:hidden;
  background:#0a1a12;
}
.smart-dflip-grid .smart-book-fallback__cover img{
  display:block;
  width:100%;height:100%;
  object-fit:cover;
  object-position:center;
}
.smart-dflip-grid .smart-book-fallback__title{
  display:-webkit-box;
  margin:0;
  padding:10px 9px 0;
  min-height:3em;
  overflow:hidden;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#f2f6f0;
  font-size:clamp(12px,1.5vw,15px);
  font-weight:600;
  line-height:1.5;
  text-align:center;
}
.smart-dflip-grid .smart-book-fallback__action{
  display:block;
  margin-top:auto;
  padding:10px 9px 13px;
  color:#afd994;
  font-size:12px;
  font-weight:600;
  text-align:center;
}
@media(hover:hover) and (pointer:fine){
  .smart-dflip-grid .smart-book-fallback:hover{border-color:#a8d77e;transform:translateY(-3px);}
}
@media(min-width:650px){
  .smart-dflip-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 22px;}
}
@media(min-width:1100px){
  .smart-dflip-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 26px;}
}
@media(max-width:370px){
  .smart-dflip-grid{gap:14px 9px;}
  .smart-dflip-grid .df-book-title,
  .smart-dflip-grid ._df_thumb .df-book-title,
  .smart-dflip-grid .smart-book-fallback__title{font-size:12px !important;}
}
@media(prefers-reduced-motion:reduce){
  .smart-dflip-grid ._df_thumb.smart-book,
  .smart-dflip-grid .smart-book-fallback{transition:none !important;}
}

/* Admin-only DearFlip local runtime notice. Public visitors never see it. */
.elearning-runtime-notice{
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid rgba(216,184,91,.32);
  border-radius:10px;
  background:rgba(216,184,91,.07);
  color:#d8c98f;
  font-size:13px;
  line-height:1.5;
}
.elearning-runtime-notice a{
  color:#f1cf68;
  font-weight:650;
  text-decoration:underline;
  text-underline-offset:2px;
}

/* Phase 4: preserve DearFlip markup and behavior; improve card sizing and
   touch readability without relying on the plugin's inline dimensions. */
body.elearning-page .smart-dflip-grid{
  box-sizing:border-box;
  min-width:0;
  grid-auto-flow:row;
}
body.elearning-page .smart-dflip-grid > .ebook-entry{
  min-width:0;
  max-width:100%;
}
body.elearning-page .smart-dflip-grid ._df_thumb.smart-book,
body.elearning-page .smart-dflip-grid .smart-book-fallback{
  max-width:100% !important;
  min-width:0;
}
body.elearning-page .smart-dflip-grid .df-book-title,
body.elearning-page .smart-dflip-grid ._df_thumb .df-book-title{
  color:#f2f6f0 !important;
  font-size:14px !important;
  line-height:1.6 !important;
  font-weight:600 !important;
  min-height:3.2em;
}
body.elearning-page .smart-dflip-grid .smart-book-fallback__title{
  font-size:14px;
  line-height:1.6;
}
body.elearning-page .smart-dflip-grid .smart-book-fallback__action{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:8px 10px;
  font-size:13px;
}
@media(max-width:370px){
  body.elearning-page .smart-dflip-grid .df-book-title,
  body.elearning-page .smart-dflip-grid ._df_thumb .df-book-title,
  body.elearning-page .smart-dflip-grid .smart-book-fallback__title{
    font-size:12px !important;
  }
}
