/* Flipbook reader – scoped to page_21 */
.book-reader-page {
  padding: 0 !important;
  overflow: visible;
}

.book-reader-page[data-state="active"] {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* While reading: stop painting the rest of the SPA during drag */
html[data-book-reader="active"] #header,
html[data-book-reader="active"] #footer,
html[data-book-reader="active"] section.ssp-page:not([data-name="page_21"]) {
  content-visibility: hidden;
  contain: strict;
  pointer-events: none; 
}

/* Canvas flip pages: RTL snapshots are pre-mirrored */
.book-flipbook-shell--rtl .stf__wrapper .stf__item > canvas,
.book-flipbook-shell .stf__wrapper.--rtl .stf__item > canvas,
#flipbook-book.--rtl .stf__wrapper .stf__item > canvas {
  transform: none;
}

/* Video + hotspots sit above canvas pages (not inside animated DOM) */
.book-flipbook-shell .flipbook-interactive-layer {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.book-flipbook-shell .flipbook-interactive-layer .page-title,
.book-flipbook-shell .flipbook-interactive-layer .page-text {
  visibility: hidden;
  overflow: hidden;
}

.book-flipbook-shell .flipbook-interactive-layer .page-media--video video {
  pointer-events: none;
}

.book-flipbook-shell .flipbook-interactive-layer .hotspot-btn,
.book-flipbook-shell .flipbook-interactive-layer .video-play-btn {
  pointer-events: auto;
}

/*
 * Book reader: on mobile allow vertical swipe-scroll on the page;
 * horizontal swipe on the flipbook still flips pages (PageFlip mobileScrollSupport).
 */
html[data-active-page="page_21"] .book-flipbook-shell #flipbook-book,
html[data-active-page="page_21"] .book-flipbook-shell .stf__parent,
html[data-active-page="page_21"] .book-flipbook-shell .stf__block,
.book-reader-page[data-state="active"] .book-flipbook-shell #flipbook-book,
.book-reader-page[data-state="active"] .book-flipbook-shell .stf__parent,
.book-reader-page[data-state="active"] .book-flipbook-shell .stf__block {
  touch-action:pan-y;
}
html[data-active-page="page_21"] #header_btns{
top:5px !important;
}
html[data-active-page="page_21"] #header_bar_wrapper{
  min-height: 40px !important;
  height: 40px !important;
  
}
html[data-active-page="page_21"] #header_bar_wrapper #header_bar_content,
html[data-active-page="page_21"] #footer,
html[data-active-page="page_21"] #chatbot-button{
  display: none !important;
}
@media (pointer: coarse) {
  html[data-active-page="page_21"],
  html[data-active-page="page_21"] body,
  html[data-book-reader="active"],
  html[data-book-reader="active"] body {
    overflow-y: auto !important;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }

  html[data-active-page="page_21"] .book-reader-page,
  html[data-book-reader="active"] .book-reader-page,
  html[data-active-page="page_21"] .book-flipbook-shell,
  html[data-book-reader="active"] .book-flipbook-shell,
  html[data-active-page="page_21"] .book-flipbook-shell .flipbook-viewport,
  html[data-book-reader="active"] .book-flipbook-shell .flipbook-viewport,
  html[data-active-page="page_21"] .book-flipbook-shell .book-page,
  html[data-book-reader="active"] .book-flipbook-shell .book-page {
    touch-action: pan-y;
  }

  html[data-active-page="page_21"] .book-flipbook-shell #flipbook-book,
  html[data-active-page="page_21"] .book-flipbook-shell .stf__parent,
  html[data-active-page="page_21"] .book-flipbook-shell .stf__block,
  html[data-book-reader="active"] .book-flipbook-shell #flipbook-book,
  html[data-book-reader="active"] .book-flipbook-shell .stf__parent,
  html[data-book-reader="active"] .book-flipbook-shell .stf__block {
    touch-action: pan-y pan-x;
  }
}

html[data-active-page="page_21"] .book-flipbook-shell .hotspot-btn,
.book-reader-page[data-state="active"] .book-flipbook-shell .hotspot-btn,
html[data-active-page="page_21"] .book-flipbook-shell .flipbook-nav-btn,
.book-reader-page[data-state="active"] .book-flipbook-shell .flipbook-nav-btn,
html[data-active-page="page_21"] .book-flipbook-shell .flipbook-page-audio-btn,
.book-reader-page[data-state="active"] .book-flipbook-shell .flipbook-page-audio-btn {
  touch-action: manipulation;
}

