/* Global body styling for page margins */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4; /* Just for visual contrast */
  font-size: 18px; 
  line-height: 1.6; /* Good line spacing improves readability */
  /* The key for page margins */
  max-width: 780px; /* Set a maximum width for your content */
  margin: 20px auto; /* 20px top/bottom margin, 'auto' for left/right to center the block */
  padding: 0 20px; /* Optional: inner padding, especially for smaller screens to prevent content from touching edges */
  padding-bottom: 80px; /* Added space for the fixed footer */
  padding-top: 60px; /* enough to clear the header height */
  box-sizing: border-box; /* Ensures padding is included in the max-width calculation */
}
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
}
@media (max-width: 480px) {
  body {
    font-size: 16.5px;
    line-height: 1.6;
    padding: 0 16px;
  }
}

h1 {
  color: #0060c3;
  text-align: center;
  margin-bottom: 30px;
}
h2 {
  color: #0060c3;
  text-align: center;
  margin-bottom: 20px;
}
h3 {
  color: #0060c3;
  text-align: center;
  margin-bottom: 30px;
}
p {
  line-height: 1.3;
}

ul li {
  line-height: 1.3; /* This sets the line height *within* each list item to "1 line" */
  margin-bottom: 1.3em; /* This creates "2 lines" of space *between* each list item */
}

ol li {
  line-height: 1.3; /* This sets the line height *within* each list item to "1 line" */
  margin-bottom: 1.3em; /* This creates "2 lines" of space *between* each list item */
}

