﻿/* CSS Variables for Consistency */
:root {
  --primary-purple: #663399;
  --primary-purple-dark: #4b2667;
  --accent-red: #ff3131;
  --cta-red: #E74C3C;
  --accent-green: #6AA84F;
  --background-gray: #EDEDED;
  --background-light: #F4F4F4;
  --white: #fff;
  --shadow: 0 4px 24px rgba(102, 51, 153, 0.10), 0 1.5px 0 #e5e5f7;
  --radius: 8px;
  --font-main: 'Segoe UI', Arial, sans-serif;
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: #333;
  background-color: var(--background-gray);
  padding: 0 20px;
  font-size: 1.08rem;
}

/* Header */
.header {
  text-align: center;
  padding: 2.5rem 1rem 2rem 1rem;
  background: var(--primary-purple);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.header-content {
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 2.7rem;
  margin-bottom: 1rem;
  color: var(--accent-red);
  font-weight: 800;
  letter-spacing: 1.5px;
}

.header h3 {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1.2rem;
  color: var(--white);
}

.header-image {
  margin-top: 1.5rem;
}

.book-cover-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
  background-color: var(--primary-purple);
  margin: 0 auto;
  border-radius: var(--radius);
}

.book-cover-container img {
  max-width: 80%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(102, 51, 153, 0.18);
}

@media (max-width: 768px) {
  .book-cover {
    margin-top: 0.5rem;
  }
}

main {
  margin: 2rem auto;
  max-width: 900px;
}

/* About Section */
.about {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(102, 51, 153, 0.08);
  margin-bottom: 2rem;
  text-align: center;
  color: #333;
}

.about h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-purple);
  font-weight: 700;
}

.about p {
  font-size: 1.1rem;
}

.learn {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(102, 51, 153, 0.08);
  margin-bottom: 2rem;
  text-align: center;
  color: #333;
}

.learn h2 {
  font-size: 1.7rem;
  margin-bottom: 1.1rem;
  color: var(--primary-purple);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
}

.learn ul {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0 1rem 0;
  list-style-position: inside;
}

.learn li {
  display: flex;
  align-items: flex-start;
  background: var(--background-light);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(102, 51, 153, 0.06);
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.2rem;
  color: inherit;
  position: relative;
  transition: box-shadow 0.2s, background 0.2s;
}
.learn li:hover {
  box-shadow: 0 4px 16px rgba(102, 51, 153, 0.13);
  background: #f7f5fa;
}

.learn li::before {
  content: '\2714'; /* Checkmark */
  color: var(--accent-green);
  font-size: 1.3em;
  margin-right: 1em;
  line-height: 1.2;
  flex-shrink: 0;
  display: inline-block;
}

.learn li strong {
  color: var(--primary-purple);
  font-weight: 700;
  margin-right: 0.5rem;
  min-width: 180px;
  text-align: left;
  flex-shrink: 0;
  display: inline-block;
}

.learn li div {
  color: #222;
  font-weight: 400;
  margin: 0;
  text-align: left;
  display: inline;
  flex: 1 1 0%;
  margin-left: 0;
}

@media (max-width: 600px) {
  .learn li {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0.7rem;
  }
  .learn li strong {
    min-width: 0;
    margin-bottom: 0.2rem;
  }
}

/* Conversion Section */
.conversion {
  background: var(--white);
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius);
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(102, 51, 153, 0.08);
}

.conversion h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--cta-red);
  font-weight: 700;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Testimonials Section */
.testimonials {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(102, 51, 153, 0.08);
}

.testimonials blockquote {
  margin: 1rem 0;
  font-style: italic;
  background: #F9F9F9;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.testimonials cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #555;
}

/* Button base styles */
.button, .navbutton, .nav .button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-size: 1.08rem;
  background: linear-gradient(90deg, var(--primary-purple) 0%, #836fa9 100%);
  color: var(--white);
  text-decoration: none;
  border-radius: 7px;
  border: none;
  font-weight: 600;
  font-family: var(--font-main);
  box-shadow: 0 2px 8px rgba(102, 51, 153, 0.10);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin: 5px;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  min-width: 127px;
  max-width: none;
  flex: 0 0 auto;
  justify-content: center; /* Add this for horizontal centering */
}

.button:hover, .navbutton:hover, .nav .button:hover, .button:focus {
  background: linear-gradient(90deg, var(--primary-purple-dark) 0%, var(--primary-purple) 100%);
  transform: translateY(-2px) scale(1.045);
  box-shadow: 0 4px 16px rgba(102, 51, 153, 0.18);
  color: var(--white);
}

