.textModular3 {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 5rem 2rem;
}

/* Background variants */
.textModular3[data-bg="light"] {
  background-color: #f8f9fc;
}
.textModular3[data-bg="dark"] {
  background-color: #05083f;
}
.textModular3[data-bg="dark"] .textModular3__content {
  color: #c8ccde;
}
.textModular3[data-bg="dark"] .textModular3__quote {
  background-color: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(255, 255, 255, 0.35);
}
.textModular3[data-bg="dark"] .textModular3__quote--breakout {
  border-top-color: rgba(255, 255, 255, 0.35);
}
.textModular3[data-bg="dark"] .textModular3__quoteGlyph {
  color: rgba(255, 255, 255, 0.3);
}
.textModular3[data-bg="dark"] .textModular3__quoteText {
  color: #edf0fa;
}
.textModular3[data-bg="dark"] .textModular3__quoteAuthor {
  color: rgba(255, 255, 255, 0.6);
}
.textModular3[data-bg="accent"] {
  background-color: #0047ff;
}
.textModular3[data-bg="accent"] .textModular3__content,
.textModular3[data-bg="accent"] .textModular3__quoteText {
  color: #fff;
}
.textModular3[data-bg="accent"] .textModular3__quoteGlyph {
  color: rgba(255, 255, 255, 0.3);
}
.textModular3[data-bg="accent"] .textModular3__quoteAuthor {
  color: rgba(255, 255, 255, 0.7);
}
.textModular3[data-bg="accent"] .textModular3__quote {
  background-color: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.5);
}

.textModular3__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 81.25rem;
  gap: 2.5rem;
}

/* Side-by-side layout (left / right position) */
.textModular3__layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.textModular3[data-quote-pos="right"] .textModular3__layout {
  grid-template-columns: 1.6fr 1fr;
}

/* Body text */
.textModular3__content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #565a66;
  margin: 0;
}

.textModular3__content--breakout {
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}

/* Quote block */
.textModular3__quote {
  position: relative;
  margin: 0;
  padding: 2rem 2rem 2rem 2.5rem;
  background-color: #f0f3ff;
  border-left: 4px solid #0047ff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.textModular3__quote--breakout {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  border-left: none;
  border-top: 4px solid #0047ff;
  padding: 2rem 3rem;
}

.textModular3__quoteGlyph {
  font-size: 4rem;
  line-height: 1;
  color: #0047ff;
  opacity: 0.25;
  font-family: Georgia, serif;
  display: block;
  margin-bottom: -1rem;
}

.textModular3__quote--breakout .textModular3__quoteGlyph {
  text-align: center;
}

.textModular3__quoteText {
  font-size: 1.25rem;
  line-height: 1.65;
  font-style: italic;
  color: #05083f;
  margin: 0;
  font-weight: 500;
}

.textModular3__quoteAuthor {
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  color: #9399aa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@container (width < 56rem) {
  .textModular3 {
    padding: 3.5rem 1.5rem;
  }

  .textModular3__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* On mobile, quote always appears above the text */
  .textModular3[data-quote-pos="right"] .textModular3__layout {
    grid-template-columns: 1fr;
  }

  .textModular3[data-quote-pos="right"] .textModular3__content {
    order: 2;
  }

  .textModular3[data-quote-pos="right"] .textModular3__quote {
    order: 1;
  }
}

@container (width < 37rem) {
  .textModular3 {
    padding: 2.5rem 1.25rem;
  }

  .textModular3__quoteText {
    font-size: 1.125rem;
  }

  .textModular3__quote--breakout {
    padding: 1.5rem;
  }
}