.book-reader-page .book-reader {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.book-flipbook-shell {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  color: #eee;

}

.book-flipbook-shell .flipbook-toolbar {
  display: none !important;
  flex: 0 0 auto;
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  color: #1a1a2e;
}

.book-flipbook-shell .flipbook-viewport {
  flex: 0 0 auto;
  order: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.book-flipbook-shell .flipbook-toolbar-title {
  font-size:20px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.book-flipbook-shell #flipbook-book {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 520px;
  flex: 0 0 auto;
}

/* StPageFlip landscape spread: 2 pages side by side (usePortrait: false) */
html[data-device="desktop"] .book-flipbook-shell #flipbook-book,
.book-flipbook-shell--spread #flipbook-book {
  max-width: 900px;
  /* Must stay visible — hard rotateY / soft clip-path extend outside the box. */
  overflow: visible;
}

html[data-device="desktop"] .book-flipbook-shell .stf__parent,
.book-flipbook-shell--spread .stf__parent {
  overflow: visible;
  height: 100%;
}

/* Flip rect measures .stf__block — must fill the JS-sized book height. */
html[data-device="desktop"] .book-flipbook-shell .stf__wrapper,
.book-flipbook-shell--spread .stf__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

html[data-device="desktop"] .book-flipbook-shell .stf__block,
.book-flipbook-shell--spread .stf__block {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: visible;
  perspective: 2000px;
}

/* Desktop: book fills viewport between header and bottom nav */
html[data-device="desktop"][data-active-page="page_21"] .book-flipbook-shell,
html[data-device="desktop"][data-book-reader="active"] .book-flipbook-shell {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  margin-top:50px;
}

html[data-device="desktop"] .book-flipbook-shell .flipbook-viewport,
.book-flipbook-shell--spread .flipbook-viewport {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
  flex: 0 0 auto;
  align-items: flex-end;
  /* Wood table behind the book — shows in the empty half beside cover/back cover */
  background-color: #5e5958;
  /* background-image: url("../assets/images/book-table-wood.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */
  /* Visible so #flipbook-book's box-shadow always paints (not only while flipping).
     Document scroll is locked on html/body instead. */
  overflow: visible;
}

.book-flipbook-shell.is-flipping .flipbook-viewport,
.book-flipbook-shell.is-flipping #flipbook-book,
.book-flipbook-shell.is-flipping .stf__parent,
.book-flipbook-shell.is-flipping .stf__wrapper,
.book-flipbook-shell.is-flipping .stf__block,
html[data-device="desktop"] .book-flipbook-shell.is-flipping .flipbook-viewport,
.book-flipbook-shell--spread.is-flipping .flipbook-viewport {
  overflow: visible !important;
}

/* Desktop book reader: lock document scroll so flip overflow can't spawn a
   scrollbar (and shift the book). Do NOT clip .book-reader / .book-reader-page. */
html[data-device="desktop"][data-active-page="page_21"],
html[data-device="desktop"][data-book-reader="active"],
html[data-device="desktop"][data-active-page="page_21"] body,
html[data-device="desktop"][data-book-reader="active"] body {
  overflow: hidden !important;
}

/* Any device: while a page is turning, freeze document scrollbars. */
html.book-is-flipping,
html.book-is-flipping body {
  overflow: hidden !important;
}

/* Demo-style spine shadows (desktop spread only) */
.book-flipbook-shell--spread .stf__item.--left,
html[data-device="desktop"] .book-flipbook-shell .stf__item.--left {
  box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.4);
}

.book-flipbook-shell--spread .stf__item.--right,
html[data-device="desktop"] .book-flipbook-shell .stf__item.--right {
  box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.4);
}

/* Hard covers (first / last page) — sit on the wood with a clear edge */
.book-flipbook-shell--spread .book-page[data-density="hard"],
html[data-device="desktop"] .book-flipbook-shell .book-page[data-density="hard"] {
  background-color: #f0e6d8;
  border: 1px solid #c4b49a;
  box-shadow:
    inset 0 0 30px rgba(36, 10, 3, 0.35),
    2px 0 8px rgba(0, 0, 0, 0.35);
}

.book-flipbook-shell .stf__parent {
  margin: 0 auto;
}

/* Engine always lays out LTR; visual RTL is a scaleX mirror. Do not inherit
   body[data-direction] or it can fight the cover side / flip direction. */
.book-flipbook-shell .stf__parent,
.book-flipbook-shell .stf__wrapper,
.book-flipbook-shell .stf__block {
  direction: ltr;
}

