/* Zibll renders standard article list entries as <posts class="posts-item">.
   Frame only their cover containers, never the text or outer card.
   An overlay preserves the theme's padding-based image aspect ratio. */
posts.posts-item.card > .item-thumbnail,
posts.posts-item.list > .post-graphic > .item-thumbnail,
html body.single-post.fyk-course-page .fyk-course-detail-cover,
html body.single-post #posts-pay .pay-thumb > .graphic {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Existing site customization uses ::after for a moving shine and hides it.
   Reserve ::before for a stationary frame so both rules remain independent. */
html body posts.posts-item.card > .item-thumbnail::before,
html body posts.posts-item.list > .post-graphic > .item-thumbnail::before,
html body.single-post.fyk-course-page .fyk-course-detail-cover::before,
html body.single-post #posts-pay .pay-thumb > .graphic::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  z-index: 9 !important;
  box-sizing: border-box !important;
  border: 3px solid #e8c522 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: inset 0 0 0 1px #fff3a6 !important;
  opacity: 1 !important;
  transform: none !important;
  translate: none !important;
  animation: none !important;
  transition: none !important;
  pointer-events: none !important;
}

/* Detail cover: halve the desktop image column (42% -> 21%). */
@media (min-width: 768px) {
  html body.single-post.fyk-course-page .fyk-course-detail-hero {
    grid-template-columns: minmax(0, 21%) minmax(0, 1fr) !important;
  }
}

@media (max-width: 767px) {
  html body.single-post.fyk-course-page .fyk-course-detail-cover {
    width: 50% !important;
    justify-self: center;
  }
}

/* The hero already shows the cover; omit the duplicate in the purchase box. */
html body.single-post.fyk-course-page #posts-pay .pay-thumb {
  display: none !important;
}

/* Keep the title and description above a single purchase-action row. */
html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > .flex-auto-h,
html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > .flex1 {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  justify-content: normal !important;
  gap: 6px 16px;
  width: 100%;
  min-width: 0;
}

html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > :is(.flex-auto-h, .flex1) > * {
  grid-column: 1 / -1;
}

html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > :is(.flex-auto-h, .flex1) > :nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}

html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > :is(.flex-auto-h, .flex1) > :nth-child(4):not(:last-child) {
  grid-column: 2;
  grid-row: 3;
}

html body.single-post.fyk-course-page #posts-pay.order-type-2 .pay-flexbox > :is(.flex-auto-h, .flex1) > .text-right:last-child {
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  margin-top: 0 !important;
}

/* Leave a dedicated row below the paid-resource badge. */
html body.single-post #posts-pay.pay-box > .pay-flexbox {
  padding-top: 28px !important;
}

/* The blue hover stripe belongs to the outer article, not its thumbnail. */
html body #forum posts.posts-item.list::before,
html body #forum posts.posts-item.card::before,
html body main posts.posts-item.list::before,
html body main posts.posts-item.card::before {
  content: none !important;
  display: none !important;
}

/* Reversible cover sheen. The explicit course selectors outrank the site's
   existing !important animation, translate and display overrides. */
html body posts.posts-item.card > .item-thumbnail::after,
html body posts.posts-item.list > .post-graphic > .item-thumbnail::after,
html body.home.white-theme.page-template-forums #forum .fyk-inline-feed__course-list > posts.posts-item.list.fyk-course-card .item-thumbnail::after,
html body:is(.blog, .search, .category).white-theme main posts.posts-item.list.fyk-course-card .item-thumbnail::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  z-index: 8 !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%) !important;
  opacity: 1 !important;
  translate: none !important;
  transform: translateX(-120%) !important;
  animation: none !important;
  transition: transform .7s ease !important;
  pointer-events: none !important;
}

html body posts.posts-item.card:hover > .item-thumbnail::after,
html body posts.posts-item.list:hover > .post-graphic > .item-thumbnail::after,
html body.home.white-theme.page-template-forums #forum .fyk-inline-feed__course-list > posts.posts-item.list.fyk-course-card:hover .item-thumbnail::after,
html body:is(.blog, .search, .category).white-theme main posts.posts-item.list.fyk-course-card:hover .item-thumbnail::after {
  transform: translateX(120%) !important;
  animation: none !important;
}

