/* ===== Single Blog Post ===== */
#ce-sglblg-sec {
  background: var(--primary-color);
}

/* Category pill above the title. */
.ce-sglblg-cat {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 200px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: var(--theme-color-3);
  text-decoration: none;
  transition: background 0.2s ease;
}

.ce-sglblg-cat:hover {
  background: var(--theme-color-2);
  color: var(--primary-color);
}

.ce-sglblg-title {
  color: var(--theme-color-2);
  font-size: clamp(1.6rem, 3vw + 0.5rem, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

/* Post meta (date / author) — spans come from the template tags. */
.ce-sglblg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  color: #8a94a6;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.ce-sglblg-meta a {
  color: var(--theme-color-2);
  text-decoration: none;
}

.ce-sglblg-meta a:hover {
  color: var(--theme-color-3);
}

.ce-sglblg-excerpt {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* Hero thumbnail: fixed aspect, cover-cropped so tall/wide images never break out. */
.ce-sglblg-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--theme-color-9);
  box-shadow: 0 10px 28px rgba(22, 60, 102, 0.12);
}

.ce-sglblg-thumb-img,
.ce-sglblg-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Post content typography ===== */
.ce-sglblg-content {
  color: #374151;
  font-size: 1rem;
  line-height: 1.8;
}

.ce-sglblg-content > *:first-child {
  margin-top: 0;
}

.ce-sglblg-content p {
  margin-bottom: 1.25rem;
}

.ce-sglblg-content h2,
.ce-sglblg-content h3,
.ce-sglblg-content h4 {
  color: var(--theme-color-2);
  font-weight: 700;
  line-height: 1.3;
  margin: 2rem 0 0.9rem;
}

.ce-sglblg-content h2 {
  font-size: 1.6rem;
}

.ce-sglblg-content h3 {
  font-size: 1.3rem;
}

.ce-sglblg-content a {
  color: var(--theme-color-5);
  text-decoration: underline;
}

.ce-sglblg-content a:hover {
  color: var(--theme-color-3);
}

.ce-sglblg-content ul,
.ce-sglblg-content ol {
  margin: 0 0 1.25rem 1.25rem;
  padding-left: 0.75rem;
}

.ce-sglblg-content li {
  margin-bottom: 0.5rem;
}

.ce-sglblg-content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--theme-color-3);
  background: var(--theme-color-9);
  border-radius: 0 12px 12px 0;
  color: var(--theme-color-2);
  font-style: italic;
}

/* Any image inside the content stays inside its column and keeps its ratio. */
.ce-sglblg-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}

.ce-sglblg-content figure {
  margin: 1.5rem 0;
  max-width: 100%;
}

.ce-sglblg-content figure img {
  margin: 0;
}

.ce-sglblg-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #8a94a6;
  text-align: center;
}

.ce-sglblg-content iframe,
.ce-sglblg-content video {
  max-width: 100%;
  border-radius: 12px;
}

/* Entry footer (tags / categories). */
.ce-sglblg-article .entry-footer {
  font-size: 0.85rem;
  color: #8a94a6;
}

.ce-sglblg-article .entry-footer a {
  color: var(--theme-color-2);
  text-decoration: none;
}

.ce-sglblg-article .entry-footer a:hover {
  color: var(--theme-color-3);
}

/* Sidebar ad */
.ce-sglblg-ad-banner {
  position: sticky;
  top: 1rem;
  border-radius: 14px;
  overflow: hidden;
}

.ce-sglblg-ad-banner a {
  display: block;
}

.ce-sglblg-ad-banner img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .ce-sglblg-ad-banner {
    position: static;
    max-width: 360px;
    margin: 2rem auto 0;
  }
}
