/* Modernized and Reorganized CSS */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&display=swap');

/* CSS Variables */
:root {
  --color-primary: #800020;
  --color-primary-dark: #660018;
  --color-primary-darker: #33000c;
  --color-text: #333;
  --color-background: #fff;
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Roboto Serif', serif;
}

/* Base styles */
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
}


/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-secondary);
  color: var(--color-primary);
  border-bottom-width: 0;
}

.quarto-categories {
    font-family: var(--font-primary);
}

.quarto-title-meta-heading {
    font-family: var(--font-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.25rem; }

h2 {margin-bottom: 0rem;}

.subtitle {
  font-size: 2rem;
  color: var(--color-primary);
  font-family: var(--font-secondary);
  font-weight: 500;
}

.crisis-title {
  font-variant: small-caps;
  font-weight: 500;
  font-family: var(--font-secondary);
}

.small-caps-title {
  font-variant: small-caps;
  font-weight: 500;
  font-family: var(--font-secondary);
}

.small-caps {
  font-variant: small-caps;
}

#title-block-header {
    margin-block-end: 3rem;
}

hr {
  border: none;
  height: 30px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><path fill="none" stroke="black" stroke-width="0.5" d="M0,5 C25,0 25,10 50,5 C75,0 75,10 100,5"/><path fill="black" d="M24,4 Q25,5 26,4 Q25,3 24,4 M49,4 Q50,5 51,4 Q50,3 49,4 M74,4 Q75,5 76,4 Q75,3 74,4"/></svg>');
  background-repeat: repeat-x;
  margin: 20px auto;
  width: 50%;
  position: relative;
}


.line-primary {
  border: none;
  height: 2px;
  background: var(--color-primary);
  margin: 20px 0;
}

#related-articles {
  margin-top: 4rem;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Navigation */
header {
  font-family: var(--font-secondary);
  font-weight: 500;
}

.navbar-title, .menu-text {
  color: var(--color-primary);
}

.nav-link {
  text-decoration: none;
}

nav a:hover {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary-darker);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.image-wrap img {
    width: 100%;
    height: auto;
    margin-bottom: 10px; /* Add some space below the image */
  }

p {
    margin-top: 0; /* Reduce top margin to allow closer wrapping */
    margin-bottom: 1rem; /* Keep some space between paragraphs */
}

/* Image alignment classes */
.left {
  float: left;
  width: 40%;
  margin-right: 1rem;
}
/* Table styles */
.table {
  border-collapse: collapse;
  width: auto; /* Set table width to auto for minimal width */
  margin-left: 2rem; /* Add left margin to the table */
}

.table td,
.table th {
  border: none;
  padding: 0.25rem 1rem; /* Reduced vertical padding */
}

.table tr {
  border-bottom: none;
  line-height: 1.4; /* Reduced line height for less whitespace */
}

/* Ensure table doesn't exceed container width */
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
  }

.right {
  float: right;
  width: 40%;
  margin-left: 1rem;
}