/* --- Small Caps Styling --- */
.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.05em; 
}
.separator {
  border: none;
  height: 5px;
  width: 90%;
  background-color: #0060c3;
  margin: 40px auto; /* adds spacing and centers it */
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #0060c3;
  color: white;
  padding: 10px 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-inner a {
  color: #fff;
  text-decoration: none;
}

.site-title {
  font-size: 1.2em;
  font-weight: bold;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
  padding: 10px 0;
  z-index: 999;
}

.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.footer-inner a {
  color: #333;
  text-decoration: none;
  margin: 0 20px;
}

p.intro-paragraph::first-letter {
    font-size: 3.5em;
    float: left;
    line-height: .1; /* Adjust for vertical positioning */
    vertical-align: top; /* Align to the top */
    padding-right: 5px;
    font-family: serif;
    color: #0060c3; /* Example: make the first letter blue */
    padding-right: 0px;
  }
p.intro-paragraph {
    font-size: inherit
    font-family: inherit;
  }

blockquote {
  margin: 1.5em 3em;
  padding: 1em 1.5em;
  background-color: #f9f9f9;
  border-left: 4px solid #0060c3;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 0.98em;
  color: #333;
  line-height: 1.6;
}
blockquote p {
  color: inherit;         /* match blockquote text color */
  font-family: inherit;   /* match blockquote font */
  font-size: inherit;     /* match blockquote size */
  line-height: inherit;   /* match blockquote spacing */
  margin: 0.6em 0;        /* optional: tighter spacing for quotes */
}
blockquote blockquote {
  border-left: none;
  background: none;
  margin: 1em 2em;
  padding: 0;
  font-size: 0.95em;
  font-style: normal;
}

sup {
  font-size: 0.7em;            /* slightly smaller, matches Arial metrics */
  position: relative;
  top: -0.4em;                 /* lift it up visually */
  line-height: 0;              /* prevents the line from expanding */
  vertical-align: baseline;    /* override the browser’s default “super” shift */
}

/* These styles are for the index page */

.book-header {
  background: linear-gradient(135deg, #0060c3 0%, #003d82 100%);
  color: white;
  padding: 40px 30px;
  margin: -20px -20px 40px -20px;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.book-header h1 {
  color: white;
  font-size: 2.2em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.book-header h2 {
  color: #e0e0e0;
  font-size: 1.4em;
  font-weight: normal;
  margin-bottom: 0;
  font-style: italic;
}

/* Table of Contents Container */
.toc-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.toc-container h3 {
  color: #0060c3;
  font-size: 1.6em;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #0060c3;
  text-align: left;
}

/* Chapter List Styling */
.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-list li {
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

.chapter-list li:last-child {
  border-bottom: none;
}

.chapter-list li:hover {
  background-color: #f8f9fa;
}

.chapter-list a {
  display: block;
  padding: 18px 20px;
  color: #333;
  text-decoration: none;
  font-size: 1.1em;
  line-height: 1.5;
  position: relative;
  padding-left: 50px;
  transition: all 0.2s ease;
}

.chapter-list a:hover {
  color: #0060c3;
  padding-left: 55px;
  background-color: #f0f7ff;
}

/* Chapter numbering */
.chapter-list a::before {
  content: attr(data-chapter);
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #0060c3;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: bold;
}

.chapter-list a:hover::before {
  background: #003d82;
  transform: translateY(-50%) scale(1.1);
}

/* Arrow indicator */
.chapter-list a::after {
  content: "\2192";  /* Unicode for right arrow */
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #0060c3;
  font-size: 1.3em;
  opacity: 0;
  transition: opacity 0.2s ease, right 0.2s ease;
}

.chapter-list a:hover::after {
  opacity: 1;
  right: 15px;
}

/* Copyright footer */
.copyright {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Mobile responsiveness */
@media screen and (max-width: 600px) {
  .book-header {
    padding: 30px 20px;
  }
  
  .book-header h1 {
    font-size: 1.6em;
  }
  
  .book-header h2 {
    font-size: 1.1em;
  }
  
  .toc-container {
    padding: 20px;
  }
  
  .chapter-list a {
    font-size: 1em;
    padding: 15px 15px 15px 45px;
  }
  
  .chapter-list a::before {
    width: 24px;
    height: 24px;
    font-size: 0.75em;
    left: 10px;
  }
}

/* === End Notes Section Styling === */
#notes {
  background: #f9fafb; /* soft background to set it apart */
  border-top: 2px solid #ccc;
  padding: 2rem 2rem;
  margin-top: 3rem;
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
  color: #222;
  box-shadow: 0 0 15px rgba(0,0,0,0.05); 
  border-radius: 8px;
  font-size: 0.9em;

}

/* Heading */
#notes h3 {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.3em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #aaa;
  padding-bottom: 0.5rem;
}

/* Ordered list layout */
#notes ol {
  counter-reset: note-counter;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Individual notes */
#notes li {
  counter-increment: note-counter;
  margin: 0 0 1rem 0;
  padding-left: 2.6rem;
  position: relative;
  font-size: 0.95em;
  text-indent: -1.5rem; padding-left: 3rem;
}

/* Custom note number */
#notes li::before {
  content: counter(note-counter) ".";
  position: absolute;
  left: 0.4rem;
  top: 0;
  font-weight: bold;
  color: #2b6cb0; /* subtle blue accent */
  font-family: "Merriweather", serif;
}

/* Emphasized text */
#notes em {
  font-style: italic;
  color: #1a202c;
}

/* Citations */
#notes cite {
  font-style: italic !important;
  font-weight: normal !important;
  color: #444;
}

/* Links inside notes */
#notes a {
  color: #2b6cb0;
  text-decoration: none;
}

#notes a:hover {
  text-decoration: underline;
}


@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;   /* deep charcoal */
    color: #e0e0e0;              /* soft off-white text */
  }

  header {
    background-color: #003d82;
    color: #fff;
  }

  footer {
    background-color: #1c1c1c;
    border-top: 1px solid #333;
  }

  .footer-inner a {
    color: #e0e0e0; /* Light color for dark mode icons */
  }

  .toc-container {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
  }

  .chapter-list a {
    color: #ddd;
  }

  .chapter-list a:hover {
    background-color: #003d82;
    color: #fff;
  }

  .separator {
    background-color: #0060c3;
  }

  blockquote {
    background-color: #1e1e1e;
    border-left: 4px solid #5090ea;
    color: #ddd;
  }

  #notes {
    background-color: #181818;
    border-top: 2px solid #333;
    color: #ccc;
  }

  #notes li::before {
    color: #66aaff;
  }
}

/* --- TABLES --- */
table {
  width: 100%;
  margin: 40px auto; /* Centers the table and adds vertical spacing */
  border-collapse: collapse; /* Removes space between borders for a clean look */
  text-align: left;
  font-size: 0.95em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Subtle lift */
  border-radius: 8px; /* Slight rounding for a modern feel */
  overflow: hidden; /* Ensures borders/shadows apply to content */
}

