/* Fonts Declaration */
@font-face {
  font-family: 'IM Fell Great Primer SC';
  src: url('../fonts/IMFellGreatPrimerSC/IMFellGreatPrimerSC-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Quattrocento';
  src: url('../fonts/quattrocento/Quattrocento-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Quattrocento Bold';
  src: url('../fonts/quattrocento/Quattrocento-Bold.ttf') format('truetype');
  font-weight: bold;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display/PlayfairDisplay-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'IM Fell DW Pica SC';
  src: url('../fonts/IM_Fell_DW_Pica_SC/IMFellDWPicaSC-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Lora-Medium';
  src: url('../fonts/Lora/Lora-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Bonheur_Royale';
  src: url('../fonts/Bonheur_Royale/BonheurRoyale-Regular.ttf') format('truetype');
}

/* General Styling */
body {
  font-size: 1.1rem;
  font-family: 'Lora-Medium', serif;
  background-color: #f0eded;
  color: #000;
  margin: 0;
  padding: 0;
}

a {
  color: #031346;
  text-decoration: underline;
}

h2 {
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 1.25rem;
  padding-top: 1rem;
}

h3 {
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 1.15rem;
  padding-top: .8rem;
}

h4, h5, h6 {
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 1.05rem;
}

.summary {
  font-size: 1.4rem;
  font-family: 'IM Fell DW Pica SC', serif;
}

/* Header Styling - overlays on top of breadcrumbs */
.site-header {
  font-family: 'IM Fell Great Primer SC', serif;
  position: relative;
  z-index: 10;
  margin-bottom: 0;
  border-top: 1px solid #fff;
}

/* Header Bar */
.header-bar {
  background-color: #d9d6d6;
  width: 100%;
  height: 100px;
  border-bottom: 1px solid #fff;
  border-top: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  margin-bottom: 0;
}

/* Headshot */
.headshot-wrapper {
  position: absolute;
  padding top: 103px
  transform: translateY(-50%);
  left: calc(50% - 500px - 150px);
  z-index: 30;
}

.headshot {
  width: 100px;
  height: 100px;
  display: block;
}

/* Navigation - centered in available space */
.header-nav {
  position: relative;
  z-index: 10;
  height: 100px;
  border-bottom: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  width: 100%;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
  font-family: 'IM Fell Great Primer SC', serif;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  font-family: 'IM Fell Great Primer SC', serif;
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

/* Submenu Styling */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  border-left: 1px solid #fff;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background-color: #d9d6d6;
  list-style: none;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 200px;
  white-space: nowrap;
}

.submenu li {
  margin: 0.25rem 0;
}

.submenu a {
  color: #000;
  text-decoration: none;
}

.has-submenu:hover .submenu {
  display: block;
}

/* Breadcrumb strip styling - at top, header overlays on top */
.breadcrumb-strip {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  z-index: 25;
  position: relative;
  width: 100%;
  margin: 0;
  display: block;
}

.breadcrumb-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  left: calc(50% - 500px - 150px);
}

.breadcrumb-strip a {
  color: #031346;
  text-decoration: none;
}

.breadcrumb-strip a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: #666;
}

.breadcrumb-current {
  color: #666;
  font-weight: normal;
}

/* Hero Image */
.hero-image {
  max-width: 1920px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Portrait Hero Image */
.portrait-hero-image {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.float-left-hero {
  float: left;
  width: 400px;
  height: auto;
  margin: 125px 2rem 1rem 100px;
  object-fit: cover;
}

/* Square Hero Image */
.square-hero-image {
  width: 400px;
  height: 400px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.grid-hero-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* Content Container */
.content-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.content-container h1 {
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.25rem auto;
}

/* Remove any conflicting margins that might create space */
main {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  z-index: 1;
}

/* Ensure no extra spacing on articles */
article {
  margin-top: 0;
  padding-top: 0;
}

/* Signup Form */
.signup-form iframe {
  width: 100%;
  min-height: 400px;
  border: none;
}

.signup-form:empty {
  display: none;
}

/* Footer Styling */
.site-footer {
  font-family: 'IM Fell Great Primer SC', serif;
  text-align: center;
  padding: 1rem;
}

.site-footer small {
  font-size: 0.8rem;
}

.site-footer tiny {
    font-size: 0.6rem;
}
/* ========================
   404 PAGE STYLING
=========================== */

.error-layout-container .error-layout {
  padding: 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  min-height: 50vh;
  flex-wrap: nowrap;
  width: 100%;
}

.error-layout-container .error-image {
  flex: 0 0 400px;
  width: 400px;
  max-width: 400px;
}

.error-layout-container .error-image img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin: 0 !important;
}

.error-layout-container .error-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.error-layout-container .error-message {
  font-family: 'IM Fell Great Primer SC', serif !important;
  font-size: 2rem !important;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: #000;
  margin-top: 0;
}

.error-layout-container .error-text p:last-child {
  font-size: 1.2rem;
  margin: 0;
}

.error-layout-container .error-text .home-link {
  color: #031346;
  text-decoration: none;
  font-weight: bold;
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid #031346;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.error-layout-container .error-text .home-link:hover {
  background-color: #031346;
  color: #fff;
  text-decoration: none;
}

/* Mobile responsive rules for 404 page */
@media (max-width: 768px) {
  .error-layout-container .error-layout {
    padding: 2rem 0;
    flex-direction: column !important;
    text-align: center;
    gap: 2rem;
    align-items: center;
  }
  
  .error-layout-container .error-image {
    flex: 0 0 auto;
    width: 300px;
    max-width: 300px;
  }
  
  .error-layout-container .error-text {
    text-align: center;
  }
  
  .error-layout-container .error-message {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .error-layout-container .error-image {
    width: 250px;
    max-width: 250px;
  }
  
  .error-layout-container .error-message {
    font-size: 1.2rem !important;
  }
}


/* Screen reader only class for proper h1 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Grid Layout Sections (books, reviews, latest) */
.grid-section {
  padding: 3rem 1rem;
}

.grid-section h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

/* Grid Header - Left-aligned to match grid content */
.grid-header {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Style each post in the grid */
.grid-post {
  text-align: center;
}

.grid-post h3 {
  margin-top: 0;
  font-size: 1rem;
}

.grid-post p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 0.4rem;
}

/* Override conflicting global image rule */
.content-container img.square-hero-image,
.content-container img.grid-hero-image {
  margin: 0;
}

/* Override any conflicting rules for featured post images */
.featured-post img.announcement-photo {
  width: 150px !important;
  height: 150px !important;
  margin: 0 !important;
}

/* Remove underlines from post title and summary links in section layouts AND historical fiction pages */
.featured-post a,
.second-post a,
.grid-post a,
.historical-fiction-author-link,
.historical-fiction-book-card {
  text-decoration: none;
  color: #000;
}

/* Add underline on hover in section layouts AND historical fiction pages */
.featured-post a:hover,
.second-post a:hover,
.grid-post a:hover,
.historical-fiction-author-link:hover,
.historical-fiction-book-card:hover {
  text-decoration: underline;
}

.about-byline {
  margin-top: 4rem;
  padding-top: 2rem;
  font-family: 'Lora-Medium', serif;
}

.about-author {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
}

/* General author photo styling - 150x150 */
.author-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Ensure announcement photo matches author photo size */
.announcement-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.author-text {
  flex: 1;
}

.author-social {
  margin-top: .5rem;
  display: flex;
  gap: 1rem;
  justify-content: center; 
  align-items: center;
}

.author-social img {
  width: 32px;
  height: 32px;
}

/* ========================
   INDEX PAGE SECTIONS
=========================== */

/* Full-width wrapper */
.fullwidth-wrapper {
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
  padding: 0rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 3rem 1rem 4rem;
  background-color: #eae7e7;
}

.cta-text {
  font-size: 2rem;
  font-family: 'IM Fell DW Pica SC', serif;
  margin-bottom: 1rem;
}

.hero-image, .hero-video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.cta-button-wrapper {
  margin-top: 1rem;
}

.cta-button-wrapper .button {
  background-color: #031346;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 6px;
  display: inline-block;
}

.cta-button-wrapper .button:hover {
  background-color: #00102b;
}

/* About Section - match featured post styling */
.about-section {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  padding: 2rem;
}

.author-text p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.author-text .button {
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  text-decoration: none;
}

.author-text .button:hover {
  background-color: #00102b;
}

/* Featured Post Styling */
.featured-post {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 2rem;
  gap: 1rem;
  box-sizing: border-box;
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  height: 100%;
}

/* Featured Announcement Layout */
.featured-announcement {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
}

.announcement-image {
  flex-shrink: 0;
}

/* Force announcement photo to be 150x150 with higher specificity */
.announcement-photo .featured-announcement .announcement-photo {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 8px;
}

.announcement-text {
  flex: 1;
}

.announcement-text h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.announcement-text p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.announcement-text .button {
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  text-decoration: none;
}

.announcement-text .button:hover {
  background-color: #00102b;
}

.featured-post img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 0 1rem 0;
}

.featured-post h2,
.featured-post p {
  font-size: 1rem;
}

.featured-post .button {
  margin-top: 0.5rem;
  display: inline-block;
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 5px;
}

.featured-post .button:hover {
  background-color: #00102b;
}

/* Grid Layout Sections (books, reviews, latest) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 1.5rem auto;
}

.grid-post .grid-hero-image .grid-post .index-hero-image img {
  display: inline-block;
  text-align: center;
  width: 300px;
  height: auto;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.grid-post h3 {
  font-size: 1.2rem;
}

.grid-post .button {
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 5px;
}

.grid-post .button:hover {
  background-color: #00102b;
}

/* Section CTA Button (e.g., See All) */
.cta-button-wrapper {
  text-align: center;
  margin-top: 2rem;
}

/* ========================
   INDEX PAGE ABOUT + FEATURED SECTION
=========================== */

.about-and-featured {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 2rem;
  flex-wrap: wrap;
  /* max-width: 1200px; */
  margin: 0;
}

.about-section,
.featured-post {
  flex: 1 1 40%;
  max-width: 40%;
  display: flex;
  flex-direction: row;
}

/* About Me Block - match featured post styling */
.about-section {
  max-width: 40%;
}

/* Ensure author photo is consistently 150x150 */
.about-section .author-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.author-text p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* Featured Post Block */
.featured-post {
  max-width: 60%;
} 

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.index-grid-post {
  text-align: center;
  padding: 1rem;
}

.index-hero-image {
  width: 250px;
  height: 375px;
  object-fit: cover;
  display: block;
  margin: 1.5rem auto;
}
/* ========================
   UNIFIED ABOUT AND FEATURED SECTION
=========================== */

.unified-about-featured {
  display: flex;
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  overflow: hidden;
  width: 100%;
}

.unified-about-section,
.unified-featured-section {
  flex: 1;
  width: 50%;
  padding: 5rem 3rem;
}

.unified-about-section {
  /* Central border made invisible */
  border-right: none;
}

/* About section content */
.unified-about-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.unified-author-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.unified-author-text {
  flex: 1;
}

.unified-author-text p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.unified-author-text .button {
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  text-decoration: none;
}

.unified-author-text .button:hover {
  background-color: #00102b;
}

/* Featured section content */
.unified-featured-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.unified-announcement-image {
  flex-shrink: 0;
}

.unified-announcement-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.unified-announcement-text {
  flex: 1;
}

.unified-announcement-text h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  padding-top: 0;
}

.unified-announcement-text p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.unified-announcement-text .button {
  background-color: #031346;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  text-decoration: none;
}

.unified-announcement-text .button:hover {
  background-color: #00102b;
}

/* Remove underlines from links */
.unified-about-content a,
.unified-featured-content a {
  text-decoration: none;
  color: #000;
}

.unified-about-content a:hover,
.unified-featured-content a:hover {
  text-decoration: underline;
}

/* Button links should remain styled */
.unified-author-text .button,
.unified-announcement-text .button {
  color: #fff !important;
}

.unified-author-text .button:hover,
.unified-announcement-text .button:hover {
  text-decoration: none !important;
}

/* Focus styles for accessibility */
.unified-about-content a:focus,
.unified-featured-content a:focus {
  outline: 2px solid #031346;
  outline-offset: 2px;
}

.unified-author-text .button:focus,
.unified-announcement-text .button:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .unified-about-featured {
    border: 2px solid;
  }
  
  .unified-author-text .button,
  .unified-announcement-text .button {
    border: 2px solid #fff;
  }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .unified-about-featured {
    flex-direction: column;
    margin: 0 1rem; /* Add side margins to prevent edge cutoff */
    max-width: calc(100% - 2rem); /* Ensure it doesn't exceed screen width */
  }
  
  .unified-about-section,
  .unified-featured-section {
    width: 100%;
    padding: 1.5rem; /* Reduce padding on mobile */
  }
  
  .unified-about-section {
    /* No border needed on mobile since sections stack */
    border-bottom: none;
  }
  
  .unified-about-content,
  .unified-featured-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  
  .unified-author-text,
  .unified-announcement-text {
    margin-top: 1rem;
    width: 100%; /* Ensure text containers use full available width */
  }
}

/* Phone layouts */
@media (max-width: 480px) {
  .unified-about-featured {
    margin: 0 0.5rem; /* Tighter margins for phones */
    max-width: calc(100% - 2rem); /* Account for margins */
  }
  
  .unified-about-section,
  .unified-featured-section {
    padding: 1rem; /* Even less padding on phones */
  }
  
  .unified-author-photo,
  .unified-announcement-photo {
    width: 120px;
    height: 120px;
  }
  
  .unified-author-text p,
  .unified-announcement-text p {
    font-size: 0.95rem;
    padding: 0 0.5rem; /* Add small horizontal padding to text */
  }
  
  .unified-announcement-text h2 {
    font-size: 1.1rem;
    padding: 0 0.5rem; /* Add small horizontal padding to headings */
  }
  
  .unified-author-text .button,
  .unified-announcement-text .button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* Very small phones and narrow devices */
@media (max-width: 360px) {
  .unified-about-featured {
    margin: 0rem; /* Minimal margins for very small screens */
    max-width: calc(100% - 1rem); /* Account for minimal margins */
  }
  
  .unified-about-section,
  .unified-featured-section {
    padding: 0.75rem;
  }
  
  .unified-author-photo,
  .unified-announcement-photo {
    width: 100px;
    height: 100px;
  }
  
  .unified-author-text p,
  .unified-announcement-text p {
    font-size: 0.9rem;
    padding: 0; /* Minimal horizontal padding */
    line-height: 1.4;
  }
  
  .unified-announcement-text h2 {
    font-size: 1rem;
    padding: 0 0.25rem;
    line-height: 1.3;
  }
  
  .unified-author-text .button,
  .unified-announcement-text .button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.75rem;
  }
}

/* ========================
   FLOATING SUBSCRIPTION BUTTON
=========================== */

.floating-subscription {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gentle-bounce 4s ease-in-out infinite;
}

.floating-subscription.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.subscription-main-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'IM Fell DW Pica SC', serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.subscription-main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.6);
    background: linear-gradient(135deg, #cc0000, #990000);
}

.subscription-main-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .subscription-main-btn {
        border: 2px solid white;
    }
    
    .subscription-main-btn:focus {
        outline: 3px solid yellow;
    }
}