/* Bind mirror to the shell (set before PageFlip mounts) so cover side cannot
   race a missing .stf__wrapper.--rtl class on first desktop layout. */
.book-flipbook-shell--rtl .stf__wrapper,
.book-flipbook-shell .stf__wrapper.--rtl,
#flipbook-book.--rtl .stf__wrapper {
  transform: scaleX(-1);
}

.book-flipbook-shell--rtl .stf__wrapper .stf__item > *,
.book-flipbook-shell .stf__wrapper.--rtl .stf__item > *,
#flipbook-book.--rtl .stf__wrapper .stf__item > * {
  transform: scaleX(-1);
}

.book-flipbook-shell .book-page {
  background: #fffef8;
  top: 0 !important;
  /* Floor only: JS sizes the page to max(50rem, text/content height) so long
     text is never clipped. Do not force `height` here or it overrides the
     per-page height StPageFlip applies inline. */
  min-height: 90rem !important;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: right;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

/* Mobile portrait: one page fills the book width. */
.book-flipbook-shell:not(.book-flipbook-shell--spread) .book-page {
  width: 100% !important;
  right: 0 !important;
}

/* Desktop: let StPageFlip own geometry; don't force mobile floor or top:0. */
.book-flipbook-shell--spread .book-page,
html[data-device="desktop"] .book-flipbook-shell .book-page {
  min-height: 0 !important;
  top: auto !important;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
.book-flipbook-shell--rtl .book-page {
  direction: rtl;
}
.book-flipbook-shell--ltr .book-page {
  direction: ltr;
}
.book-flipbook-shell--ltr .book-page .page-title,
.book-flipbook-shell--ltr .book-page .page-text {
  text-align: left !important;
}
.book-flipbook-shell .page-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #34495e;
  margin: 0;
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
}
html[data-device="desktop"] .book-flipbook-shell .page-text{
 line-height: 1.2 !important;
 font-size: 14px !important;
}
.book-flipbook-shell .book-page--rtl {
  direction: rtl;
  text-align: right;
}

.book-flipbook-shell .book-page--ltr {
  direction: ltr;
  text-align: left;
}

.book-flipbook-shell .page-title {
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 0.6rem;
  line-height: 1.3;
  border-bottom: 2px solid #e8d5b7;
  padding-bottom: 0.4rem;
}

.book-flipbook-shell .page-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.65rem;
  overflow: visible;
}

/*
 * RTL flip sets transform on `.stf__item > *`. Overflow on that same node
 * only scrolls ~1px. Scroll the inner wrapper instead.
 */