th {
  /* Subtle Gradient Effect */
  background-image: linear-gradient(to bottom, #0060c3, #004d9c); 
  color: white;
  padding: 16px 20px;
  font-weight: 600; /* Semi-Bold */
  font-size: 1.05em;
  letter-spacing: 0.8px;
  text-transform: capitalize; /* Title case is often cleaner than full uppercase */
  /* Strong Visual Separator */
  border: none;
  border-bottom: 4px solid #002244; /* Thick, dark border to cut off the header */
  cursor: default; 
}
td {
  padding: 15px 20px;
  border: 1px solid #ddd; /* Light separator line */
  line-height: 1.4;
}

/* Dark Mode Adjustments for Tables */
@media (prefers-color-scheme: dark) {
  table {
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
  }
th {
    background-image: linear-gradient(to bottom, #003d82, #003366);
    color: #fff;
    border-bottom: 4px solid #0a568c;
  }
  td {
    border: 1px solid #333; /* Darker separator line */
    background-color: #1e1e1e; /* Match container background */
    color: #ddd;
  }
}

table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}
table tbody tr:hover {
  background-color: #f0f7ff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Dark Mode Adjustment */
@media (prefers-color-scheme: dark) {
  table tbody tr:nth-child(odd) {
    background-color: #242424;
  }
  table tbody tr:hover {
    background-color: #003d82;
  }
  /* Necessary to ensure the background color isn't inherited from the td */
  table td {
    background-color: transparent;
  }
}

.image-with-caption .book-image-link {
    float: left;
    margin-right: 15px; 
}

.image-with-caption {
    overflow: auto; 
    /* display: flow-root; */
}

.author-info-box {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-left: 5px solid #2c3e50;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  max-width: 900px;
  overflow: hidden;
}

/* Author Section */
.author-section {
  border-bottom: 2px solid rgba(44, 62, 80, 0.1);
}

.author-section-header {
  background: #2c3e50;
  color: white;
  padding: 0.75rem 1.5rem;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.author-section-content {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: flex-start;
}

.author-photo {
  width: 150px;
  height: auto;
  border-radius: 8px;
  border: 3px solid #2c3e50;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.author-bio {
  flex: 1;
}

.author-bio h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 700;
}

.author-dates {
  color: #555;
  font-style: italic;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
}

.author-bio p {
  line-height: 1.6;
  color: #333;
  margin-bottom: 1rem;
}

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

.author-link a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.author-link a:hover {
  color: #3498db;
}

/* Resources Section */
.resources-section-header {
  background: #34495e;
  color: white;
  padding: 0.75rem 1.5rem;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.resources-list {
  padding: 1rem 1.5rem 1.5rem;
}

.resource-item {
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.resource-item:last-child {
  margin-bottom: 0;
}

.resource-link {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.resource-link:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #3498db;
}

.resource-link i {
  font-size: 1.5rem;
  color: #3498db;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.resource-content {
  flex: 1;
}

.resource-content strong {
  display: block;
  color: #2c3e50;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.resource-description {
  display: block;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.resource-description em {
  font-style: italic;
  color: #e74c3c;
  font-weight: 600;
}

/* Reviews Section */
.reviews-section-header {
  background: #34495e;
  color: white;
  padding: 0.75rem 1.5rem;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.reviews-list {
  padding: 1.5rem;
}

.review-item {
  background: white;
  border-left: 4px solid #e74c3c;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-source {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.review-subtitle {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin: -0.25rem 0 0.5rem 0;
}

.review-text {
  color: #333;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.review-text em {
  font-style: italic;
  color: #2c3e50;
}

.review-meta {
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
  margin: 0;
}

/* Responsive design */
@media (max-width: 600px) {
  .author-section-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .author-photo {
    width: 120px;
  }
  
  .resource-link {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .resource-link i {
    margin-top: 0;
  }
}
.breadcrumb-nav {
    font-size: 0.9rem;
    color: gray;
    margin: 0rem 0rem 1.25rem 0rem;
}

.breadcrumb-nav a {
    color: gray;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
    color: #333; /* Darkens the text for better feedback */
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    user-select: none; /* Prevents users from accidentally highlighting the arrows */
}

.breadcrumb-current {
    font-weight: 500;
    color: #444;
}