/* ===== MOBILE MENU SYSTEM ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #000;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 190;
}

.menu-overlay.show {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #d9d6d6;
    z-index: 200;
    overflow-y: auto;
    padding: 2rem 1rem;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu.open {
    left: 0;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'IM Fell Great Primer SC', serif;
}

.mobile-nav-menu > li {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

.mobile-nav-menu > li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    display: block;
    padding: 0.75rem 0;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.mobile-nav-menu a:hover {
    color: #031346;
    text-decoration: underline;
}

.mobile-submenu-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.75rem 0;
    color: #000;
    font-family: 'IM Fell Great Primer SC', serif;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

.mobile-submenu {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    display: none;
    background: #eae7e7;
    border-radius: 4px;
    overflow: hidden;
}

.mobile-has-submenu.open .mobile-submenu {
    display: block;
}

.mobile-submenu a {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: normal;
    border-bottom: 1px solid #d9d6d6;
}

.mobile-submenu li:last-child a {
    border-bottom: none;
}

.mobile-has-submenu .triangle {
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
    font-size: 0.8em;
}

.mobile-has-submenu.open .triangle {
    transform: rotate(90deg);
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
        left: -100% !important;
    }

    .menu-overlay {
        display: none !important;
    }
    
    .hamburger {
        display: none !important;
    }
}

/* Scrollwork decoration styles */
.scrollwork-decoration {
  text-align: center;
  margin: 1rem 0;
  line-height: 1;
}
.scrollwork-image {
  width: 50px;
  height: 50px;
  display: inline-block;
  vertical-align: middle;
}
/* Scrollwork Mobile responsiveness */
@media (max-width: 400px) {
  .scrollwork-image {
    width: 40px;
    height: 40px;
  }
}
/* ========================
   CATEGORY HOME PAGES (Book Reviews, Category Lists)
   Uses cathome- prefixed classes to avoid conflicts
=========================== */
/* Featured section wrapper - the card background */
.cathome-featured-wrapper {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  padding: 2rem;
  margin-bottom: 3rem;
}
/* Side-by-side layout for category pages - grid layout */
.cathome-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 0;
}
/* Featured post and second post styling for category pages */
.cathome-featured-post,
.cathome-second-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
  height: auto;
  margin-bottom: 0;
}
/* Image container for category pages */
.cathome-image {
  order: 1;
  margin-bottom: 1rem;
}
/* Text container for category pages */
.cathome-text {
  order: 2;
  width: 100%;
  flex: none;
}
/* Book cover images for category pages */
.cathome-hero-image {
  width: 400px;
  height: 600px;
  object-fit: cover;
  display: block;
  margin: 0;
}
/* Text styling for category pages - using global typography */
.cathome-text h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-top: 0;
}
.cathome-text h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-top: 0;
}
.cathome-text p {
  margin-top: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
/* Link styling for category pages */
.cathome-featured-post a,
.cathome-second-post a {
  text-decoration: none;
  color: #000;
}
.cathome-featured-post a:hover,
.cathome-second-post a:hover {
  text-decoration: underline;
}
/* Responsive adjustments for category pages */
@media (max-width: 1100px) {
  .cathome-hero-image {
    width: 300px;
    height: 450px;
  }
  .cathome-side-by-side {
    gap: 2rem;
  }
}
@media (max-width: 768px) {
  .cathome-featured-wrapper {
    padding: 1rem;
  }
  .cathome-side-by-side {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cathome-hero-image {
    width: 250px;
    height: 375px;
  }
}
@media (max-width: 480px) {
  .cathome-hero-image {
    width: 200px;
    height: 300px;
  }
}
/* ========================
   MOBILE RESPONSIVE STYLES
=========================== */

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Mobile Navigation */
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: block;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 250;
    padding: 0.25rem;
    font-size: 1.75rem;
  }

  /* Mobile Hero Images */
  .float-left-hero {
    float: none;
    width: 200px;
    height: auto;
    margin: 1rem auto;
    display: block;
    object-fit: cover;
  }
  
  .hero-image-wrapper {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .content-container {
    padding: 1rem;
    margin-top: 0;
  }

  /* Mobile Breadcrumbs - CONSOLIDATED SECTION */
  .breadcrumb-strip {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    z-index: 25;
    position: relative;
    width: calc(100%-2rem);
    margin: 0;
    display: block;
  }

  .breadcrumb-container {
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
    position: relative;
    left: 0;
  }

  .breadcrumb-strip a {
    color: #031346;
    text-decoration: none;
    padding: 0.25rem 0;
    display: inline-block;
  }

  .breadcrumb-strip a:hover {
    text-decoration: underline;
  }

  .breadcrumb-separator {
    margin: 0 0.4rem;
    color: #666;
  }

  .breadcrumb-current {
    color: #666;
    font-weight: normal;
  }

  /* Mobile Headshot */
  .headshot-wrapper {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    padding-top: 0;
  }

  .headshot {
    width: 60px;
    height: 60px;
    display: block;
    border-radius: 50%;
  }

  .header-bar {
    position: relative;
    z-index: 10;
  }

  .site-header {
    position: relative;
    z-index: 10;
  }

  /* Mobile About Author */
  .about-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-text {
    margin-top: 1rem;
  }

  .author-social {
    justify-content: center;
  }

  /* Mobile Grid */
  .grid {
    grid-template-columns: 1fr;
  }

  /* Mobile About and Featured Section */
  .about-and-featured {
    flex-direction: column;
    align-items: center;
  }

  .about-section,
  .featured-post {
    max-width: 100%;
    width: 100%;
  }

  /* Mobile Featured Announcement */
  .featured-announcement {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .announcement-text {
    margin-top: 1rem;
  }
  /* Mobile Category Home Featured Section */
  .featured-section-wrapper {
    padding: 1rem;
  }
  .featured-section-wrapper .side-by-side {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .featured-section-wrapper .reverse-layout {
    flex-direction: column; /* Override reverse on mobile */
  }
  .featured-section-wrapper .side-by-side .text,
  .featured-section-wrapper .side-by-side .image {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* Very Small Screens */
  .float-left-hero {
    width: 180px;
    margin: 0.75rem auto;
  }

  .headshot {
    width: 50px;
    height: 50px;
  }
}