/* ==========================================================================
   Content Block Section Stylesheet
   Matches live Morae Next.js React component pixel-for-pixel across all screen sizes.
   Supports:
   - Clean standard bullet lists (matching Live Morae)
   - Themes: Light (#ffffff), Natural (#ede5de), Dark (#252525)
   ========================================================================== */

.morae-content-block-section {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-top: clamp(4rem, 6.67vw, 6rem) !important;
  padding-bottom: clamp(4rem, 6.67vw, 6rem) !important;
}

/* ==========================================================================
   Theme Variants: Light, Natural, Dark
   ========================================================================== */

/* 1. Light Theme */
.morae-content-block-section.morae-theme-light,
.morae-content-block-section.bg-purewhite {
  background-color: #ffffff !important;
  color: #252525 !important;
}

.morae-content-block-section.morae-theme-light .morae-content-block-title,
.morae-content-block-section.morae-theme-light h1,
.morae-content-block-section.morae-theme-light h2,
.morae-content-block-section.morae-theme-light h3,
.morae-content-block-section.morae-theme-light h4 {
  color: #252525 !important;
}

.morae-content-block-section.morae-theme-light p,
.morae-content-block-section.morae-theme-light li,
.morae-content-block-section.morae-theme-light .morae-content-block-content {
  color: #252525 !important;
}

/* 2. Natural Theme (Default: Offwhite/Beige background with almost black text) */
.morae-content-block-section.morae-theme-natural,
.morae-content-block-section.bg-offwhite {
  background-color: #ede5de !important;
  color: #101010 !important;
}

.morae-content-block-section.morae-theme-natural .morae-content-block-title,
.morae-content-block-section.morae-theme-natural h1,
.morae-content-block-section.morae-theme-natural h2,
.morae-content-block-section.morae-theme-natural h3,
.morae-content-block-section.morae-theme-natural h4 {
  color: #101010 !important;
}

.morae-content-block-section.morae-theme-natural p,
.morae-content-block-section.morae-theme-natural li,
.morae-content-block-section.morae-theme-natural .morae-content-block-content {
  color: #252525 !important;
}

/* 3. Dark Theme */
.morae-content-block-section.morae-theme-dark,
.morae-content-block-section.bg-darkgray {
  background-color: #252525 !important;
  color: #ffffff !important;
}

.morae-content-block-section.morae-theme-dark .morae-content-block-title,
.morae-content-block-section.morae-theme-dark h1,
.morae-content-block-section.morae-theme-dark h2,
.morae-content-block-section.morae-theme-dark h3,
.morae-content-block-section.morae-theme-dark h4 {
  color: #ffffff !important;
}

.morae-content-block-section.morae-theme-dark p,
.morae-content-block-section.morae-theme-dark li,
.morae-content-block-section.morae-theme-dark .morae-content-block-content {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* ==========================================================================
   Container & Inner Layout
   ========================================================================== */

.morae-content-block-container {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  width: 100%;
  max-width: 90rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--morae-side-padding, clamp(1rem, 2.78vw, 2.5rem));
  padding-right: var(--morae-side-padding, clamp(1rem, 2.78vw, 2.5rem));
}

.morae-content-block-inner {
  box-sizing: border-box;
  max-width: 58rem;
}

/* Topline / Subtitle */
.morae-content-block-topline p {
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: clamp(0.75rem, 0.85vw, 0.875rem);
  text-transform: uppercase;
  margin: 0;
}

/* Heading */
.morae-content-block-title,
.morae-content-block-header h2 {
  font-size: clamp(2rem, 1.7rem + 1.25vw, 2.5rem) !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  margin: 0 0 2rem 0 !important;
}

.morae-content-block-header h2 p {
  margin: 0;
  display: inline;
}

/* ==========================================================================
   Content & Reset for Migrated Markup
   ========================================================================== */

.morae-content-block-content {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.625;
}

.morae-content-block-content p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  line-height: 1.625;
}