/* Responsive design */
@media (max-width: 600px) {
  .image-wrap, .left, .right {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* Specialized content styles */
.bibliography p {
  text-indent: -2em;
  padding-left: 2em;
  margin-bottom: 0.5em;
}

.epigraph {
  font-family: var(--font-secondary);
  font-style: italic;
  text-align: justify;
  margin: 20px 0;
  color: #555;
  padding: 0 4rem;
}

.column-margin {
  font-family: var(--font-secondary);
}

blockquote {
  font-family: var(--font-secondary);
  border-left: none;
  margin-bottom: 0;
  padding-top: 0rem;
  position: relative;
  padding-left: 3em;  /* Reduced left padding */
  padding-right: 2em; /* Reduced right padding */
  margin-left: 2em;   /* Added left margin to create space for the quotation mark */
}

blockquote::before,
blockquote::after {
  font-family: var(--font-secondary);
  font-size: 6em;
  color: var(--color-primary);
  position: absolute;
  line-height: 1;
  opacity: 0.5;
}

blockquote::before {
  font-family: var(--font-secondary);
  font-size: 6em;
  color: var(--color-primary);
  position: absolute;
  line-height: 1;
  opacity: 0.5;
  content: "\201C";
  left: -0.35em;  /* Adjusted to align with main text */
  top: -0.1em;
}
/*
blockquote::after {
  content: "\201D";
  right: -0.05em;
  bottom: -0.45em;
}
*/

blockquote p {
  padding-right: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
  text-indent: 0;
}

/* Add this new rule to ensure all paragraphs in blockquotes have consistent styling */
blockquote p:first-of-type {
  font-size: 1rem;
  line-height: 1.6;
  text-indent: 0;
}

blockquote br + span {
  display: inline-block;
  text-indent: 2em;
}

.poem {
  font-family: var(--font-secondary);
  font-size: .95rem;
  border-left: none;
  padding-left: 2em;
  margin-bottom: 1.5rem;
}

.verse {
  margin-bottom: 0;
  padding-left: 2em;
  text-indent: -2em;
}

/* Indentation classes */
.indent { padding-left: 3em; text-indent: -2em; }
.big-indent { padding-left: 4em; text-indent: -2em; }
.bigger-indent { padding-left: 5em; text-indent: -2em; }
.biggest-indent { padding-left: 6em; text-indent: -2em; }

/* Utility classes */
.nowrap { white-space: nowrap; }

/* Draft watermark (if needed) */
.draft-watermark {
  position: relative;
}

.draft-watermark::before,
.draft-watermark::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.draft-watermark::before {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 20px
  );
}

.draft-watermark::after {
  content: 'Draft!';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 20vw;
  color: rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.list-no-markers {
    list-style-type: none;
  }
  
.clear-wrap {
    clear: both; /* or clear: left/right; depending on your layout */
}

/* Override the bootstrap styles */
figure {
    display: inline-block; /* Allow text wrapping */
    margin-block-end: 1rem;
  }

  figcaption {
    font-family: var(--font-secondary);
    font-size: .8rem;
    padding-left: .5rem;
    padding-right: .5rem;
    text-align: center;
  }
  
/* Caption and Figure Styles */
.column-figure {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .figure-img {
    max-width: 100%;
    height: auto;
    padding-top: .5rem;
  }
  
  .chicago-figure-caption {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
  }
  
  .caption-list {
    display: grid;
    gap: 5px 10px;
  }
  
  .caption-three-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  
  .caption-four-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px 10px;
  }
  
  .caption-column-item {
    display: flex;
    padding-left: 5px;
  }
  
  .caption-item {
    display: flex;
  }
  
  .caption-number {
    min-width: 20px;
    text-align: right;
    margin-right: 5px;
  }
  
  #quarto-appendix.default {
    background-color: var(--color-background);
    padding-top: 0; 
    margin-top: 0;
}

#quarto-appendix.default * [role=doc-endnotes] > ol, #quarto-appendix.default .quarto-appendix-contents > * :not(h2):not(.h2) {
  font-size: var(--bs-body-font-size);
  font-family: var(--font-secondary);

}


  .quarto-appendix-secondary-label {
    display: none;
  }
  #quarto-appendix.default .quarto-appendix-citeas {
    border: none;
    padding-left: 1rem;
    padding-top: 0;
}

#quarto-appendix.default .quarto-appendix-heading {
  font-size: 1.25rem !important
}

#quarto-appendix.default {
    border-top: none;
}

/* For text flush left and amount flush right*/
.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
}
.item {
  display: flex;
  justify-content: space-between;
}
.description {
  text-align: left;
}
.amount {
  text-align: right;
}

.dots {
  flex-grow: 1;
  border-bottom: 1px dotted black;
  margin: 0 5px; /* Increase the margin to add more space between the dots and the text */
  line-height: 0; /* This reduces the space between the dots and raises them up a bit */
  transform: translateY(-8px); /* Fine-tune the vertical positioning */
}



/*Two columns usined in 12/4/two-letters */

.columns-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;

}
.column {
  padding: none;
  max-width: 100%;
  border: 0;
  padding: 0;
}

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


  /* Responsive adjustments for caption lists */
  @media (max-width: 768px) {
    .caption-three-list,
    .caption-four-list {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 480px) {
    .caption-three-list,
    .caption-four-list {
      grid-template-columns: 1fr;
    }
  }