/* Progressive Instagram gallery; inherits the site's Outfit type and beauty palette. */
#instagram-feed[hidden] { display: none !important; }

.ig-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
  align-items: start;
}

.ig-card {
  display: block;
  min-width: 0;
  color: var(--beauty-ink, #282329);
  text-decoration: none;
  border-radius: var(--beauty-radius, 14px);
}

.ig-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--beauty-radius, 14px);
  background: var(--beauty-surface, #ECE7EA);
}

.ig-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .65, .25, 1);
}

.ig-open {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--beauty-bg, #F8F7F7);
  color: var(--beauty-ink, #282329);
  font-size: 21px;
  line-height: 1;
}

.ig-open svg { width: 18px; height: 18px; }

.ig-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 12px;
  margin-top: 14px;
  line-height: 1.5;
}

.ig-type {
  color: var(--beauty-accent, #98536B);
  font-size: 12px;
}

.ig-date {
  color: var(--beauty-muted, #6C6168);
  font-size: 11px;
}

.ig-caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.ig-card:focus-visible {
  outline: 3px solid var(--beauty-accent, #98536B);
  outline-offset: 6px;
}

.ig-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 701px) {
  .ig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 28px; }
  .ig-caption { font-size: 16px; }
  .ig-meta { margin-top: 17px; }
  .ig-date { font-size: 12px; }
  .ig-open { right: 14px; bottom: 14px; width: 43px; height: 43px; font-size: 24px; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ig-card:hover .ig-image { transform: scale(1.035); }
}

@media (prefers-reduced-motion: reduce) {
  .ig-image { transition: none; }
}