.morae-content-block-content .et_pb_row,
.morae-content-block-content .et_pb_column,
.morae-content-block-content .et_pb_module,
.morae-content-block-content .et_pb_text,
.morae-content-block-content .et_pb_text_inner {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* ==========================================================================
   Bullet Lists Matching Live Morae Exactly (Image 2)
   - Resets any global .content-text ul li::before SVG icons
   - Restores standard disc bullets with clean spacing
   ========================================================================== */

.morae-content-block-section .morae-content-block-content ul,
.morae-content-block-section .content-text ul,
.morae-content-block-content ul {
  list-style: disc !important;
  list-style-type: disc !important;
  list-style-position: outside !important;
  padding-left: 1.5rem !important;
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
  display: block !important;
}

.morae-content-block-section .morae-content-block-content ul li,
.morae-content-block-section .content-text ul li,
.morae-content-block-content ul li {
  list-style: disc !important;
  list-style-type: disc !important;
  position: static !important;
  padding-left: 0.35rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.625 !important;
  color: inherit !important;
}

/* Kill the ::before SVG icon completely in content block */
.morae-content-block-section .morae-content-block-content ul li::before,
.morae-content-block-section .content-text ul li::before,
.morae-content-block-content ul li::before {
  content: none !important;
  display: none !important;
  background-image: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   Centered Images & Wide Layouts in Content Block Section
   ========================================================================== */

/* When content block has image or wide layout, center inner block and expand max-width */
.morae-content-block-section.morae-content-block-has-image .morae-content-block-inner,
.morae-content-block-section:has(img) .morae-content-block-inner,
.morae-content-block-section:has(.md\:flex) .morae-content-block-inner,
.morae-content-block-inner.morae-content-block-wide {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* All standalone images in content blocks:
   - Centered horizontally
   - Responsive (scales down to fit container on smaller viewports)
   - Respect set width attribute or natural width (never stretched to 100% or 1920px) */
.morae-content-block-section .morae-content-block-content img:not(.md\:flex img),
.morae-content-block-section .morae-content-block-content img.aligncenter,
.morae-content-block-section img:not(.md\:flex img) {
  max-width: 100%;
  height: auto !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}

/* Paragraphs / containers holding images should center their contents */
.morae-content-block-section .morae-content-block-content p:has(img),
.morae-content-block-section .morae-content-block-content p.aligncenter,
.morae-content-block-section .morae-content-block-content div.aligncenter {
  text-align: center !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
}

/* When multiple images are inside the same content block, add clean vertical spacing */
.morae-content-block-section .morae-content-block-content img + img {
  margin-top: clamp(2rem, 3.5vw, 3.5rem) !important;
}

/* ==========================================================================
   Side-by-Side Images & Multi-Column Layout (e.g. Chat.IQ Parser Outputs)
   Matches live Morae https://www.morae.com/chat-iq/
   ========================================================================== */

.morae-content-block-section:has(.md\:flex),
.morae-content-block-section.morae-content-block-has-flex {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.morae-content-block-content .md\:flex,
.morae-content-block-content section.md\:flex,
.morae-content-block-section .md\:flex {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 768px) {
  .morae-content-block-content .md\:flex,
  .morae-content-block-content section.md\:flex,
  .morae-content-block-section .md\:flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0 !important;
  }

  /* Column 1: HTML viewer (proportional wide column ~62% on live) */
  .morae-content-block-content .md\:flex > div:first-child,
  .morae-content-block-content .md\:flex > .md\:w-2\/5,
  .morae-content-block-section .md\:flex > div:first-child {
    flex: 0 0 62% !important;
    max-width: 62% !important;
    width: 62% !important;
    box-sizing: border-box !important;
  }

  /* Column 2: RelOne RSMF viewer (proportional column ~38% on live) */
  .morae-content-block-content .md\:flex > div:last-child,
  .morae-content-block-content .md\:flex > .md\:w-3\/5,
  .morae-content-block-section .md\:flex > div:last-child {
    flex: 0 0 38% !important;
    max-width: 38% !important;
    width: 38% !important;
    box-sizing: border-box !important;
  }
}

/* Background, typography, and padding inside side-by-side columns */
.morae-content-block-content .md\:flex > div {
  background-color: #ede5de !important;
  color: #252525 !important;
  box-sizing: border-box !important;
  padding: 2.5rem 1.5rem !important;
}

@media (min-width: 1024px) {
  .morae-content-block-content .md\:flex > div {
    padding: 5rem 2rem !important;
  }
}

/* Headings in side-by-side columns: identical top line alignment */
.morae-content-block-content .md\:flex p:first-child,
.morae-content-block-content .md\:flex p > strong:first-child {
  font-family: var(--morae-font, 'IBM Plex Sans', sans-serif) !important;
  font-size: clamp(1.25rem, 1.15vw + 0.5rem, 1.5rem) !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: #252525 !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  min-height: 3rem;
  display: block !important;
}

/* Images inside side-by-side columns: occupy full column width */
.morae-content-block-content .md\:flex img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 !important;
}

/* Natural background for section containing .bg-offwhite */
.morae-content-block-section:has(.bg-offwhite) {
  background-color: #ede5de !important;
}
