/* ------------------------------------------------------------------
   China Media Insights — site overrides on top of hugo-theme-cleanwhite
   ------------------------------------------------------------------ */

/* Post list meta */
.post-preview > .post-meta > a,
.post-preview > .post-meta {
  font-size: 15px;
}

/* ---------- Work info box (book / film / TV) ----------
   Rendered by layouts/_default/partials/work-info.html as a <dl>, not a
   <table>: the theme's JS adds Bootstrap's .table class (with !important
   borders) to every <table>, which is what produced the old gridlines. */
.work-box {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0 1rem;
}

.work-cover {
  width: 150px;
  height: auto;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.work-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.2rem;
  row-gap: 0.35rem;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.work-info dt {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.work-info dd {
  margin: 0;
}

/* Belt and braces: if a <table> is ever used inside the box, no gridlines. */
.work-box table,
.work-box .table td,
.work-box .table th {
  border: 0 !important;
  background: transparent !important;
}

/* ---------- Article readability ---------- */
.post-container blockquote {
  font-size: inherit;
  color: #555;
  border-left: 3px solid #ccc;
  margin: 1.5em 0;
  padding: 0.2em 1.2em;
}

.post-container blockquote p {
  margin: 0.4em 0;
}

.post-container .footnotes {
  font-size: 14px;
  color: #666;
}

.post-container figure {
  margin: 2em 0;
}

.post-container figure img {
  max-width: 100%;
  height: auto;
}

.post-container figcaption {
  font-size: 14px;
  color: #777;
  text-align: center;
  margin-top: 0.5em;
}

/* ---------- Mobile ---------- */
@media screen and (max-width: 768px) {
  .work-box {
    flex-direction: column;
    gap: 1.2rem;
  }

  .work-cover {
    width: 130px;
  }

  .work-info {
    font-size: 14px;
    column-gap: 0.8rem;
  }

  .work-info dt {
    white-space: normal;
  }
}


/* Post list: cover image on the right of each preview (partial post_list.html) */
.post-preview.has-cover {
  position: relative;
  padding-right: 120px;       /* room for the cover */
  min-height: 165px;
}
.post-preview .post-preview-cover {
  position: absolute;
  right: 0;
  top: 4px;                   /* level with the title (its top margin collapses outside the box) */
}
.post-preview .post-preview-cover img {
  display: block;
  width: 96px;
  height: auto;
  max-height: 150px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
@media (max-width: 767px) {
  .post-preview.has-cover { padding-right: 84px; min-height: 140px; }
  .post-preview .post-preview-cover { top: 4px; }
  .post-preview .post-preview-cover img { width: 70px; max-height: 110px; }
}
