/* TC Instagram Feed: same fonts, orange and button style as the bio section */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;700&display=swap');

.tc-ig{
  --tc-ig-orange: #C04F15;
  --tc-ig-ink: #1a1a1a;
  --tc-ig-muted: #6b6b6b;
  --tc-ig-gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
  font-family: 'Barlow', sans-serif;
  color: var(--tc-ig-ink);
}

.tc-ig *,
.tc-ig *::before,
.tc-ig *::after{ box-sizing: border-box; }

/* ---------- Heading ---------- */
.tc-ig-head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 28px;
}

.tc-ig-title{
  margin: 0;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: var(--tc-ig-ink);
}

.tc-ig-handle{
  font-size: 1.1rem;
  color: var(--tc-ig-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.tc-ig-handle:hover,
.tc-ig-handle:focus-visible{
  color: var(--tc-ig-orange);
}

/* ---------- Grid ---------- */
.tc-ig-grid{
  display: grid;
  grid-template-columns: repeat(var(--tc-ig-cols, 3), minmax(0, 1fr));
  gap: var(--tc-ig-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-ig-cell{
  margin: 0;
  padding: 0;
}

.tc-ig-cell::before{ content: none; } /* some themes add list bullets this way */

.tc-ig-item{
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #eeeeee;
  text-decoration: none;
}

.tc-ig--portrait .tc-ig-item{
  aspect-ratio: 4 / 5;
}

.tc-ig-item img{
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Orange multiply overlay, as on the bio photo */
.tc-ig-item::after{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tc-ig-orange);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tc-ig-item:hover::after,
.tc-ig-item:focus-visible::after{
  opacity: 0.6;
}

.tc-ig-item:hover img{
  transform: scale(1.04);
}

.tc-ig-item:focus-visible{
  outline: 2px solid var(--tc-ig-orange);
  outline-offset: 3px;
}

/* Caption fades in over the overlay */
.tc-ig-caption{
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 18px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tc-ig-item:hover .tc-ig-caption,
.tc-ig-item:focus-visible .tc-ig-caption{
  opacity: 1;
  transform: none;
}

/* Video / carousel marker */
.tc-ig-badge{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 22px;
  height: 22px;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.tc-ig-badge svg{
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Follow button (same as "Read full bio") ---------- */
.tc-ig-btn{
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
  padding: 14px 24px;
  border: 1px solid var(--tc-ig-ink);
  background: transparent;
  color: var(--tc-ig-ink);
  font-family: 'Barlow', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tc-ig-btn:hover,
.tc-ig-btn:focus-visible{
  color: #ffffff;
  border-color: var(--tc-ig-orange);
  background: var(--tc-ig-orange);
}

.tc-ig-btn .arrow{
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.25s ease;
}

.tc-ig-btn:hover .arrow,
.tc-ig-btn:focus-visible .arrow{
  transform: translateX(6px);
}

.tc-ig-btn .arrow::after{
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.tc-ig-notice{
  padding: 12px 16px;
  border-left: 3px solid var(--tc-ig-orange, #C04F15);
  background: #faf6f3;
  font-family: 'Barlow', sans-serif;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .tc-ig-title{ font-size: 3rem; }
  .tc-ig-grid{ grid-template-columns: repeat(min(var(--tc-ig-cols, 3), 3), minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .tc-ig{ --tc-ig-gap: 6px; }
  .tc-ig-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-ig-caption{ display: none; } /* no hover on phones */
  /* An odd number of posts would leave a gap in 2 columns: hide the last one */
  .tc-ig-cell:last-child:nth-child(odd){ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .tc-ig-item img,
  .tc-ig-item::after,
  .tc-ig-caption,
  .tc-ig-btn,
  .tc-ig-btn .arrow{ transition: none; }
  .tc-ig-item:hover img{ transform: none; }
}
