/* Front-end blog: article prose + small helpers used by post.php / category.php / archive.php */

/* line-clamp fallback (in case the Tailwind Play CDN build in use predates core line-clamp) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-prose {
  font-size: 17px;
  line-height: 1.85;
  color: #1c1f3a;
}
.article-prose > * + * { margin-top: 1.25em; }

.article-prose h2 {
  font-weight: 900;
  font-size: 1.5em;
  letter-spacing: 0.01em;
  color: #12153f;
  margin-top: 1.8em;
}
.article-prose h3 {
  font-weight: 800;
  font-size: 1.25em;
  color: #12153f;
  margin-top: 1.6em;
}
.article-prose h4 {
  font-weight: 800;
  font-size: 1.1em;
  color: #12153f;
}

.article-prose p { }

.article-prose a {
  color: #3357e0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-prose a:hover { color: #1c2b73; }

/* The posts-widget renders full post cards (image/title/excerpt wrapped in
   a single <a>); it must not inherit the generic prose underline above. */
.article-prose .posts-widget a,
.article-prose .posts-widget a:hover {
  color: inherit;
  text-decoration: none;
}

.article-prose strong, .article-prose b { font-weight: 800; color: #12153f; }

.article-prose ul, .article-prose ol {
  padding-left: 1.4em;
}
.article-prose ul { list-style: disc; }
.article-prose ol { list-style: decimal; }
.article-prose li + li { margin-top: 0.5em; }

.article-prose blockquote {
  border-left: 3px solid #3357e0;
  background: #f7f8fc;
  border-radius: 0 12px 12px 0;
  padding: 1.1em 1.4em;
  font-weight: 600;
  color: #12153f;
  font-style: italic;
}
.article-prose blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-size: 0.6em;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #12153f99;
}

.article-prose figure { margin: 0; }
.article-prose figure img {
  width: 100%;
  border-radius: 14px;
  display: block;
}
.article-prose figcaption {
  text-align: center;
  font-size: 0.55em;
  color: #12153f66;
  margin-top: 0.6em;
}

.article-prose mark {
  background: #4fb3ff33;
  padding: 0 0.15em;
  border-radius: 3px;
}

.article-delimiter {
  text-align: center;
  letter-spacing: 0.5em;
  color: #12153f33;
  font-weight: 700;
}

.article-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #0c0f33;
}
.article-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.article-embed-caption {
  text-align: center;
  font-size: 0.8em;
  color: #12153f66;
  margin-top: 0.5em !important;
}

/* Image gallery widget (Editor.js: gallery) */
.article-prose .sp-gallery {
  display: grid;
  gap: 0.75em;
  grid-template-columns: repeat(2, 1fr);
}
.article-prose .sp-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.article-prose .sp-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.article-prose .sp-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }

.article-prose .sp-gallery-item {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.article-prose .sp-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* YouTube video gallery widget (Editor.js: ytGallery) */
.article-prose .sp-yt-gallery {
  display: grid;
  gap: 0.9em;
}
.article-prose .sp-yt-gallery-grid2 { grid-template-columns: repeat(2, 1fr); }
.article-prose .sp-yt-gallery-grid3 { grid-template-columns: repeat(3, 1fr); }

.article-prose .sp-yt-gallery-grid2 .sp-yt-gallery-item,
.article-prose .sp-yt-gallery-grid3 .sp-yt-gallery-item { margin: 0; }

.article-prose .sp-yt-gallery-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.article-prose .sp-yt-gallery-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .article-prose .sp-gallery-cols-4,
  .article-prose .sp-gallery-cols-5 { grid-template-columns: repeat(2, 1fr); }
  .article-prose .sp-yt-gallery-grid2,
  .article-prose .sp-yt-gallery-grid3 { grid-template-columns: repeat(1, 1fr); }
}

/* PDF embed widget (Editor.js: pdfEmbed) */
.article-prose .sp-pdf-embed {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #12153f14;
  background: #f7f8fc;
}
.article-prose .sp-pdf-embed-frame {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 360px;
  max-height: 720px;
  background: #fff;
}
.article-prose .sp-pdf-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.article-prose .sp-pdf-embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
  padding: 0.6em 0.9em;
  font-size: 0.8em;
  border-top: 1px solid #12153f14;
}
.article-prose .sp-pdf-embed-name {
  color: #12153f99;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-prose .sp-pdf-embed-name i { color: #f97316; margin-right: 0.3em; }
.article-prose .sp-pdf-embed-bar a {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--cta, #3357e0);
  text-decoration: none;
}
.article-prose .sp-pdf-embed-bar a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .article-prose .sp-pdf-embed-frame { height: 60vh; min-height: 280px; }
}
