/* ═══════════════════════════════════════
   INSTAGRAM BAR — Theology Matters ME
   ═══════════════════════════════════════ */

.instagram-bar {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

/* Hide extra photos beyond 5 at default desktop width */
.instagram-bar__item:nth-child(n+6) {
  display: none;
}

/* ── Photo tiles — aspect-ratio so tiles scale proportionally ── */
.instagram-bar__item {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1;
  min-width: 0;
}

.instagram-bar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.instagram-bar__item:hover .instagram-bar__img {
  transform: scale(1.06);
  filter: brightness(0.82);
}

.instagram-bar__item:focus-visible {
  outline: 2px solid var(--tmme-ink);
  outline-offset: -2px;
}

/* ── Branded panel — uses aspect-ratio:1/1 so it matches tiles ── */
.instagram-bar__brand {
  aspect-ratio: 1 / 1;
  background: #c4a98e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
  min-width: 0;
}

.instagram-bar__brand:hover {
  background: #b8997e;
}

.instagram-bar__brand-icon {
  width: 28px;
  height: 28px;
  color: #ffffff;
  flex-shrink: 0;
}

.instagram-bar__brand-handle {
  font-family: var(--tmme-font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-align: center;
}

/* 7 photos + brand at ≥1400px */
@media (min-width: 1400px) {
  .instagram-bar { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .instagram-bar__item:nth-child(n+6) { display: block; }
  .instagram-bar__item:nth-child(n+8) { display: none; }
}

/* 9 photos + brand at ≥1700px */
@media (min-width: 1700px) {
  .instagram-bar { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .instagram-bar__item:nth-child(n+8) { display: block; }
  .instagram-bar__item:nth-child(n+10) { display: none; }
}

/* All 11 photos + brand at ≥1920px */
@media (min-width: 1920px) {
  .instagram-bar { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .instagram-bar__item:nth-child(n+10) { display: block; }
}

@media (max-width: 800px) {
  /* Show 2 photos + brand panel in a single row */
  .instagram-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instagram-bar__item:nth-child(n+3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .instagram-bar__img { transition: none; }
  .instagram-bar__brand { transition: none; }
}
