/* v54.0 — Embeds sociais (Instagram, TikTok, Facebook, X), vídeos externos e widgets HTML livres */
.jc-rich-embed,
.jc-video-lead {
  margin: 26px auto;
  max-width: 100%;
  clear: both;
}

.jc-rich-embed__frame {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1629;
  border: 1px solid var(--jc-border, #e2eaf5);
  box-shadow: 0 12px 30px rgba(10, 31, 68, 0.08);
}

.jc-rich-embed[data-aspect="wide"] .jc-rich-embed__frame,
.jc-video-lead .jc-rich-embed[data-aspect="wide"] .jc-rich-embed__frame {
  aspect-ratio: 16 / 9;
}

.jc-rich-embed[data-aspect="wide"] .jc-rich-embed__frame iframe,
.jc-video-lead iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Vídeos verticais (Instagram Reels, TikTok, YouTube Shorts, Facebook Reels) */
.jc-rich-embed[data-aspect="vertical"] {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.jc-rich-embed[data-aspect="vertical"] .jc-rich-embed__frame {
  aspect-ratio: 9 / 16;
  min-height: 580px;
  background: #ffffff;
}

.jc-rich-embed--tiktok[data-aspect="vertical"] .jc-rich-embed__frame,
.jc-rich-embed--youtube[data-aspect="vertical"] .jc-rich-embed__frame {
  background: #0b1629;
}

.jc-rich-embed[data-aspect="vertical"] .jc-rich-embed__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Post quadrado / carrossel do Instagram */
.jc-rich-embed--instagram[data-aspect="card"] {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.jc-rich-embed--instagram[data-aspect="card"] .jc-rich-embed__frame {
  background: #ffffff;
  min-height: 620px;
}

.jc-rich-embed--instagram[data-aspect="card"] .jc-rich-embed__frame iframe {
  width: 100%;
  min-height: 620px;
  border: 0;
  display: block;
}

/* Vídeo externo direto (.mp4 / .webm / .m3u8) */
.jc-rich-embed--video video.jc-external-video,
.jc-video-lead video {
  display: block;
  width: 100%;
  max-height: 76vh;
  border-radius: 18px;
  background: #071224;
  border: 1px solid var(--jc-border, #e2eaf5);
  box-shadow: 0 12px 30px rgba(10, 31, 68, 0.08);
}

.jc-rich-embed--audio {
  padding: 16px 18px;
  border-radius: 16px;
  background: #f5f9ff;
  border: 1px solid #d7e5fa;
}

.jc-rich-embed--audio audio {
  width: 100%;
  display: block;
}

.jc-rich-embed__caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--jc-muted, #5d6b82);
  text-align: center;
}

.jc-rich-embed__caption a {
  color: var(--jc-blue, #0d5cc7);
  font-weight: 700;
  text-decoration: none;
}

.jc-rich-embed__caption a:hover {
  text-decoration: underline;
}

/* Blocos HTML livres, embeds nativos de blockquote (Instagram/Twitter/TikTok) e tabelas/mapas */
.jc-rich-embed--custom-html,
.jc-rich-embed--twitter {
  max-width: 100%;
  overflow-x: auto;
}

.jc-rich-embed--custom-html > iframe,
.jc-article-content > iframe {
  max-width: 100%;
  border-radius: 16px;
  border: 0;
}

.jc-rich-embed--custom-html .instagram-media,
.jc-article-content blockquote.instagram-media {
  margin: 22px auto !important;
  background: #fff !important;
  border: 1px solid #e2eaf5 !important;
  border-radius: 16px !important;
  padding: 0 !important;
  max-width: 540px !important;
  width: 100% !important;
}

.jc-rich-embed--twitter .twitter-tweet,
.jc-article-content blockquote.twitter-tweet {
  margin: 22px auto !important;
}

/* Dark mode */
html.jc-dark .jc-rich-embed__frame,
body.jc-dark .jc-rich-embed__frame {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

html.jc-dark .jc-rich-embed--audio,
body.jc-dark .jc-rich-embed--audio {
  background: #111c33;
  border-color: rgba(148, 163, 184, 0.22);
}

html.jc-dark .jc-rich-embed__caption,
body.jc-dark .jc-rich-embed__caption {
  color: #94a3b8;
}

html.jc-dark .jc-rich-embed__caption a,
body.jc-dark .jc-rich-embed__caption a {
  color: #60a5fa;
}

@media (max-width: 640px) {
  .jc-rich-embed[data-aspect="vertical"] {
    max-width: 100%;
  }
  .jc-rich-embed[data-aspect="vertical"] .jc-rich-embed__frame {
    min-height: 500px;
  }
  .jc-rich-embed--instagram[data-aspect="card"] .jc-rich-embed__frame,
  .jc-rich-embed--instagram[data-aspect="card"] .jc-rich-embed__frame iframe {
    min-height: 520px;
  }
}
