﻿html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  margin: 0;
  background-color: #000000;
  color: white;
}

/* Styling for unvisited links */
a:link {
    color: #007bff; /* Your current blue accent */
    text-decoration: none;
}


/* Hover state */
a:hover {
        text-decoration: underline;

}

  .auto-style4 {
    text-decoration: underline;
    color: #FFCC99;
  }

/* Black Sticky Bar */
.sticky-nav {
  position: sticky;
  top: 0;
  background-color: #000000;
  border-bottom: 1px solid #333;
  z-index: 1000;
  padding: 12px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-brand {
  font-weight: bold;
  font-size: 1.1rem;
  color: #ffffff;
  text-decoration: none;
}
.nav-brand span {
  font-weight: 300;
  color: #888;
  margin-left: 5px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
    font-size: 0.9rem !important; 
}
.nav-menu a {
  text-decoration: none;
  color: #cccccc;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-menu a:hover {
  color: #007bff;
}

.search-icon {
  font-size: 1.2rem;
  cursor: pointer;
  padding-left: 10px;
  border-left: 1px solid #333;
  color: white;
}

/* Hamburger Styling */
.menu-toggle {
  display: none; /* Hidden by default */
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  } /* Show on mobile */

  .nav-menu {
    display: none; /* Hide the list on mobile initially */
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #000;
    padding: 0px;
    gap: 0;
    border-bottom: 1px solid #333;
         max-height: calc(100vh - 70px); /* Screen height minus the nav bar */
        overflow-y: auto;              /* Enables vertical scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling for iPhone */
 }

  /* Force the menu to show when active is present */
  .nav-menu.active {
    display: flex !important;
        flex-direction: column;
  }

  .nav-menu li {
    margin: 0;
    padding: 8px 0;
    text-align: center;
        font-size: 1rem;
        display: block;
  }

      .nav-menu li a {
        font-size: 1rem;
        display: block;
        width: 100%;
    }

}

/* --- SUBMENU STYLING --- */
.has-submenu {
    position: relative;
}

.has-submenu:hover {
    color: #007bff;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0a0a0a; /* Deep space black */
    border: 1px solid #333;
    border-top: 2px solid #007bff; /* Blue accent line at top */
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* Show submenu on desktop hover */
@media (min-width: 769px) {
    .has-submenu:hover .submenu {
        display: block;
    }
}

.submenu li {
    width: 100%;
    margin: 0 !important;
    text-align: left !important;
}

.submenu li a {
    padding: 12px 20px;
    font-size: 0.8rem;
    color: #ccc !important;
    display: block;
    transition: all 0.2s ease;
}

.submenu li a:hover {
    background-color: rgba(0, 123, 255, 0.15);
    color: #007bff !important;
    padding-left: 25px; /* Slight "nudge" effect */
}

/* --- MOBILE SUBMENU (Vertical Stack) --- */
@media (max-width: 768px) {
    .has-submenu .submenu {
        position: static; /* Un-float for mobile */
        display: block;   /* Keep visible in the hamburger list */
        background: transparent;
        border: none;
        padding-left: 40px;
        box-shadow: none;
    }
    
    .submenu li a {
        font-size: 0.85rem;
        border-bottom: none;
        color: #888 !important;
        padding-top: 0px;
        padding-bottom: 0px;
    }
}

/* Header with Star Background */
header {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("./Images/TitleBackgroundStars.jpg");
  background-size: cover;
  background-position: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 10%;
  overflow: hidden;
  border-bottom: 2px solid #007bff;
}

.header-img {
  position: absolute;
  left: 25%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 4px solid #1a1a1a;
  object-fit: cover;
  box-shadow: 0 0 30px rgba(0, 123, 255, 0.3);
}

.header-content {
  margin-left: auto;
  width: 50%;
  text-align: left;
}

.header-content h1 {
  font-size: 3.8rem;
  margin: 0;
  letter-spacing: 2px;
}
.header-content h2 {
  font-size: 1.4rem;
  color: #FFCC99; /* Your peach color */
  text-align: center;
}

.header-content p {
  font-size: 1.4rem;
  font-weight: 300;
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.social-dot {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.social-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-dot:hover {
  transform: scale(1.15);
  background-color: #007bff;
  border-color: #007bff;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.6);
}

/* Index page 2x2 grid */
/* Dark Themed Grid Section */
.hero {
  text-align: center;
  padding: 4rem 1rem 2rem 1rem;
}
.container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 100px 20px;
}

.section-box {
  background: #111;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  text-decoration: none;
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 1px solid #333;

  /* ADDED FOR FULL IMAGE FILL */
  position: relative;
  overflow: hidden; /* Clips image to the 15px rounded corners */
  padding: 0; /* Removes padding so image hits the edges */
}

.section-box:hover {
  transform: translateY(-8px);
  border-color: #007bff;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
  background-color: #1a1a1a;
}

.section-box img {
  /* Ensures the image fills the entire 220px box */
  width: 100%;
  height: 100%;

  /* This scales the image to fill while keeping it centered */
  object-fit: cover;
  object-position: center;

  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.6;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.section-box:hover img {
  opacity: 0.9; /* Brightens on hover */
  transform: scale(1.05); /* Subtle zoom effect */
}

/* Style for the text overlay */
.section-box span {
  position: relative; /* Ensures text stays above the image */
  z-index: 2;
  text-align: center;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9); /* High contrast for readability */
  padding: 20px;
}

@media (max-width: 900px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
    min-height: auto;
  }
  .header-img {
    position: relative;
    left: 0;
    transform: none;
    margin-bottom: 25px;
    width: 180px;
    height: 180px;
  }
  .header-content {
    width: 100%;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
  .container {
    grid-template-columns: 1fr;
  }
}

/* Announcement Bar */
.announcement-bar {
  background-color: #0a0a0a;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  cursor: pointer;
}

.scrolling-text {
  display: inline-block;
  /* Adjusted for a seamless 50% loop */
  animation: scroll-left 15s linear infinite;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.announcement-bar:hover .scrolling-text {
  animation-play-state: paused; /* Pause scroll on hover */
  color: #fff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.scrolling-text span {
  margin-right: 60px; /* Space between the repeating messages */
}

.scrolling-text a {
  color: #ffcc00;
  text-decoration: none;
  font-weight: bold;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* Halfway point for perfect looping */
}

/* Search form */
.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0 !important;
}

#search-form {
  width: 0;
  overflow: hidden;
  transition: width 0.4s ease; /* Smooth slide-out effect */
    margin: 0; 
    display: flex;
    align-items: center;
}

#search-form.active {
  width: 180px; /* Adjust based on how much space you want */
}

