/* --------------------------------------------------------------------------
   Horizontal portrait strip — 5 equal cards
   -------------------------------------------------------------------------- */

.igembed-strip {
  width: 100%;
  margin: 0 auto 24px;
  overflow: hidden;
}

.igembed-strip__viewport {
  width: 100%;
  overflow: hidden;
}

.igembed-strip__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  align-items: stretch;
}

.igembed-strip__card {
  position: relative;
  /* JS sets exact px width so 5 fit the viewport equally */
  flex: 0 0 20%;
  width: 20%;
  display: block;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  background: #1a1a1a;
  box-sizing: border-box;
}

.igembed-strip__media {
  position: relative;
  display: block;
  width: 100%;
  /* Same height/width ratio for every post type */
  aspect-ratio: 4 / 5;
  height: auto;
  overflow: hidden;
  background: #111;
}

.igembed-strip__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Fallback cropped embed — forced into same box */
.igembed-strip__media iframe {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 540px;
  height: 900px;
  max-width: none;
  border: 0;
  pointer-events: none;
}

.igembed-strip__play {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

.igembed-strip__play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #222;
}

/* Hover: likes + description */
.igembed-strip__hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  box-sizing: border-box;
  text-align: center;
}

.igembed-strip__card:hover .igembed-strip__hover,
.igembed-strip__card:focus .igembed-strip__hover {
  opacity: 1;
}

.igembed-strip__hover-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90%;
}

.igembed-strip__likes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.igembed-strip__heart {
  font-size: 16px;
  line-height: 1;
}

.igembed-strip__heart::before {
  content: '♥';
}

.igembed-strip__desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  font-weight: 400;
}

@media (max-width: 768px) {
  .igembed-strip__desc {
    -webkit-line-clamp: 3;
    font-size: 12px;
  }
}
