.cmspost-embed {
  --cmspost-columns: 3;
  --cmspost-gap: 24px;
  --cmspost-radius: 18px;
  --cmspost-text: #0f172a;
  --cmspost-muted: #64748b;
  --cmspost-border: rgba(15, 23, 42, .11);
  --cmspost-button: #111827;
  --cmspost-link: #5b21b6;
  box-sizing: border-box;
  width: 100%;
  color: inherit;
  font: inherit;
}

.cmspost-embed *,
.cmspost-embed *::before,
.cmspost-embed *::after {
  box-sizing: border-box;
}

.cmspost-grid {
  display: grid;
  grid-template-columns: repeat(var(--cmspost-columns), minmax(0, 1fr));
  gap: var(--cmspost-gap);
  align-items: stretch;
  width: 100%;
}

.cmspost-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cmspost-border);
  border-radius: var(--cmspost-radius);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cmspost-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, .18);
  box-shadow: 0 20px 42px rgba(15, 23, 42, .11);
}

.cmspost-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef2f7;
  text-decoration: none;
}

.cmspost-card-media-placeholder {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.cmspost-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.cmspost-card:hover .cmspost-card-image {
  transform: scale(1.025);
}

.cmspost-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.cmspost-card-title {
  margin: 0 0 12px;
  color: var(--cmspost-text);
  font-size: clamp(1.18rem, 1.5vw, 1.4rem);
  line-height: 1.28;
}

.cmspost-card-title a {
  color: inherit;
  text-decoration: none;
}

.cmspost-card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 20px;
  color: var(--cmspost-muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cmspost-read-more,
.cmspost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 11px 18px;
  border-radius: 9px;
  background: var(--cmspost-button);
  color: #fff !important;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s ease, opacity .18s ease;
}

.cmspost-read-more:hover,
.cmspost-btn:hover {
  transform: translateY(-1px);
  opacity: .92;
}

/* Universal single-page presentation */
.cmspost-view {
  width: 100%;
  color: var(--cmspost-text);
}

.cmspost-single-content {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 46px);
  color: var(--cmspost-text);
  font-size: clamp(1rem, .95rem + .15vw, 1.1rem);
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.cmspost-single-content > :first-child {
  margin-top: 0;
}

.cmspost-single-content > :last-child {
  margin-bottom: 0;
}

.cmspost-single-content h1,
.cmspost-single-content h2,
.cmspost-single-content h3,
.cmspost-single-content h4,
.cmspost-single-content h5,
.cmspost-single-content h6 {
  color: var(--cmspost-text);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.cmspost-single-content h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.65rem);
}

.cmspost-single-content h2 {
  margin: clamp(34px, 6vw, 58px) 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.cmspost-single-content h3 {
  margin: 32px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.cmspost-single-content p,
.cmspost-single-content ul,
.cmspost-single-content ol,
.cmspost-single-content blockquote,
.cmspost-single-content figure,
.cmspost-single-content pre,
.cmspost-single-content .cmspost-table-wrap {
  margin: 0 0 22px;
}

.cmspost-single-content ul,
.cmspost-single-content ol {
  padding-left: 1.35em;
}

.cmspost-single-content li + li {
  margin-top: 8px;
}

.cmspost-single-content a:not(.cmspost-btn) {
  color: var(--cmspost-link);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.cmspost-single-content img {
  display: block;
  max-width: 100% !important;
  width: auto;
  height: auto !important;
  margin: 28px auto;
  border-radius: 16px;
}

.cmspost-single-content figure img {
  margin-bottom: 10px;
}

.cmspost-single-content figcaption {
  color: var(--cmspost-muted);
  font-size: .9rem;
  text-align: center;
}

.cmspost-single-content blockquote {
  padding: 18px 22px;
  border-left: 4px solid var(--cmspost-link);
  border-radius: 0 12px 12px 0;
  background: #f8fafc;
  color: #334155;
}

.cmspost-single-content hr {
  margin: 38px 0;
  border: 0;
  border-top: 1px solid var(--cmspost-border);
}

.cmspost-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--cmspost-border);
  border-radius: 14px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.cmspost-single-content table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.cmspost-single-content th,
.cmspost-single-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cmspost-border);
  text-align: left;
  vertical-align: top;
}

.cmspost-single-content th {
  background: #f8fafc;
  color: var(--cmspost-text);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cmspost-single-content tr:last-child td {
  border-bottom: 0;
}

.cmspost-responsive-media,
.cmspost-single-content iframe,
.cmspost-single-content video,
.cmspost-single-content embed,
.cmspost-single-content object {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 360px;
  margin: 28px 0;
  border: 0;
  border-radius: 16px;
}

.cmspost-single-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
}

.cmspost-single-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cmspost-loading,
.cmspost-empty,
.cmspost-error {
  padding: 22px;
  border: 1px solid var(--cmspost-border);
  border-radius: 12px;
  background: #fff;
}

.cmspost-error {
  color: #991b1b;
  background: #fff1f2;
}

@media (max-width: 980px) {
  .cmspost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cmspost-grid {
    grid-template-columns: 1fr;
  }

  .cmspost-card-body {
    padding: 18px;
  }

  .cmspost-single-content {
    padding: 28px 16px;
  }

  .cmspost-responsive-media,
  .cmspost-single-content iframe,
  .cmspost-single-content video,
  .cmspost-single-content embed,
  .cmspost-single-content object {
    min-height: 220px;
  }
}

/* CMSPost Read More button encoding-safe arrow */
.cmspost-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cmspost-read-more::after {
    content: "\2192";
    font-family: Arial, sans-serif;
    line-height: 1;
}
