/* =========================================================================== 
   Project styles: Modified as per user requests 
   - Removed sidebar logo and set the sidebar background to white 
   - Enabled "Home" in the sidebar 
   - Centered figure/table numbers and captions, with numbers in bold
   =========================================================================== */

/* --- Configurable variables (logo removed and sidebar set to white) ------- */
:root {
  /* Previously configured logo offsets removed, as no logo is used */
  --logo-offset: 0px;
  --logo-width: 0px;
  --logo-padding-extra: 0px;

  /* Sidebar background color now matches the rest of the page */
  /*--sidebar-background-color: white;
}

/* ========================================================================== */
/* SIDEBAR MODIFICATIONS                                                      */
/* ========================================================================== */
.book .sidebar,
.book .site-sidebar,
.sidebar,
.site-sidebar {
  background-color: var(--sidebar-background-color) !important;
  background-image: none !important; /* Removes the logo */
  padding-top: 0 !important;         /* Removes the padding reserved for the old logo */
}

.book .sidebar .sidebar-content,
.site-sidebar .sidebar-content,
.site-sidebar .sidebar-wrapper,
.book .sidebar .sidebar-wrapper {
  padding-top: 0 !important;
}

/* ========================================================================== */
/* SHOW INDEX PAGE IN SIDEBAR AS "HOME"                                       */
/* ========================================================================== */
/* Re-enable links to the index page in the sidebar, and rename to "Home" */
.book .sidebar a[href$="index.html"],
.book .sidebar a[href$="./index.html"],
.book .sidebar a[href$="/"],
.book .sidebar a[href=""],
.site-sidebar a[href$="index.html"],
.site-sidebar a[href$="./index.html"],
.site-sidebar a[href$="/"],
.site-sidebar a[href=""],
.sidebar a[href$="index.html"],
.sidebar a[href$="./index.html"],
.sidebar a[href$="/"],
.sidebar a[href=""] {
  display: block !important;
  font-weight: bold;
}
.book .sidebar a[href$="index.html"]::after,
.site-sidebar a[href$="index.html"]::after,
.site-sidebar a[href$="./index.html"]::after,
.sidebar a[href$="index.html"]::after {
  content: "Home";                  /* Replace index.html link text with "Home" */
  font-weight: bold;                /* Optional: make Home text bold */
}

/* ========================================================================== */
/* FIGURE AND TABLE CAPTIONS                                                  */
/* ========================================================================== */
/* Center-aligned captions with bold figure/table numbers */

.book .figure .caption,
.book .table .caption,
.site .figure .caption,
.site .table .caption {
  text-align: center;       /* Center-align captions */
  font-weight: normal;      /* Caption text stays normal */
  margin-top: 10px;         /* Space between figure and caption text */
  margin-bottom: 10px;      /* Uniform spacing below caption */
}

.book .figure .caption span.caption-number,
.book .table .caption span.caption-number,
.site .figure .caption span.caption-number,
.site .table .caption span.caption-number {
  font-weight: bold;        /* Make figure/table number bold */
}

/* Additional table-wide spacing fixes */
.book .table,
.site .table {
  margin: 20px auto;
  border-collapse: collapse;
}

/* ========================================================================== */
/* OTHER GLOBAL FIXES                                                         */
/* ========================================================================== */
body {
  overflow-x: hidden; /* Avoid horizontal scrollbars caused by 100vw in some browsers */
}

#cover {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

#cover img,
.cover-image {
  display: block;
  margin: 0;
  padding: 0;
  width: 100vw;    /* full viewport width */
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* General sidebar content alignment fixes */
.book-title,
.site-title {
  color: inherit !important;
  font-weight: bold;
}

@media (max-width: 768px) {
  .book .sidebar,
  .site-sidebar {
    background-image: none !important;
    padding-top: 0 !important;
  }
}