/* CIS Social Feed. Inherits the theme's font and link colour; override the
   --cisf-* values in the theme's custom CSS to retune for another site. */
.cisf {
  --cisf-card: #fff;
  --cisf-ink: inherit;
  --cisf-soft: #6b7780;
  --cisf-link: var(--color-content-link, #2f83a9);
  --cisf-radius: 3px;
  --cisf-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  --cisf-ground: #10181c;
  display: flex; flex-direction: column; gap: 22px;
}
.cisf-post[hidden] { display: none; }
.cisf-post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px;
  background: var(--cisf-card); border-radius: var(--cisf-radius); box-shadow: var(--cisf-shadow); padding: 12px; }
.cisf-post.cisf-textonly { grid-template-columns: 1fr; }
.cisf-media { position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0; background: #eef1f3;
  cursor: zoom-in; overflow: hidden; align-self: start; line-height: 0; }
.cisf-media img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; transition: opacity .2s ease; }
.cisf-media:hover img, .cisf-media:focus-visible img { opacity: .9; }
.cisf-media:focus-visible { outline: 3px solid var(--cisf-link); outline-offset: 2px; }
.cisf-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.cisf-play::after { content: ''; position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff; }
.cisf-count { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6);
  color: #fff; font-size: .85rem; font-weight: 700; line-height: 1.4; }
.cisf-body { min-width: 0; }
.cisf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cisf-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.cisf-name { display: block; font-weight: 700; color: var(--cisf-link); line-height: 1.3; }
.cisf-when { display: block; font-size: .8rem; color: var(--cisf-soft); line-height: 1.3; }
.cisf-text { color: var(--cisf-ink); line-height: 1.55; overflow-wrap: anywhere; }
.cisf-text.cisf-clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.cisf-text a, .cisf-link { color: var(--cisf-link); }
.cisf-tag { color: var(--cisf-link); }
.cisf-seemore { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--cisf-link); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cisf-seemore[hidden] { display: none; }
.cisf-link { display: block; margin-top: 10px; font-weight: 600; }
.cisf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 4px; }
.cisf-loadmore, .cisf-follow { display: inline-block; padding: 11px 26px; border-radius: 4px; font: inherit; font-weight: 700;
  line-height: 1.3; text-decoration: none; cursor: pointer; }
.cisf-loadmore { border: 2px solid var(--cisf-link); background: transparent; color: var(--cisf-link); }
.cisf-loadmore:hover { background: var(--cisf-link); color: #fff; }
.cisf-follow { border: 2px solid var(--cisf-link); background: var(--cisf-link); color: #fff !important; }
.cisf-follow:hover { opacity: .9; }
@media (max-width: 640px) {
  .cisf-post { grid-template-columns: 1fr; }
}

/* lightbox */
html.cisf-open { overflow: hidden; }
.cisf-lb { border: 0; padding: 0; margin: 0; background: transparent; width: 100%; height: 100%; max-width: none; max-height: none;
  overflow: visible; color: #1f2a2e; font: inherit; }
.cisf-lb[open] { display: flex; align-items: center; justify-content: center; }
.cisf-lb::backdrop { background: rgba(8, 14, 18, .88); }
.cisf-lb-box { display: grid; grid-template-columns: minmax(0, 1fr) 340px; width: min(1060px, calc(100vw - 150px));
  height: min(700px, calc(100dvh - 80px)); background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.cisf-lb-media { position: relative; background: var(--cisf-ground, #10181c); display: flex; align-items: center; justify-content: center; min-height: 0; }
.cisf-lb-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cisf-lb-stage img, .cisf-lb-stage video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cisf-lb-stage video { width: 100%; height: 100%; background: #000; }
.cisf-lb-out { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; text-align: center; padding: 24px; }
.cisf-lb-out a { color: #fff; font-weight: 700; padding: 10px 22px; border: 2px solid #fff; border-radius: 4px; text-decoration: none; }
.cisf-lb-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.cisf-lb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.cisf-lb-dots i.on { background: #fff; }
.cisf-lb-side { display: flex; flex-direction: column; min-height: 0; padding: 20px 22px; border-left: 1px solid #e3e8eb; }
.cisf-lb-side .cisf-head { padding-bottom: 12px; border-bottom: 1px solid #e3e8eb; }
.cisf-lb-text { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; line-height: 1.55; padding-right: 4px; margin-top: 12px; }
.cisf-lb-text a, .cisf-lb-text .cisf-tag { color: var(--cisf-link, #2f83a9); }
.cisf-lb-btn { position: fixed; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 12px; background: #fff;
  color: #11293c; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; }
.cisf-lb-btn svg { width: 100%; height: 100%; }
.cisf-lb-btn[hidden] { display: none; }
.cisf-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.cisf-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.cisf-lb-close { right: 18px; top: 18px; }
.cisf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
  .cisf-lb-box { grid-template-columns: 1fr; grid-template-rows: minmax(0, 62%) minmax(0, 38%); width: 100vw; height: 100dvh; border-radius: 0; }
  .cisf-lb-side { border-left: 0; border-top: 1px solid #e3e8eb; padding: 14px 18px 18px; }
  .cisf-lb-btn { width: 40px; height: 40px; padding: 10px; background: rgba(255, 255, 255, .92); }
  .cisf-lb-prev, .cisf-lb-next { top: 31%; }
  .cisf-lb-prev { left: 8px; } .cisf-lb-next { right: 8px; }
  .cisf-lb-close { top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .cisf-media img { transition: none; } }