#search-input {
  background: #111;
  border: 1px solid #444;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  outline: none;
  width: 100%;
  height: 30px;
}

.search-icon {
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
  transition: color 0.3s;
}

.search-icon:hover {
  color: #007bff;
}

/* Back to top arrow */
#back-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: #111;
  color: white;
  text-align: center;
  line-height: 42px; /* Centers the arrow vertically */
  font-size: 20px;
  border-radius: 50%;
  border: 1px solid #333;
  text-decoration: none;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0; /* Hidden by default */
  visibility: hidden;
}

#back-to-top:hover {
  background-color: #007bff;
  border-color: #007bff;
  transform: translateY(-5px);
}
#back-to-top.flared-arrow {
  /* ... keep your existing positioning and circle styles ... */
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-90deg); /* Points the right-facing arrow UP */
  font-size: 24px; /* Flared arrows often need to be a bit larger to look good */
}

/* Adjust the hover so it doesn't lose the rotation */
#back-to-top.flared-arrow:hover {
  transform: rotate(-90deg) scale(1.1) translateX(5px);
  /* Note: translateX(5px) moves it "up" because it's rotated -90deg */
}

/* Class to show the button when scrolling */
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Footer */

footer {
  background-color: #000;
  border-top: 1px solid #333;
  padding: 60px 20px 40px 20px;
  text-align: center;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
}

