.rich-text {
  width: 100%;
}

.rich-text-container {
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  word-break: break-word;
}

/* ================= TEXT ================= */

.rich-text-container p {
  margin-bottom: 18px;
}

.rich-text-container h2 {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin: 42px 0 14px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

.rich-text-container h3 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 28px 0 10px;
}

.rich-text-container h2:first-child {
  margin-top: 0;
}

.rich-text-container strong {
  color: #111;
  font-weight: 700;
}

.rich-text-container em {
  font-style: italic;
  color: #333;
}

/* ================= LINKS ================= */

.rich-text-container a {
  color: #0a66c2;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 102, 194, 0.3);
  transition: all 0.2s ease;
}

.rich-text-container a:hover {
  color: #084c96;
  border-color: currentColor;
}

/* ================= LISTS ================= */

.rich-text-container ul,
.rich-text-container ol {
  margin: 18px 0 18px 22px;
  padding: 0;
}

.rich-text-container li {
  margin-bottom: 8px;
}

/* ================= IMAGES ================= */

.rich-text-container img {
  max-width: 50%;
  height: auto;
  border-radius: 14px;
  margin: 26px auto;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Optional image caption support */
.rich-text-container figure {
  margin: 30px 0;
  text-align: center;
}

.rich-text-container figcaption {
  font-size: 14px;
  color: #777;
  margin-top: 8px;
}

/* ================= VIDEOS / IFRAMES ================= */


.rich-text-container iframe,
.rich-text-container video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  margin: 30px 0;
  aspect-ratio: 16 / 9;
}

/* ================= TABLES ================= */

.rich-text-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 15px;
  border-radius: 12px;
  overflow: hidden;
}

.rich-text-container th,
.rich-text-container td {
  border: 1px solid #eaeaea;
  padding: 12px 14px;
  text-align: left;
}

.rich-text-container th {
  background: #f7f7f7;
  font-weight: 700;
  color: #111;
}

.rich-text-container tr:nth-child(even) {
  background: #fafafa;
}

/* Make tables scrollable on mobile */
.rich-text-container table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* ================= BLOCKQUOTE ================= */

.rich-text-container blockquote {
  border-left: 4px solid #0a66c2;
  padding: 14px 18px;
  margin: 26px 0;
  background: #f5f9ff;
  border-radius: 8px;
  color: #1a3d6d;
  font-style: italic;
}

/* ================= HR ================= */

.rich-text-container hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 40px 0;
}

/* ================= RTL ================= */

:dir(rtl) .rich-text-container {
  text-align: right;
}

:dir(rtl) .rich-text-container blockquote {
  border-left: none;
  border-right: 4px solid #0a66c2;
}
