/* Typography Styles for Rich Text Content from TinyMCE */

.typography {
  color: #525252;
  line-height: 1.75;
}

/* Headings */
.typography h1 {
  font-size: 2.25rem;
  line-height: 2.75rem;
  font-weight: 700;
  color: #0a0a0a;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
}

.typography h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
}

.typography h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

.typography h4 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

.typography h5 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

.typography h6 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

/* Paragraphs */
.typography p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: #525252;
  font-size: 1.25rem;
  line-height: 2.25rem;
}

.typography p:first-child {
  margin-top: 0;
}

.typography p:last-child {
  margin-bottom: 0;
}

/* Links */
.typography a {
  color: #0a0a0a;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.typography a:hover {
  color: #404040;
}

/* Strong and Bold */
.typography strong,
.typography b {
  font-weight: 600;
  color: #0a0a0a;
}

/* Emphasis and Italic */
.typography em,
.typography i {
  font-style: italic;
}

/* Lists */
.typography ul {
  list-style-type: disc;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.625rem;
}

.typography ol {
  list-style-type: decimal;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.625rem;
}

.typography li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0.375rem;
  color: #525252;
}

.typography li::marker {
  color: #737373;
}

.typography ul ul,
.typography ul ol,
.typography ol ul,
.typography ol ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Nested lists */
.typography ul > li > ul {
  list-style-type: circle;
}

.typography ul > li > ul > li > ul {
  list-style-type: square;
}

/* Blockquotes */
.typography blockquote {
  font-style: italic;
  border-left: 4px solid #e5e5e5;
  padding-left: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  color: #525252;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.typography blockquote p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Code */
.typography code {
  background-color: #f5f5f5;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0a0a0a;
}

.typography pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.typography pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

/* Horizontal Rule */
.typography hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Tables */
.typography table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.typography thead {
  border-bottom: 2px solid #e5e5e5;
}

.typography thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #0a0a0a;
}

.typography tbody tr {
  border-bottom: 1px solid #f5f5f5;
}

.typography tbody td {
  padding: 0.75rem 1rem;
  color: #525252;
}

.typography tbody tr:hover {
  background-color: #fafafa;
}

/* Images */
.typography img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.typography figure {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.typography figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: #737373;
  text-align: center;
}

/* Video */
.typography video {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Mark/Highlight */
.typography mark {
  background-color: #fef3c7;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
}

/* Subscript and Superscript */
.typography sub,
.typography sup {
  font-size: 0.75rem;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.typography sup {
  top: -0.5em;
}

.typography sub {
  bottom: -0.25em;
}

/* Definition Lists */
.typography dl {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.typography dt {
  font-weight: 600;
  color: #0a0a0a;
  margin-top: 1rem;
}

.typography dd {
  margin-top: 0.5rem;
  margin-left: 1.625rem;
  color: #525252;
}

/* Abbreviations */
.typography abbr {
  text-decoration: underline dotted;
  cursor: help;
}

/* Keyboard */
.typography kbd {
  background-color: #f5f5f5;
  border: 1px solid #d4d4d4;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* First element margin reset */
.typography > :first-child {
  margin-top: 0;
}

/* Last element margin reset */
.typography > :last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .typography h1 {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }

  .typography h2 {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .typography h3 {
    font-size: 1.125rem;
    line-height: 1.5rem;
  }

  .typography blockquote {
    padding-left: 1rem;
    font-size: 1rem;
  }
}
