body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  background-color: #f4f4f4;
  color: #333;
}


h1,
h2 {
  margin: 0;
  padding: 0;
  font-family: 'Anton', cursive;
  font-weight: normal;
}

h1 {
  font-size: clamp(40px, 15vw, 110px);
}

h2 {
  font-size: 30px;
}

.spacer.v20 {
  height: 20px;
}

.spacer.v40 {
  height: 40px;
}

.spacer.v50 {
  height: 50px;
}

.spacer.v100 {
  height: 100px;
}


.clear {
  clear: both;
}


#promo,
#subscribe,
#footer {
  text-align: center;
  color: #fff;
  width: 100%;
}

#promo {
  background-color: #F46036;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  transition: transform 0.3s ease;
}

#promo>div {
  padding: 15px;
}

.wrap {
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
}


#topMenu {
  height: 60px;
  position: fixed;
  top: 48px;
  left: 0;
  width: 100%;
  background: white;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-hidden {
  transform: translateY(-200px);
}

#topLinks {
  float: right;
  margin-top: 20px;
}

#topLinks ul,
#footer ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Submenu Styling */
#topLinks li {
  float: left;
  position: relative;
  /* Essential for positioning the submenu relative to this item */
}

#topLinks li ul {
  display: block;
  position: absolute;
  top: 100%;
  /* Position it directly below the parent link */
  left: 0;
  background: white;
  min-width: 150px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1002;
  /* Higher than topMenu to stay on top */
  padding: 10px 0;
  border-top: 2px solid #4392F1;
}

#topLinks li:hover>ul,
#topLinks li.submenu-active>ul {
  opacity: 1;
  visibility: visible;
  top: 100%;
  /* Adjusts if needed for smooth transition */
}

#topLinks li ul li {
  float: none;
  /* Stack submenu items vertically */
  width: 100%;
}

#topLinks li ul li a {
  display: block;
  padding: 10px 20px;
  text-align: left;
  font-size: 14px;
}

#topLinks li ul li a:hover {
  background-color: #f9f9f9;
  text-decoration: none;
}

#topLinks li a {
  color: #333;
  text-align: center;
  padding: 16px 12px;
  text-decoration: none;
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
}

.search-icon {
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}

@media (max-width: 600px) {
  #topLinks li a {
    padding: 16px 8px;
    font-size: 13px;
  }
  #topMenu .logo {
    font-size: 20px;
  }
}

#topLinks li a:hover {
  color: #4392F1;
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  text-decoration: underline;
}

#topMenu .logo {
  float: left;
  padding-top: 13px;
  font-size: 24px;
  color: #333;
  text-decoration: underline;
}

#topMenu .logo:hover {
  color: #4392F1;
}

.logo {
  font-family: 'Anton', cursive;
}

#banner {
  background-image: url(Images/favicon.png);
  background-repeat: no-repeat;
  background-position: center 120px;
  width: 100%;
  text-align: center;
  padding-top: 240px;
  color: #333;
}

#banner .tagline {
  padding-bottom: 20px;
  padding-top: 0px;
}

#banner .logo {
  margin-top: 0px;
}

#banner #action a {
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  padding: 20px;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  background-color: #4392F1;
}

#banner #action a:hover {
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  background-color: #F46036;
  padding: 20px 40px;
}

.feature {
  display: flex;
  align-items: center;
  margin-top: 80px;
}

.feature .leftColumn,
.feature .rightColumn {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature .leftColumn .text,
.feature .rightColumn .text {
  padding: 20px;
  min-height: 260px;
}

.feature hr {
  background-color: #333;
  height: 1px;
  border: 0;
  width: 50px;
}

.featureImage img {
  max-width: 100%;
  height: auto;
}

#subscribe {
  background-color: #4392F1;
  padding: 60px 0;
  width: 100%;
}

#subscribe .wrap {
  padding: 0 20px;
}

#subscribe h2 {
  margin: 15px 0px 20px 0px;
  font-size: 24px;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
}

#subscribe form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#subscribe input[type=text] {
  border: 0;
  width: 250px;
  max-width: 100%;
  height: 28px;
  font-size: 14px;
  padding: 0px 10px;
  border-radius: 30px;
  flex: 1;
  min-width: 200px;
}

#subscribe .submitButton a {
  line-height: 30px;
  display: inline-block;
  text-decoration: none;
  border: 0;
  min-width: 30px;
  height: 30px;
  font-size: 14px;
  padding: 0 15px;
  background-color: #345995;
  color: white;
  border-radius: 30px;
  white-space: nowrap;
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
}

#subscribe .submitButton a:hover {
  background-color: #F46036;
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  cursor: ponter;
}