.footer-form-area {
  margin-bottom: 40px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

/* Reusing the social dot style but slightly smaller for the footer */
.footer-socials .social-dot {
  width: 32px;
  height: 32px;
}

.footer-copyright p {
  color: #ffcc99; /* Your requested peach color */
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-copyright a {
  color: #ffcc99;
  text-decoration: underline;
}

.footer-copyright a:hover {
  color: #fff;
}

.footer-copyright p span {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* MailerLite Newletter sign-up Custom Styling */
.ml-form-embedWrapper {
  background: #111 !important; /* Matches your grid boxes */
  border: 1px solid #333 !important;
  border-radius: 15px;
  padding: 30px;
  color: white;
}

.ml-form-embedContent h4 {
  color: #ffcc99 !important; /* Peach title */
  font-size: 1.5rem !important;
  margin-bottom: 10px !important;
}

.ml-form-embedContent p {
  color: #ccc !important;
}

/* Style the Input Fields */
.ml-form-embedBody .form-control {
  background-color: #000 !important;
  border: 1px solid #444 !important;
  color: white !important;
  border-radius: 5px !important;
  padding: 10px !important;
}

/* Style the Subscribe Button */
.ml-form-embedBody button.primary {
  background-color: #007bff !important; /* Space Blue */
  border: none !important;
  color: white !important;
  font-weight: bold !important;
  border-radius: 5px !important;
  transition: background 0.3s ease !important;
  cursor: pointer;
}

.ml-form-embedBody button.primary:hover {
  background-color: #0056b3 !important;
}

/* Mobile responsive fixes for the horizontal form */
@media (max-width: 768px) {
  .ml-form-horizontalRow {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .horizontal-fields {
    width: 100% !important;
  }
}

/* --- Books Page Specific Styles --- */

/* Smaller Header for Sub-pages */
header.header-small {
  min-height: 300px; /* Reduced from 500px */
  padding: 0 5%;
}

/* Shrink the profile image */
header.header-small .header-img {
  width: 150px; /* Reduced from 250px */
  height: 150px; /* Reduced from 250px */
  left: 20%; /* Adjusted position for the smaller size */
}

/* Shrink the text sizes */
header.header-small .header-content h1 {
  font-size: 2.5rem; /* Reduced from 3.8rem */
}

header.header-small .header-content p {
  font-size: 1.1rem; /* Reduced from 1.4rem */
  margin-bottom: 10px;
}

/* --- Ossus Library Page Specific Styles --- */

.container-book {
  display: block; /* No more columns pushing things to the side */
  max-width: 950px; /* Slightly wider than the book-grid for padding */
  margin: 20px auto auto auto; /* Centers the whole page */
  padding: 0 20px 100px 20px;
}

.series-header {
  text-align: center;
  padding: 40px 20px 20px 20px;
}

.series-header h1 {
  font-size: 2.8rem;
  color: #ffcc99; /* Your Peach accent */
  margin: 0;
  text-shadow: 0 0 15px rgba(255, 204, 153, 0.2);
}

.trilogy-title {
  color: #ffffff;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin: 60px auto 30px auto;
  max-width: 900px;
  font-size: 1.8rem;
  text-align: left;
}

/* The Grid for Books */
.book-grid {
  display: grid;
  /* This automatically wraps books: 3 across on desktop, 1 on mobile */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
}

.book-card {
  background: #111;
  padding: 30px 20px;
  border-radius: 15px;
  border: 1px solid #333;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: #007bff;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.book-number {
  display: block;
  color: #888;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
}

.book-card h3 {
  font-size: 1.4rem;
  margin: 0 0 20px 0;
  color: #fff;
  line-height: 1.3;
}

/* Buy Buttons */
.buy-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  transition: all 0.2s;
  letter-spacing: 1px;
}

.buy-btn:hover {
  background: #007bff;
  color: white;
}

/* Responsive Mobile Fix */
@media (max-width: 600px) {
  .trilogy-title {
    font-size: 1.5rem;
    text-align: center;
  }
  .series-header h1 {
    font-size: 2rem;
  }
}

.book-cover {
  width: 100%; /* Fills the width of the book-card */
  max-width: 200px; /* Prevents covers from getting too huge on desktop */
  height: auto; /* Maintains correct book proportions */
  aspect-ratio: 2 / 3; /* Standard book dimensions */
  object-fit: cover; /* Ensures the image fills the space cleanly */

  border-radius: 4px; /* Slight rounding on the corners */
  margin: 0 auto 20px auto;
  display: block;

  /* The "Book" Shadow: Darker on the left to simulate a spine */
  box-shadow:
    2px 2px 15px rgba(0, 0, 0, 0.5),
    -2px 0 5px rgba(255, 255, 255, 0.1);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Subtle lift effect when the user hovers over the book */
.book-card:hover .book-cover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 5px 10px 25px rgba(0, 0, 0, 0.6);
}

/* Book template */
.book-cover-large {
  width: 100%; /* Fills the 300px container */
  height: auto; /* Maintains proportions */
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  display: block;
  margin-bottom: 20px;
}

.buy-section {
  width: 100%; /* Matches the cover width */
  margin-top: 20px;
  background: #111;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #222;
  box-sizing: border-box; /* Ensures padding doesn't make it wider than the cover */
}

.buy-buttons-large a {
  display: block; /* Forces buttons to be full-width blocks */
  width: 100%;
  box-sizing: border-box;
}

.book-detail-wrapper {
  display: flex;
  gap: 60px;
  max-width: 1000px;
  margin-bottom: 20px !important;
  padding: 00px;
  align-items: flex-start; /* Keeps the top of the cover and text level */
}

.book-detail-left {
  flex: 1;
  max-width: 300px; /* Limits the width so the cover stays book-shaped */
  text-align: center;
  padding-top: 20px;
}

.book-detail-right {
  flex: 1.5;
  text-align: left; /* Ensures the description is easy to read */
  padding-top: 20px;
}

/* Metadata Styling (Words, Pages, Date) */
.book-meta {
  font-size: 0.9rem;
  color: #888;
  margin: 15px 0;
  line-height: 1.6;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
}

.book-meta b {
  color: #ccc;
}

.book-synopsis p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #eee;
  margin-top: 20px;
}

/* Adjusting buttons for the left side */
/* Large Buy Buttons */
.buy-section h3 {
  font-size: 1rem;
  color: #888;
  margin-bottom: 15px;
}
.buy-buttons-large {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Update your Buy Buttons with the new Glow/Lift effect */
.buy-btn-primary,
.buy-btn-secondary {
  display: block; /* Ensures they fill the container width */
  width: 100%;
  padding: 15px 25px;
  text-align: center;
  border-radius: 8px; /* Matching the 8px from Learn More */
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 1px;
  box-sizing: border-box;
  transition: all 0.3s ease; /* Smooth transition for lift/glow */
  margin-bottom: 12px;
}

/* Primary Button (Amazon) - Solid Blue Glow */
.buy-btn-primary {
  background: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.buy-btn-primary:hover {
  transform: translateY(-5px); /* The "Lift" */
  background-color: #0056b3;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4); /* The Blue "Glow" */
}

/* Secondary Button (Kobo) - Outline Glow */
.buy-btn-secondary {
  background: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.buy-btn-secondary:hover {
  transform: translateY(-5px); /* The "Lift" */
  background-color: rgba(0, 123, 255, 0.1);
  color: #fff;
  border-color: #007bff;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3); /* Softer "Glow" */
}

/* Learn More section */

/* --- LEARN MORE SECTION (Vertical & Centered) --- */

.learn-more-container {
  margin-top: 40px;
  padding: 25px 20px;
  border-top: 1px solid #333;
  text-align: center; /* Centers the title and the list wrapper */
  width: 100%;
  box-sizing: border-box;
}

.learn-more-title {
  font-size: 1.1rem;
  color: #ffcc99; /* Peach accent */
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
  display: block;
}

.learn-more-links-vertical {
  list-style: none;
  padding: 0; /* Removes default browser indentation */
  margin: 0 auto; /* Centers the list itself */
  display: inline-flex;
  flex-direction: column;
  gap: 15px; /* Space between the links */
  align-items: center;
}

.learn-more-links-vertical li {
  width: 100%; /* Ensures the list item takes full width of the container */
}

.learn-more-links-vertical a {
  color: #007bff; /* Space blue */
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center; /* Centers icon + text inside the link */
  gap: 12px;
  padding: 12px 25px;
  border: 1px solid #222; /* Subtle border for a button-like feel */
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.03); /* Very slight dark tint */
  min-width: 250px; /* Keeps all buttons the same width */
}

/* Hover effects for Desktop */
.learn-more-links-vertical a:hover {
  color: #fff;
  background-color: rgba(0, 123, 255, 0.15);
  border-color: #007bff;
  transform: translateY(-3px); /* Slight lift effect */
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

.learn-more-links-vertical .icon {
  font-size: 1.3rem;
  filter: saturate(0.5); /* Tempers emoji colors to fit the dark theme */
}

/* Optimized Mobile Breakpoint */
@media (max-width: 800px) {
  /* 1. Stack the Cover (Left) and Text (Right) vertically */
  .book-detail-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Reduced gap for mobile */
  }

  /* 2. Center all text content */
  .book-detail-right {
    text-align: center;
    width: 100%;
  }

  /* 3. Center the metadata (Date/Words/Pages) */
  .book-meta {
    text-align: center;
    margin: 15px auto;
  }

  /* 4. Ensure the Buy buttons and Learn More links are consistent */
  .book-detail-left,
  .learn-more-links-vertical {
    width: 100%;
    max-width: 300px; /* Keeps buttons from getting too wide on tablets */
    margin: 0 auto;
  }

  /* 5. Scale down the giant title slightly for small screens */
  .book-detail-right h1 {
    font-size: 2.2rem !important;
  }
}

/* for books with multiple editions */
.editions-section {
  border-top: 1px solid #222;
  margin-top: 20px; /* Reduced from 30px/40px */
  padding-top: 15px;
}

.editions-title {
  font-size: 0.8rem;
  color: #666; /* Subdued color */
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.editions-grid {
  display: flex;
  gap: 50px; /* Keeps them side-by-side */
  flex-wrap: nowrap; /* Forces them to stay on one line on desktop */
}

.edition-item {
  width: 120px; /* Smaller, consistent width */
  text-align: center;
}

.edition-thumb {
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid #333;
  transition: all 0.3s ease;
  display: block;
  margin-bottom: 8px;
}

/* Hover effect to show it's a link to Amazon */
.edition-item a:hover .edition-thumb {
  border-color: #007bff;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.edition-item p {
  font-size: 0.7rem;
  color: #aaa;
  margin: 0;
  line-height: 1.2;
}

.edition-review-link {
  font-size: 0.65rem;
  color: #007bff;
  text-decoration: none;
  display: block;
  margin-top: 5px;
}

.edition-review-link:hover {
  color: #ffcc99;
  text-decoration: underline;
}

/* Series carousel at bottom of each book page*/
.series-nav-section {
  max-width: 1000px;
  margin: 60px auto;
  padding: 20px;
  border-top: 1px solid #333;
  text-align: center;
}

.series-nav-title {
  color: #888;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 30px;
  text-align: center; /* Forces the text to the middle */
  width: 100%; /* Ensures it takes up the full width of the wrapper */
}

.series-nav-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  /* HIDE SCROLLBARS */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.nav-book-item {
  flex: 0 0 100px; /* Forces each book to be exactly 100px wide and not shrink */
  scroll-snap-align: start; /* The "snap" point */
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-book-item img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #222;
}

.nav-book-item span {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
}

.nav-book-item:hover .nav-cover {
  border-color: #007bff;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

.nav-book-item:hover img {
  border-color: #007bff;
}

.nav-cover {
  width: 100%;
  aspect-ratio: 2 / 3; /* Forces standard book proportions */
  object-fit: cover; /* Ensures no stretching */
  border-radius: 3px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}

/* Optional: Custom scrollbar styling for Chrome/Safari */
.series-nav-grid::-webkit-scrollbar {
  display: none;
}
.series-nav-grid::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

.carousel-container {
  display: flex;
  justify-content: center; /* Centers the grid and arrows together */
  align-items: center;
  width: 100%;
}

.series-nav-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Arrow Button Styling */
.nav-arrow {
  background: rgba(0, 0, 0, 0.6);
  color: #ffcc99; /* Matches your peach theme */
  border: 1px solid #333;
  font-size: 1.5rem;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Positioning */
.nav-arrow.left {
  margin-right: 10px;
}
.nav-arrow.right {
  margin-left: 10px;
}

.nav-book-item {
  flex: 0 0 100px; /* Ensures books don't shrink */
  text-decoration: none;
}

.series-nav-wrapper {
  max-width: 1000px;
  margin: 10px auto; /* "auto" on the sides centers the entire section */
  padding: 0px;
  border-top: 1px solid #333;
  text-align: center; /* Centers the title and the carousel container */
}

/* Reduce space at the top of the Carousel Navigator */
.series-nav-wrapper {
  margin-top: 20px !important; /* Tightens the gap between Detail and Carousel */
  padding-top: 20px;
  border-top: 1px solid #222; /* Keeps a subtle separator line */
}

.series-nav-title {
  margin-bottom: 15px; /* Reduced from 30px to bring images closer to title */
}

/* ABOUT PAGE */
        .about-content {
            line-height: 1.8;
            font-size: 1.1rem;
            color: #ddd;
        }
        .about-content p { margin-bottom: 25px; }
        .about-content h2 { color: #FFCC99; margin-top: 40px; }
        
        /* Optional: Small bio photo wrap */
        .bio-img-wrap {
            float: left;
            margin: 0 30px 20px 0;
            max-width: 250px;
        }
        .bio-img-wrap img {
            width: 100%;
            border-radius: 10px;
            border: 1px solid #333;
        }

        .about-cta-section {
    text-align: center;
    margin-top: 50px;
    padding-bottom: 40px;
}

.cta-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #333, transparent);
    margin-bottom: 40px;
}

.about-cta-section h3 {
    color: #888;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

/* Custom styling for the CTA button to make it feel special */
.cta-btn {
    display: inline-block !important; /* Overrides the full-width block style */
    width: auto !important;
    min-width: 250px;
    padding: 18px 40px !important;
    font-size: 1.2rem !important;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

.cta-btn:hover {
    box-shadow: 0 0 25px rgba(0, 123, 255, 0.5);
    transform: translateY(-5px);
}


        @media (max-width: 700px) {
            .bio-img-wrap { float: none; margin: 0 auto 20px auto; text-align: center; }
        }


/* NEWS PAGE */
        .news-item {
            background: #111;
            border: 1px solid #333;
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 50px;
            position: relative;
            overflow: visible; 
            display: flow-root; 
            transition: transform 0.3s ease;
        }
        .news-item:hover { border-color: #007bff; }
        
        .news-date {
            color: #888;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: block;
            margin-bottom: 10px;
        }
        
        .news-item h2 { color: #FFCC99; margin: 0 0 15px 0; }
        .news-content { line-height: 1.7; color: #ccc; }
        
        /* Featured / Latest Release Style */
        .featured-news {
            border: 2px solid #007bff;
            box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
            position: relative;
            padding-top: 10px;
        }
        .featured-label {
            position: absolute;
            top: -15px;
            left: 25px;
            background: #007bff;
            color: white;
            padding: 4px 15px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: bold;
            z-index: 10; /* Ensures it sits on top of everything */
            box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Makes it pop against the background */
            white-space: nowrap;
        }

        .news-img-inline {
            float: right;
            width: 150px;
            margin-left: 20px;
            border-radius: 5px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
        }

        @media (max-width: 600px) {
            .news-img-inline { float: none; display: block; margin: 0 auto 20px auto; width: 120px; }
            .news-item { text-align: center; }
        }

/* Ossus Library styles */
.header-ol {
    min-height: 80px; /* Reduced from 500px */
    max-width: 900px;
    margin: 0 auto;
    background-color: #000;
    padding: 10px 0px 10px 0px;
    font-family: Verdana, sans-serif;
    color: #C0C0C0;
}

.header-ol-img {
  max-width: 400px;
}

/* TOP ROW LAYOUT */
.header-top-row {
    display: flex;
    justify-content: space-between; /* Pushes Logo left, Updates right */
    align-items: flex-start;
    margin-bottom: 5px;
}

/* LEFT LOGO STACK */
.left-title-stack {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Very tight spacing like your image */
}

.welcome-tag {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-img {
    max-width: 380px; /* Adjust to match your image width */
    height: auto;
}

.author-tag {
    font-size: 16px;
    color: #FFF;
    font-weight: bold;
    letter-spacing: 1px;
}

.update-link {
    color: #00aaff; /* Blue-ish color from your image */
    font-size: 13px;
    text-decoration: none;
    font-weight: bold;
}

.update-date {
    color: #FFCC99; /* Your peach color */
    font-size: 13px;
}

/* BOTTOM ROW (Line + Spoiler) */
.header-bottom-row {
    width: 100%;
    margin-top: 5px;
    text-align: right;

}

.thin-line {
    border: 0;
    height: 1px;
    background-color: #444; /* Thin gray line */
    margin: 5px 0;
    width: 100%;
}

.spoiler-text {
    text-align: right;
    font-size: 10px;
    letter-spacing: 1px;
    color: #C0C0C0;
}

/* Ossus Library Index */
/* Container for all sections */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-row {
  margin-bottom: 50px;
  text-align: center; /* Centers the H2 titles */
}

.section-row h2 {
  display: inline-block;
  border-bottom: 2px solid #4b5157;
  padding-bottom: 5px;
  margin-bottom: 25px;
  color: #FFCC99;
}

/* The magic "Unified" Grid */
.unified-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  justify-content: center; /* Centers items if they don't fill the row */
}

/* Specific overrides to force centering for low counts */
.grid-1 { max-width: 600px; margin: 0 auto; grid-template-columns: 1fr; }
.grid-2 { max-width: 320px; margin: 0 auto; grid-template-columns: repeat(2, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* Small Card styling from your theme */
.small-card {
  min-height: 160px !important;
  font-size: 1rem !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .unified-grid {
    grid-template-columns: repeat(3, 1fr) !important; /* 2 per row on mobile */
  }
  .grid-1 {
    grid-template-columns: 1fr !important;
  }
  .header-ol {
    padding: 10px 30px 10px 30px;
  }
}

/* Make Section 1 taller and center the image */
/* Section 1: Vertical Fit for Desktop & Fluid for Mobile */
.grid-1 .taller-box {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    
    height: 400px;         /* Fixed height on desktop to ensure vertical fit */
    
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111; /* Provides a clean backdrop for different image ratios */
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

.grid-1 .taller-box img {
    /* "contain" shrinks the image to fit the box's height without cropping */
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

/* Mobile Fix: Ensure the box doesn't disappear and scales with the image */
@media (max-width: 768px) {
    .grid-1 .taller-box {
        height: auto;       /* Allows image to dictate height on small screens */
        min-height: 300px;  /* Prevents the "disappearing" effect */
        aspect-ratio: auto; 
    }
    
    .grid-1 .taller-box img {
        height: auto;       /* Maintains intrinsic ratio on mobile */
        width: 100%;        /* Use full width on small screens */
    }
}

/* Blue Divider Line */
.blue-divider {
  border: 0;
  height: 2px;
  background: #007bff;
  max-width: 900px;      /* Matches your content width */
  margin: 40px auto;     /* Centers it and adds vertical space */
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.4); /* Subtle glow effect */
  opacity: 0.8;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
  .blue-divider {
    max-width: 80%;      /* Shortens the line slightly on phones */
    margin: 30px auto;
  }
}

/* Container for the reviews */
.grid-reviews {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.review-card {
  width: 170px;
  max-width: 40vw;
  display: flex;
  flex: 0 1 auto;
  flex-direction: column; /* Forces vertical stacking */
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative; 
  overflow: hidden;
}

/* Ensure the cover image doesn't float over the text */
.cover-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin-bottom: 12px;
}

.cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: static !important; /* CRITICAL: This overrides your original absolute positioning */
  opacity: 1 !important;      /* Ensures image isn't faded */
  transform: none !important;
}

/* Text Container */
.review-info {
  display: flex;
  flex-direction: column; /* Stacks title, stars, and author */
  align-items: center;
  gap: 5px;
  text-align: center;
}

.book-title {
  color: #007bff;
  font-size: 0.9rem;
  line-height: 1.2;
}

/* Forces stars and plus to stay together on one line */
.rating-row {
    display: flex;
    align-items: center;    /* Centers them vertically against each other */
    justify-content: center; /* Centers the whole group in the card */
    gap: 5px;               /* Space between the stars and the plus */
    margin: 5px 0;
}

/* Style for the yellow plus */
.plus-symbol {
    color: #ffcc00;         /* Bright yellow */
    font-weight: bold;
    font-size: 1.2rem;      /* Make it slightly larger than the stars */
    line-height: 1;         /* Prevents it from adding extra height */
    display: inline-block;
}

/* Ensure stars don't stretch or jump to a new line */
.rating-stars {
    height: 14px !important; 
    width: auto !important;
    position: static !important; /* Overrides your original absolute positioning */
    display: block;
}

.genre, .author {
  font-size: 1.0rem;
  color: #888;
}

.review-card:hover {
    transform: translateY(-10px) scale(1.05); /* Lifts and grows */
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.3); /* Blue glow underneath */
    background-color: #1a1a1a;
    border-color: #007bff;
    z-index: 10; /* Ensures the "popped" card stays on top of others */
    text-decoration: none !important; /* Keep the card itself from underlining */
}
/* 1. Remove the default underline from the entire clickable card */
.review-card, 
.review-card:hover {
    text-decoration: none !important;
}

/* 2. Add the underline back only to the specific text parts on hover */
.review-card:hover .book-title,
.review-card:hover .genre,
.review-card:hover .author {
    text-decoration: underline;
}

/* 3. Explicitly kill the underline on the stars/plus container */
.rating-row, 
.rating-row:hover,
.plus-symbol {
    text-decoration: none !important;
    display: flex; /* Keep them on one line */
}

/* 4. Ensure the plus symbol stays yellow and clean */
.plus-symbol {
    color: #ffcc00 !important;
    text-decoration: none !important;
    display: inline-block;
}

/* Section 3: Smaller 5-column grid */
.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    max-width: 800px; /* Constrains the row width to keep boxes small */
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 auto;
}

.mini-card {
    min-height: 65px !important; /* About half the height of your standard boxes */
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-direction: column;
    text-align: center;
}

/* Force images to shrink into the box without cropping */
.mini-card img {
    width: 100%;
    object-fit: contain; /* Shrinks to fit vertically and horizontally */
    position: static !important; /* Resets any absolute positioning */
    opacity: 1 !important;
}

.mini-card span {
    font-size: 1rem !important; /* Approximately 25% smaller than your default */
    font-weight: 500;
    color: #007bff;
    line-height: 1.2;
    text-transform: none; /* Keep it from being all caps if your main style is caps */
}

.mini-card:hover {
      text-decoration: underline #007bff;
}

/* Responsive: 3 per row on small tablets, 2 on phones */
@media (max-width: 768px) {
    .mini-card {
        width: 120px !important;
    }
    .grid-5 {
      max-width: unset;
      display: flex;
    }
    .grid-2 {
      max-width: unset;
      display: flex;
    }
}

/* Container for the 2-column layout */
.misc-flex-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Vertical Stacks */
.misc-column {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between the vertical boxes */
}

/* Base Card Style */
.misc-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.misc-card:hover {
    border-color: #007bff;
    background: #1a1a1a;
      opacity: 0.9; /* Brightens on hover */
  transform: scale(1.05); /* Subtle zoom effect */

}

/* Full Width Element 6 */
.full-width {
    grid-column: span 2; /* Stretches across both columns */
    margin-top: 10px;
    color: #FFCC99;
}

/* Mobile: Everything stacks in one single column */
@media (max-width: 600px) {
    .misc-flex-wrapper {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
}

.container-table {
  display: block; /* No more columns pushing things to the side */
  max-width: 1250px; /* Slightly wider than the book-grid for padding */
  margin: 20px auto auto auto; /* Centers the whole page */
  padding: 0 5px 100px 175px;
}

@media (max-width: 600px) {
  .container-table {
    padding: 0 5px 100px 5px;
  }
}
/* Filter for chronological index */
/* Layout Wrapper */
.main-table-wrapper {
  display: flex;
  align-items: flex-start; /* Crucial for sticky to work */
  gap: 20px;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: visible;
}

.table-area {
  flex: 1; /* Table takes up the remaining space */
  min-width: 0; /* Prevents table from breaking layout */
}

/* The Filter Box */
.sticky-filter-box {
  position: sticky;
  top: 90px; /* Position it just below your sticky header */
  width: 120px;
  background: #111;
  border: 1px solid #007bff;
  border-radius: 8px;
  padding: 5px;
   align-self: flex-start;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
   height: auto !important;
}

.sticky-filter-box label {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 5px;
  text-transform: uppercase;
  text-align: center;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 5px;
}

.check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
    transition: color 0.2s;
}

.check-label input {
    margin-right: 10px;
    accent-color: #007bff; /* Colors the checkbox blue */
}

.check-label:hover {
    color: #fff;
}

.mini-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 5px 0;
}

/* Mobile: Reverse the stack so the filter is at the top */
@media (max-width: 900px) {
  .main-table-wrapper {
    display: flex;
    flex-direction: column-reverse; /* Reverses the visual order of items */
  }
  
  .sticky-filter-box {
    position: static; /* Removes sticky behavior for mobile */
    width: 100%;
    margin-bottom: 20px; /* Space between filter and the table below it */
  }

  .table-area {
    width: 100%; /* Ensures the table takes full width on small screens */
  }
}

/* Mobile only: Limit height and enable scrolling */
@media (max-width: 900px) {
  .scrollable-filter-area {
    max-height: 120px;    /* Height for roughly 4 items */
    overflow-y: auto;     /* Shows scrollbar only if content overflows */
    padding-right: 5px;   /* Space for the scrollbar */
    margin-top: 10px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
  }

  /* Custom scrollbar styling matches dark theme */
  .scrollable-filter-area::-webkit-scrollbar {
    width: 6px;
  }
  .scrollable-filter-area::-webkit-scrollbar-thumb {
    background: #007bff; /* Matches your blue accent */
    border-radius: 10px;
  }
  .scrollable-filter-area::-webkit-scrollbar-track {
    background: #111;
  }

    /* Use a 2-column grid inside the scroll area */
  .checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 10px;                     /* Spacing between items */
    padding: 10px 5px;
  }

  /* Make sure the individual labels don't wrap their own text */
  .check-label {
    display: flex;
    align-items: center;
    white-space: nowrap;           /* Keeps "2018-2020" on one line */
    font-size: 0.8rem;             /* Slightly smaller to fit side-by-side */
  }

  /* Adjust the scroll area height to show roughly 3-4 rows (6-8 items) */
  .scrollable-filter-area {
    max-height: 140px; 
    overflow-y: auto;
  }

    /* 1. Make the 'Show All' label span both columns */
    .checkbox-group .check-label:first-of-type {
        grid-column: span 2;
        justify-content: center; /* Optional: centers "Show All" in the middle */
        padding-bottom: 5px;
    }

    /* 2. Make the mini-divider span both columns */
    .mini-divider {
        grid-column: span 2;
        width: 100%;
        margin: 5px 0;
    }
}

/* Books -Chronoligical table headers */
tbody[data-year] tr:first-child {
    background-color: #ffffffa0; 
    font-weight: bold;
}

tbody[data-year] tr:first-child td {
    color: #000000;
    font-weight: bold;
}

/* 00SF.htm */


/* Author Header */
.author-section h2 {
  text-decoration: underline;
  margin-bottom: 5px;
  font-size: 1.5em;
}

/* Series Title */
.series-title {
  font-weight: bold;
  font-style: italic;
  margin: 10px 0 5px 0;
  display: block; /* Ensures it starts on a new line */
}

/* Series Row: Forces one series per line */
.series-row {
  display: flex;
  flex-wrap: wrap; /* Books wrap within the series row if needed */
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee; /* Optional separator between series */
}

/* Book Styles (Modernized version of your IDs) */
.book-item {
  width: 120px;
  min-height: 180px;
  text-align: center;
}

.book-item.wide { width: 150px; }
.book-item.extra-wide { width: 200px; }


