@charset "utf-8";
/* ======================================================
   MASTER STYLESHEET: BOOK PAGE LAYOUT
   ====================================================== */


/* ======================================================
   A. GLOBAL LAYOUT & CONTAINERS
   ====================================================== */

.book-wrapper {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 40px;
  bsackground-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 800px;
}

body {
  position: relative;
  z-index: 1;
}

.book-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  min-height: 200px;
}

.left-image img {
  width: 240px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  margin-top: 40px;
}

.right-text {
  flex: 1;
  text-align: left;
  color: white;
}

/* Chapter Buttons */
.chapter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.chapter-buttons a {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background-color: #3A5C31;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.25s;
}

.chapter-buttons a:hover {
    background-color: #0F0CCF;
}

.chapter-next {
    text-align: center;
    margin-top: 20px;
}

.chapter-next .next-button {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background-color: #362F88;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.25s;
}

.chapter-next .next-button:hover {
    background-color: #760A80;
}


/* Story Reading Area */
.story-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 20px;
    max-width: 720px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    line-height: 1.6;
    color: #000000;
    text-align: left;
}

/* Paragraphs inside story box */
.story-box p {
    text-indent: 0px;
    margin-bottom: 16px;
}

/* Chapter title inside story box */
.story-box .chapter-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2717E7;
    text-align: center;
}

.story-cover img {
    max-width: 100%;   /* image won’t exceed the container width */
    height: auto;      /* keeps aspect ratio */
    display: block;    /* removes inline spacing issues */
    margin: 0 auto;    /* centres the image */
}



/* ======================================================
   B. TITLE, DATE, BLURB
   ====================================================== */

.title {
	font-size: 2.6em;
	font-weight: bolder;
	color: #3C6398;
	text-shadow: 0 0 6px rgba(0,0,0,0.7);
	margin: 0 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-align: left;
}

.subtitle-modifier {
	font-size: 18px;
	margin-left: 10px;
	color: #F9BC07;
}

.release-date-box {
  background: rgba(2,2,2,0.30);
  color: white;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  padding: 10px;
  margin: 0;
}

.blurb-part-1 {
  max-height: 420px;
  overflow: hidden;
}

.blurb-part-1 p,
.blurb-overflow-area p {
  margin-bottom: 16px;
  font-size: 1.5em;
  line-height: 1.5;
  color: #000000;
	font-weight: bolder
}

.blurb-overflow-area {
  margin-top: 20px;
}


/* ======================================================
   C. TAGS TABLE
   ====================================================== */

.tag-table {
  margin-top: 20px;
  border-radius: 15px;
  overflow: hidden;
  width: 70%;
  table-layout: fixed;     /* <<< ADD THIS */
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
}


.tag-table td {
  padding: 12px;
	font-size: 0.9em;
  word-wrap: break-word;
  white-space: normal;
}

.tag-table tr:first-child td:first-child { border-top-left-radius: 15px; }
.tag-table tr:first-child td:last-child  { border-top-right-radius: 15px; }
.tag-table tr:last-child td:first-child  { border-bottom-left-radius: 15px; }
.tag-table tr:last-child td:last-child   { border-bottom-right-radius: 15px; }

.tag-cell {
  color: white;
  font-size: 1.1em; /* adjust smaller or larger */
  text-align: center;
  vertical-align: middle;
  padding: 12px;
}

.tag-cell.red {
  background: #FB0509;
}

.tag-cell.black {
  background: #000;
}

.tag-cell.orange {
  background: #FBB405;
}

.tag-cell.darkblue {
  background: #043FFB;
}

.tag-cell.darkgreen {
  background: #186410;
}


/* ======================================================
   D. DOWNLOAD TABLE
   ====================================================== */

.download-table {
  width: 50%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 40px auto;
  border-radius: 10px;
  overflow: hidden;
}

.dl-title-cell {
  background: rgba(255,165,0,0.3);
  color: #C85000;
  font-size: 1.6em;
  font-weight: bold;
  text-align: center;
  padding: 15px 0;
  letter-spacing: 1px;
}

.dl-cell-spacer {
  padding: 10px 7.5px;
  text-align: center;
  width: 33.33%;
}

/* Styles for the default look of the download button wrapper */

.dl-btn-table {
    display: block;
    border: 1px solid rgba(120,74,24,0.66);
    padding: 12px 0;
    text-decoration: none;
    font-size: 1.4em;
    border-radius: 10px;
    transition: 0.25s;
    text-transform: uppercase;
    text-align: center;
    /* ENSURE there is NO 'color' property here */
}

/* 2. Hover state (MUST NOT set a color) */
.dl-btn-table:hover {
    background: rgba(120,74,24,0.6);
    /* REMOVED: color: white; */ 
}

/* 🏆 CRUCIAL FIX: Forcing all link states to use the HTML inline color */
/* This rule clears the browser's default faded color for visited links and forces the button 
   to inherit the color from the <a> tag in your HTML. */
.dl-btn-table:link,
.dl-btn-table:visited,
.dl-btn-table:active {
    color: inherit;
}

/* ======================================================
   E. FOOTER — READER NOTE
   ====================================================== */

.reader-note-box {
  max-width: 1100px;
  margin: 40px auto;
  background: rgba(135,206,250,0.25);
  border-radius: 12px;
  padding: 20px;
  color: white;
  font-size: 1.2em;
  text-align: center;
}

.reader-note-box a {
  color: #F9BC07;
  font-weight: bold;
}



/* ======================================================
   F. MOBILE LAYOUT — CLEAN, MERGED, FINAL
   ====================================================== */

@media (max-width: 768px) {

  html, body {
    overflow-x: hidden !important;
  }

  /* Stack layout vertically */
  .book-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Perfect cover centering */
  .left-image {
    width: fit-content;
    margin: 0 auto;
  }

  .left-image img,
  .left-image .cover {
    display: block;
    margin: 0 auto;
  }

  /* Title centered */
  .title {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }

  /* Wrapper fully mobile optimised */
  .book-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 15px;
  }

  /* TAGS TABLE */
  .tag-table {
    width: 90%;
    margin: 0 auto;
    font-size: 0.9em;
  }

  /* DOWNLOAD TABLE */
  .download-table {
    width: 90%;
    margin: 20px auto;
  }

  .dl-title-cell {
    font-size: 1.2em;
    padding: 10px;
  }

  .dl-btn-table {
    font-size: 1.1em;
    padding: 10px;
  }

  .dl-help-cell {
    font-size: 0.95em;
    padding: 6px;
  }

  /* FINAL FIX — MATCH TOP & BOTTOM BLURB WIDTHS */
  .right-text {
    width: 90% !important;
    margin: 0 auto !important;
    text-align: center;
  }

  #blurb-top,
  #blurb-bottom {
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Hide "tobtella -" on mobile */
  .mobile-hide-prefix {
    display: none !important;
  }
}
/* Increase right-side margin for all blurb text */
.blurb-part-1 p,
.blurb-overflow-area p {
    margin-right: 18px !important;
}