#footer {
  background-color: #F46036;
  padding: 20px 0;
  width: 100%;
  text-align: center;
}

#footer .wrap {
  padding: 0 20px;
}

#footer ul {
  list-style-type: none;
  margin: 28px 0 0 0;
  padding: 0;
  overflow: hidden;
  display: inline-block;
}

#footer li {
  float: left;
}

#footer li a {
  color: white;
  text-align: center;
  padding: 20px;
  text-decoration: none;
  -webkit-transition: all 250ms linear;
  -ms-transition: all 250ms linear;
  transition: all 250ms linear
}


#footer li a:hover {
  color: #333;
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
}

#copyright {
  text-align: center;
  background-color: #345995;
  color: white;
  padding: 20px 0;
  font-size: 16px;
  width: 100%;
}

#copyright .wrap {
  padding: 0 20px;
}

#copyright .logo {
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
}

/* Book Summary Styling for read.html */
#bookSummary {
  background: #fff;
  border: 3px solid #000;
  padding: 20px;
  margin: 30px auto;
  max-width: 800px;
  position: relative;
  box-shadow: 8px 8px 0px #4392F1;
  /* KnowFlux Blue shadow for Nintendo look */
}

#bookSummary summary {
  font-family: 'Anton', cursive;
  font-size: 24px;
  color: #4392F1;
  cursor: pointer;
  list-style: none;
  outline: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#bookSummary summary::-webkit-details-marker {
  display: none;
}

#bookSummary summary::after {
  content: '+';
  font-size: 30px;
  font-weight: bold;
  color: #F46036;
  /* KnowFlux Orange for the icon */
}

#bookSummary[open] summary::after {
  content: '−' !important;
}

#bookSummary p {
  margin-top: 15px;
  line-height: 1.6;
  color: #333;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* Styling for Pages and Chapters links in read.html */
#pagesLink,
.spacer.v10 {
  text-align: center;
}

#pagesLink a,
#chaptersLink a {
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  padding: 15px 30px;
  background-color: #4392F1;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 10px 0;
}

#pagesLink a:hover,
#chaptersLink a:hover {
  background-color: #F46036;
  padding: 15px 45px;
}

/* Prevent Algolia search box from collapsing to icon on mobile */
@media only screen and (max-width: 600px) {
  .algolia-autocomplete,
  .aa-Autocomplete,
  .aa-InputWrapper,
  .aa-Form,
  .aa-Panel,
  .aa-SearchBox {
    width: 100% !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
  }
  
  .aa-DetachedSearchButton,
  .aa-DetachedContainer {
    display: none !important;
    visibility: hidden !important;
  }
  
  .aa-Input {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    border: 2px solid #000 !important;
  }
}

/* Vertical Scroll Progress Bar for Page 1 */
#scroll-progress-container {
  position: fixed;
  left: 5px;
  top: 115px; /* Slightly adjusted for better spacing */
  width: 10px;
  height: calc(100vh - 130px);
  height: calc(100svh - 130px); /* Use svh for mobile stability */
  background: rgba(238, 238, 238, 0.5);
  border: 2px solid rgba(67, 146, 241, 0.5);
  border-radius: 10px; /* Soften edges */
  z-index: 999;
  box-sizing: border-box;
  overflow: hidden; /* Ensures progress bar follows radius */
  box-shadow: 0 0 10px rgba(67, 146, 241, 0.3); /* Soft glow around container */
}

#scroll-progress-bar {
  width: 100%;
  height: 0%;
  background: #4392F1; /* KnowFlux Blue */
  transition: height 0.1s ease-out;
  box-shadow: 0 0 8px rgba(67, 146, 241, 0.6); /* Soft glow for the progress bar itself */
}

/* Page1 specific content padding to accommodate progress bar */
#page1-content {
  padding-left: 3px; /* Adjusted to balance the 5px left position + width + 5px gap */
}

@media (max-width: 600px) {
  #scroll-progress-container {
    width: 6px;
  }
}

/* Poetry Page Content Styling */
#poetry-content h2 {
  color: #4392F1;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

#poetry-content hr {
  background-color: #F46036;
  height: 3px;
  border: 0;
  width: 100px;
  margin: -5px auto 10px;
}

#poetry-content h3 {
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  font-weight: bold;
  margin: 5px 0;
  padding: 15px;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 4px 4px 0px #4392F1;
  display: inline-block;
  width: auto;
  min-width: 200px;
}

#poetry-content .blue-box {
  color: #fff;
  background: #4392F1;
  box-shadow: 4px 4px 0px #000;
}

#banner .tagline {
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 20px;
  font-size: 24px;
}