.nav .active.button, .nav .button.active {
  box-shadow: 0 6px 24px rgba(102, 51, 153, 0.18);
  border: 2px solid #836fa9;
  background: linear-gradient(90deg, #836fa9 0%, var(--primary-purple) 100%);
  color: var(--white);
}

@media (max-width: 900px) {
  .navbar {
    padding: 0.7rem 0.5rem;
    border-radius: 0;
  }
  .navbar-brand-themed {
    font-size: 1.3rem;
    padding-bottom: 0.1rem;
  }
  .button, .nav .button {
    font-size: 0.98rem;
    padding: 0.6rem 1rem;
    margin: 0 0.2rem 0.5rem 0.2rem;
  }
}

@media (max-width: 768px) {
  .button, .navbutton, .nav .button {
    margin-bottom: 0.8rem;
    max-width: 100%;
  }
  .book-cover-container img {
    max-width: 100%;
    max-height: 250px;
  }
  main {
    padding: 0 0.5rem;
  }
}

.footer {
  text-align: center;
  padding: 1rem;
  background: var(--primary-purple);
  color: var(--white);
  font-size: 0.98rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}

/* Navbar Styles */
.navbar {
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.2rem 2.2rem;
  background: var(--background-gray);
  margin-bottom: 2.2rem !important;
  font-family: var(--font-main);
}

.navbar-brand-themed {
  font-family: var(--font-main);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-purple);
  text-shadow: 0 2px 8px rgba(102, 51, 153, 0.10);
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 2.5px solid #836fa9;
  padding-bottom: 0.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--primary-purple) 0%, #836fa9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand-themed:hover {
  color: var(--primary-purple-dark);
  text-shadow: 0 4px 16px rgba(102, 51, 153, 0.18);
  border-bottom: 2.5px solid var(--primary-purple-dark);
}

.navbar-nav,
.navbar-collapse,
.navbar-expand-sm,
.nav-item,
.nav-link {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  margin-bottom: 4px;
  padding-bottom: 0;
}

/* Utility and Section Styles (unchanged, but use variables where possible) */
.role-group-container {
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 15px;
  width: fit-content;
  margin-bottom: 15px;
}

.role-group-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
}