.book-flipbook-shell .page-scroll {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.book-flipbook-shell .page-scroll-inner {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1rem 1.1rem 0.75rem;
  transform: none;
}

html[data-device="desktop"] .book-flipbook-shell .page-scroll-inner {
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #f38627 transparent;
}

html[data-device="desktop"] .book-flipbook-shell .page-scroll-inner::-webkit-scrollbar {
  width: 6px;
}

html[data-device="desktop"] .book-flipbook-shell .page-scroll-inner::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

html[data-device="desktop"] .book-flipbook-shell .page-scroll-inner::-webkit-scrollbar-thumb {
  background-color: #f38627;
  border-radius: 10px;
}
.book-flipbook-shell .page-media {
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f0ebe0;
}

.book-flipbook-shell .page-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.book-flipbook-shell .page-media--video {
  position: relative;
  line-height: 0;
  /* Capture taps so StPageFlip doesn't flip when pausing/playing video. */
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.book-flipbook-shell .page-media--video video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #000;
  pointer-events: none;
}

.book-flipbook-shell .page-media--video .video-play-btn {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

/* Invisible overlay while playing — still a <button> so taps don't flip. */
.book-flipbook-shell .page-media--video .video-play-btn.is-playing {
  background: transparent;
}

.book-flipbook-shell .page-media--video .video-play-btn.is-playing .video-play-btn-icon,
.book-flipbook-shell .page-media--video .video-play-btn.is-playing .video-play-btn-label {
  visibility: hidden;
}

.book-flipbook-shell .page-media--video .video-play-btn > * {
  pointer-events: none;
}

.book-flipbook-shell .page-media--video .video-play-btn[hidden] {
  display: none !important;
}

.book-flipbook-shell .page-media--video .video-play-btn-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.book-flipbook-shell .page-media--video .video-play-btn-label {
  font-size: 10px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.book-flipbook-shell .page-body.media-below .page-text {
  order: 1;
}
.book-flipbook-shell .page-body.media-below .page-media {
  order: 2;
}

.book-flipbook-shell .page-body.media-above .page-media {
  order: 1;
}
.book-flipbook-shell .page-body.media-above .page-text {
  order: 2;
}

.book-flipbook-shell .hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.book-flipbook-shell .hotspot-btn {
  position: absolute;
  pointer-events: auto;
  /* background: rgba(255, 200, 50, 0.4);
  border: 2px solid rgba(255, 180, 0, 0.4); */
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.book-flipbook-shell .hotspot-btn:active,
.book-flipbook-shell .hotspot-btn:focus-visible {
  background: rgba(255, 200, 50, 0.6);
  border-color: rgba(255, 180, 0, 0.7);
  outline: none;
}

.book-flipbook-shell .flipbook-page-audio {
  position: absolute;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
html[data-device="desktop"] .book-flipbook-shell .flipbook-page-audio{
  right: 36%;
}
html[data-device="mobile"] .book-flipbook-shell .flipbook-page-audio{
 right:9%;
}
html[data-device="tablet"] .book-flipbook-shell .flipbook-page-audio {
  right: 9%;
  top: 50%;
  transform: translateY(-50%);
}
@media (min-width: 900px) {
  html[data-device="tablet"] .book-flipbook-shell .flipbook-page-audio {
    right: 36%;
  }
}
.book-flipbook-shell .flipbook-page-audio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #0f3460;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  margin-bottom:3px;
}

.book-flipbook-shell .flipbook-page-audio-label {
  font-size: 10px;
  line-height: 1;
  color: #ccc;
  white-space: nowrap;
  position: absolute;
  bottom:-5px;
}

.book-flipbook-shell .flipbook-page-audio-btn:active {
  transform: scale(0.93);
}
.book-flipbook-shell .flipbook-page-audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.book-flipbook-shell .flipbook-page-audio-icon svg {
  display: block;
}

.book-flipbook-shell .flipbook-page-audio-icon--play {
  margin-left: 3px;
}

.book-flipbook-shell .flipbook-page-audio-icon--play svg {
  width: 14px;
  height: auto;
}

.book-flipbook-shell .flipbook-page-audio-icon--pause {
  display: none;
}

.book-flipbook-shell .flipbook-page-audio-icon--pause svg {
  width: 14px;
  height: auto;
}

.book-flipbook-shell .flipbook-page-audio-btn.is-playing .flipbook-page-audio-icon--play {
  display: none;
}

.book-flipbook-shell .flipbook-page-audio-btn.is-playing .flipbook-page-audio-icon--pause {
  display: block;
}

.book-flipbook-shell .flipbook-nav-bar {
  flex: 0 0 auto;
  order: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  width: 100%;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: #16213e;
  border-top: 1px solid #0f3460;
  min-height: 67px;
  position: fixed;
  bottom: 0;
  z-index: 99999;

}

.book-flipbook-shell .flipbook-nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
}

.book-flipbook-shell .flipbook-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  padding-bottom: 4px;
  border: none;
  border-radius: 50%;
  background: #0f3460;
  color: #eee;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.book-flipbook-shell .flipbook-nav-btn:active:not(:disabled) {
  transform: scale(0.93);
  background: #e94560;
}

.book-flipbook-shell .flipbook-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.book-flipbook-shell .page-jump {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ccc;
  font-size: 15px;
}

.book-flipbook-shell .page-jump input {
  width: 30px;
  padding: 0.35rem 0.4rem;
  text-align: center;
  border: 1px solid #0f3460;
  border-radius: 4px;
  background: #1a1a2e;
  color: #eee;
  font-size: 14px;
  direction: ltr;
}

.book-flipbook-shell .page-jump input:focus {
  outline: 2px solid #e94560;
  outline-offset: 1px;
}

.book-flipbook-shell .page-indicator {
  color: #aaa;
  font-size: 16px;
}
.book-flipbook-shell--rtl .page-indicator {
  text-align: right;
  direction: rtl;
}
.book-flipbook-shell--ltr .page-indicator {
  text-align: left;
  direction: ltr;
}
/* 
.book-reader-page[dir="rtl"] .flipbook-nav-bar,
.book-flipbook-shell--rtl .flipbook-nav-bar {
  flex-direction: row-reverse;
} */

.book-pages-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.book-pages-loader.is-visible {
  display: flex;
}

.book-pages-loader .book-reader-loader,
.book-reader-status .book-reader-loader {
  width: 40px;
  height: 40px;
  margin: 0;
}

.book-pages-loader .book-reader-message,
.book-reader-status .book-reader-message {
  margin: 0;
}

.book-reader-status {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 100%;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
}