.content-page {
  padding-top: 150px;
  text-align: center;
}

.poetry-flex-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.poetry-flex-grid .feature-link {
  flex: 1 1 300px;
  max-width: 800px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* horizontal centering */
  align-items: center;
  /* vertical centering if needed */
  text-align: center;
}

.poetry-box {
  display: block;
  /* or remove display entirely */
  /* now works correctly */
  font-family: 'Open Sans', sans-serif;
  color: #333;
  font-weight: bold;
  margin: 10px 0;
  padding: 20px;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 6px 6px 0px #4392F1;
  width: 100%;
  max-width: 800px;
  transition: all 0.2s ease;
}

.poetry-box:hover {
  box-shadow: 8px 8px 0px #F46036;
  transform: translate(-2px, -2px);
}

.poetry-box h3 {
  margin: 0;
  font-family: 'Anton', cursive;
  font-size: 24px;
  color: #4392F1;
}

.poetry-box .subheading {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

.poetry-box-grey {
  display: block;
  /* or remove display entirely */
  /* now works correctly */
  font-family: 'Open Sans', sans-serif;
  color: #333;
  font-weight: bold;
  margin: 10px 0;
  padding: 20px;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 6px 6px 0px #333;
  width: 100%;
  max-width: 800px;
  transition: all 0.2s ease;
}

.poetry-box-grey h3 {
  margin: 0;
  font-family: 'Anton', cursive;
  font-size: 24px;
  color: #333;
}

/* Page 1 Specific Styling */
.page-header-container {
  text-align: left;
  margin-top: 120px;
  margin-bottom: 40px;
}

.page-title {
  font-family: 'Anton', cursive;
  font-size: 60px;
  color: #4392F1;
  margin: 0;
  text-transform: uppercase;
}

.page-subtitle {
  font-family: 'Open Sans', sans-serif;
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.page-content {
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 60px;
  text-align: justify;
}

.page-content p {
  margin-bottom: 25px;
}

/* Poetry Content Styling (for pages like finalmoment.html) */
.poetry-content {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1.6;
  color: #333;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.poetry-content p {
  margin: 5px 0;
}

/* details/summary styling for poetic forms */
details {
  background: #fff;
  border: 3px solid #000;
  padding: 15px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 6px 6px 0px #F46036;
  /* KnowFlux Orange shadow */
}

details summary {
  font-family: 'Anton', cursive;
  font-size: 20px;
  color: #4392F1;
  cursor: pointer;
  outline: none;
  text-transform: uppercase;
}

details p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
}

.page-footer-action {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 80px;
}

.comingSoonButton {
  -webkit-transition: all 250ms ease-out;
  -ms-transition: all 250ms ease-out;
  transition: all 250ms ease-out;
  padding: 15px 40px;
  background-color: #4392F1;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
}

.comingSoonButton:hover {
  background-color: #F46036;
  padding: 15px 55px;
}

.stacked {
  display: flex;
  min-width: 300px;
  max-width: 800px;
  margin: 0 auto;
  flex-direction: column;
  width: 100%;
  align-items: center;
}

/* Feature Link Styling */
.feature-link {
  text-decoration: none !important;
  color: #333 !important;
  transition: color 250ms ease-out;
  display: block;
  padding: 0 !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.feature-link:hover {
  color: #4392F1 !important;
  padding: 0 !important;
  background: none !important;
}

.feature-link:hover h2,
.feature-link:hover .subheading {
  text-decoration: underline !important;
}

/* Coming Soon Specific Styling */
.coming-soon-container {
  text-align: center;
  padding: 100px 20px;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.countdown-item {
  background: #fff;
  border: 3px solid #000;
  padding: 15px;
  min-width: 80px;
  box-shadow: 6px 6px 0px #4392F1;
  text-align: center;
}

.countdown-value {
  display: block;
  font-family: 'Anton', cursive;
  font-size: 36px;
  color: #F46036;
}

.countdown-label {
  font-family: 'Open Sans', sans-serif;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
}

.snarky-comment {
  font-family: 'Open Sans', sans-serif;
  font-style: italic;
  font-size: 20px;
  color: #666;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .poetry-flex-grid .feature-link {
    flex-direction: column;
    align-items: center;
  }

  .poetry-flex-grid .poetry-box,
  .poetry-flex-grid .poetry-box-grey {
    width: 75vw;
    /* 75% of the viewport width */
    max-width: none;
  }
}

/* Desktop view: poetry boxes expand up to 800px */
@media (min-width:800px) {

  .poetry-flex-grid .poetry-box,
  .poetry-flex-grid .poetry-box-grey {
    width: 100%;
    max-width: 800px;
  }
}
