/*
 * IA Social Feed – neutral base style.
 *
 * Deliberately plain: a site gives the cards its own look by setting the custom
 * properties below on .iasf-feed (or any ancestor) in the site stylesheet, e.g.
 *
 *   .iasf-feed { --iasf-accent: #815374; --iasf-radius: 0; --iasf-font-heading: Rajdhani, sans-serif; }
 *
 * The number of columns comes from the shortcode (columns="3") as --iasf-columns.
 */
.iasf-feed {
  --iasf-accent: #2b5d8a;
  --iasf-card-bg: #fff;
  --iasf-text: #333;
  --iasf-muted: #666;
  --iasf-radius: 6px;
  --iasf-gap: 24px;
  --iasf-ratio: 4 / 5;
  --iasf-font-heading: inherit;
  display: grid;
  grid-template-columns: repeat(var(--iasf-columns, 3), minmax(0, 1fr));
  gap: var(--iasf-gap);
}
.iasf-feed:empty { display: none; }

@media (max-width: 1024px) {
  .iasf-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .iasf-feed { grid-template-columns: minmax(0, 1fr); }
}

.iasf-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--iasf-card-bg); color: var(--iasf-text);
  border-radius: var(--iasf-radius); box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.iasf-media {
  display: block; position: relative; width: 100%; height: auto;
  /* flex: none keeps every picture the same height, however long the text below it is. */
  flex: none; aspect-ratio: var(--iasf-ratio); object-fit: cover; background: #eee; border-radius: 0;
}
.iasf-media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
video.iasf-media { background: #000; }

/* Video that is not on our server: cover image with a play button that links to the network. */
.iasf-play__icon {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--iasf-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.iasf-play__icon::after {
  content: ""; position: absolute; left: 26px; top: 20px;
  border-style: solid; border-width: 12px 0 12px 18px;
  border-color: transparent transparent transparent #fff;
}

.iasf-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; }
.iasf-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0;
  font-size: 14px; line-height: 1.3; color: var(--iasf-muted);
}
.iasf-network {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--iasf-font-heading); font-weight: 600; color: var(--iasf-accent);
}
.iasf-icon { flex: none; }
.iasf-meta time { white-space: nowrap; }
.iasf-text {
  margin: 0; font-size: 15px; line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
}
/* A post without a picture may use the room the picture would have taken. */
.iasf-card--text .iasf-text { -webkit-line-clamp: 14; }
.iasf-link {
  margin-top: auto; align-self: flex-start; font-size: 16px; line-height: 1.3;
  font-family: var(--iasf-font-heading); font-weight: 600; color: var(--iasf-accent); text-decoration: none;
}
.iasf-link:hover, .iasf-link:focus-visible { text-decoration: underline; }