.radio-group div {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.radio-group label {
  margin-left: 8px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.checkbox-group label {
  margin-left: 8px;
}

body.waitlist-page .container,
body.waitlist-page main {
  margin-top: 0;
  padding-top: 0;
}

.waitlistform-container {
  margin-top: 0;
  padding-top: 0;
}

.waitlistform-heading {
  margin-bottom: 10px;
}

.no-bullets-no-border {
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
  display: flex;
  flex-direction: row;
}

.no-bullets-no-border li {
  margin: 0px 0;
}

.no-bullets-no-border li a {
  display: inline-block;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--white);
  background-color: #6c2eb9;
  border-radius: 5px;
}

@media (max-width: 800px) {
  .no-bullets-no-border {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Chatbot and Modal Styles (unchanged, but use variables where possible) */
.empowered-sales-agent-window {
  position: fixed;
  bottom: 2vw;
  right: 2vw;
  min-width: 260px;
  max-width: 20vw;
  min-height: 120px;
  max-height: 70vh;
  z-index: 1000;
  box-shadow: 0px 4px 24px rgba(102, 51, 153, 0.13), 0 1.5px 0 #e5e5f7;
  border: 1.5px solid #d1c4e9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: 0;
}

@media (max-width: 900px), (max-height: 700px) {
  .empowered-sales-agent-window {
    max-width: 95vw;
    min-width: 180px;
    min-height: 80px;
    max-height: 60vh;
  }
}

@media (max-width: 600px) {
  .empowered-sales-agent-window {
    width: 100vw;
    right: 0;
    bottom: 0;
    height: 40vh;
    min-width: 120px;
    min-height: 120px;
    max-width: 100vw;
    max-height: 50vh;
    border-radius: 0;
  }
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.chat-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: nowrap; /* Prevent wrapping */
  background-color: var(--primary-purple);
  color: var(--white);
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  gap: 2rem;
}

.chat-header-title {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.chat-header-title h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  width: 100%;
}

.chat-header-buttons {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
  margin-left: 1rem;
  min-width: 0;
}

.chat-header-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
  text-align: center;
  border-radius: 4px;
  min-width: 32px;
  min-height: 32px;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .chat-header {
    padding: 1px 1px 1px 1px !important; /* less left/right padding */
    gap: 0.5rem;
  }
  .chat-header-title h3 {
    font-size: 0.95rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .chat-header-buttons {
    flex-direction: row !important;
    gap: 2px !important;
    padding: 0 !important;
    margin-left: 0 !important;
  }
  .chat-header-btn {
    min-width: 24px !important;
    min-height: 24px !important;
    font-size: 1rem !important;
    padding: 0 2px !important;
  }
  .chat-history {
    max-height: 600px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto;
  }
}

.chat-history {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 50vh;
  overflow-y: auto;
  padding: 18px 18px 8px 18px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.chat-message {
  margin: 5px 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  max-width: 80%;
  font-size: 1rem;
  word-break: break-word;
}

.user-message  {
  background-color: var(--background-gray, #e5e5ea);
  color: black;
  align-self: flex-end;
  display: flex;
  justify-content: flex-end; /* align text to right horizontally */
  align-items: center; /* align text vertically center */
  text-align: right;
  margin: 0;
  margin-left: auto;
  margin-right: 0;
  max-width: 60%;
  border-radius: 16px 16px 4px 16px;
  font-weight: bold;
  padding: 10px 14px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/*p adds a margine I dont what in the user message*/
  .user-message p {
    margin: 0;
  }



.bot-message {
  background-color: #836fa9;
  color: var(--white);
  align-self: flex-start;
  text-align: left;
  border-radius: 16px 16px 16px 4px;
}

/* Ensure chat-input is positioned for overlay */
.chat-input {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 10px 12px 10px;
  border-top: 1px solid #e0e0e0;
  background-color: var(--white);
  position: relative; /* Required for spinner overlay */
  min-height: 54px;
}

.spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 100;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #0078d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  background: transparent;
  z-index: 101;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.input-box {
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: none;
  font-size: 1rem;
  min-height: 38px;
  max-height: 80px;
  box-sizing: border-box;
  margin-right: 0;
}

.send-button {
  flex-shrink: 0;
  height: 38px;
  padding: 0 18px;
  background-color: var(--primary-purple);
  color: var(--white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
  margin-left: 4px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-button:hover {
  background-color: var(--primary-purple-dark);
}

/* Ensure minimized state still works */
.chat-container.minimized {
  min-height: 0 !important;
  max-height: 600px !important;
  overflow: hidden;
  transition: height 0.3s, max-height 0.3s;
}

/* Always show input box if not minimized */
.chat-container:not(.minimized) .chat-input {
  display: flex !important;
}

/* Prevent input box from being hidden at high zoom */
@media (max-width: 400px), (max-height: 400px) {
  .empowered-sales-agent-window {
    min-width: 80px;
    max-width: 100vw;
    min-height: 60px;
    max-height: 80vw;
  }
  .chat-history {
    max-height: 20vw;
  }
}

@media (max-width: 768px) {
  #SalesBot {
    display: none !important;
  }
  .empowered-sales-agent-window {
    width: 100vw;
    min-width: 120px;
    max-width: 100vw;
    right: 0;
    bottom: 0;
    min-height: 80px;
    max-height: 50vh;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  #narrow-salesagent {
    display: block;
  }
}

@media (min-width: 769px) {
  #narrow-salesagent {
    display: none;
  }
}

/* Blazor error UI */
.blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* --- Custom List Layout for About & Learn Sections --- */
.about ul, .learn ul {
  list-style: disc inside;
  padding-left: 0;
  margin: 1.5rem 0 1rem 0;
}

.about li, .learn li {
  display: flex;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 1.2rem;
  color: inherit;
  position: relative;
}

/* Add custom bullet for flex items */
.about ul, .learn ul {
  list-style: none;
  padding-left: 0;
}
.about li::before, .learn li::before {
  content: '\2022'; /* Unicode for bullet */
  color: var(--accent-green);
  font-size: 1.3em;
  margin-right: 0.7em;
  line-height: 1.2;
  flex-shrink: 0;
  display: inline-block;
}

.about li > strong, .learn li > strong {
  min-width: 220px;
  color: var(--primary-purple);
  font-weight: 700;
  margin-right: 0.5rem;
  text-align: left;
  flex-shrink: 0;
  display: inline-block;
}

.about li > p, .learn li > span {
  color: #222;
  font-weight: 400;
  margin: 0;
  text-align: left;
  display: block;
  flex: 1 1 0%;
  margin-left: 0;
}

.about li > p {
  margin-top: 0.1rem;
}

@media (max-width: 600px) {
  .about li, .learn li {
    flex-direction: column;
    align-items: flex-start;
  }
  .about li > strong, .learn li > strong {
    min-width: 0;
    margin-bottom: 0.2rem;
  }
}

/* Chat Header Close Button */
.chat-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #6a1b9a;
  color: var(--white);
  padding: 10px 40px 10px 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.chat-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
}

.chat-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.2s;
}

.chat-close:hover {
  color: #ff3131;
}

/* Minimized Chat */
.chat-container.minimized {
  min-height: 0 !important;
  max-height: 600px !important;
  overflow: hidden;
  transition: height 0.3s, max-height 0.3s;
}

.chat-container.minimized .chat-header {
  border-radius: var(--radius);
}

.chat-container.minimized .chat-history,
.chat-container.minimized .chat-input {
  display: none !important;
}

/* Chat Header Buttons */
/* Chat Header Buttons */
.chat-header-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  background: transparent;
  /* Remove position: absolute, right, top, and transform */
  margin-left: 4px; /* Small gap from the title */
  min-width: 0;
}

/* Ensure header uses flex row and allows shrinking */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px;
}

/* Allow title to shrink and ellipsis */
.chat-header-title {
  flex: 1 1 0%;
  min-width: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}
.chat-header-title h3 {
  font-size: 1.1rem;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1 1 0%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive: shrink padding, font, and gap on small screens */
@media (max-width: 600px) {
  .chat-header {
    padding: 4px 4px;
    gap: 4px;
  }
  .chat-header-title h3 {
    font-size: 0.9rem;
  }
  .chat-header-buttons {
    gap: 2px;
    margin-left: 4px;
  }
  .chat-header-btn {
    min-width: 24px;
    min-height: 24px;
    font-size: 1rem;
    padding: 0 2px;
  }
}

.chat-header-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
  text-align: center;
  border-radius: 4px;
}

.chat-header-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #ff3131;
}


.about p {
  text-align: justify;
}

.learn ul {
  list-style-position: inside;
}

.learn li {
  display: list-item;
}

  .learn li > div {
    display: inline;
  }

.electronic-couponing-purple .border-primary {
  border-color: var(--primary-purple) !important;
}
.electronic-couponing-purple .text-primary {
  color: var(--primary-purple) !important;
}
.electronic-couponing-purple .btn-primary {
  background-color: var(--primary-purple) !important;
  border-color: var(--primary-purple) !important;
}
.electronic-couponing-purple .btn-primary:hover,
.electronic-couponing-purple .btn-primary:focus {
  background-color: var(--primary-purple-dark) !important;
  border-color: var(--primary-purple-dark) !important;
}

@media (max-width: 600px) {
  .chat-container {
    max-width: 100vw !important;
    min-width: 120px !important;
    border-radius: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
  }
  .chat-header {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }
  .chat-header-buttons {
    flex-direction: row !important;
    gap: 2px !important;
    padding: 0 !important;
    margin-left: 0 !important;
  }
  .chat-header-buttons .chat-header-btn {
    min-width: 24px !important;
    min-height: 24px !important;
    font-size: 1rem !important;
    padding: 0 2px !important;
  }
}

@media (max-width: 600px) {
  .d-flex.justify-content-center {
    flex-direction: column !important;
  }

    .d-flex.justify-content-center > .button {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
}

.d-flex.justify-content-center {
  flex-direction: row !important;
  align-items: flex-start !important;
}

.d-flex.justify-content-center > .button {
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: 0.5rem !important;
}

@media (max-width: 600px) {
  .d-flex.justify-content-center > .button {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 600px) {
  /* Make the NavMenu row stack vertically and center content */
  .navbar > .row.justify-content-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  /* Ensure homepageTitle stacks and centers its children */
  .homepage-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
  }
  .homepage-title .d-flex.justify-content-center {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
  }
  .homepage-title .button {
    width: 90vw !important;
    max-width: 350px !important;
    margin: 0.3rem 0 !important;
    justify-content: center !important;
  }
  #bookTitle {
    margin-bottom: 0.7rem !important;
    font-size: 1.3rem !important;
    width: 100% !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
}

#bookTitle {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: keep-all;
}

/* Add spacing and min-width for NavMenu Home/News buttons */
.homepage-title .d-flex.justify-content-center > .button {
  min-width: 197px !important;
  margin-left: 12px !important;
  margin-right: 12px !important;
}

@media (max-width: 600px) {
  .homepage-title .d-flex.justify-content-center > .button {
    min-width: 90vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
