/* ── Instagram Feed ──────────────────────────────────────────────────────── */

:root {
  --ig-pink:   #E1306C;
  --ig-orange: #F77737;
  --ig-purple: #833AB4;
  --ig-radius: 12px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.ig-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ig-orange), var(--ig-pink), var(--ig-purple));
  padding: 2.5px;
  flex-shrink: 0;
}

.ig-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ccc center / cover no-repeat;
  border: 2.5px solid white;
}

.profile-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-display-name {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── STATS ── */
.profile-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.stat-label{
  font-weight: 500;
}

/* ── FOLLOW BUTTON ── */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 16px;
  font-weight: 500;
  color: inherit;
  transition: opacity 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.follow-btn:hover { opacity: 0.7; }
.follow-btn svg { color: var(--ig-pink); }

/* ── GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin: 0 auto 1.25rem;
}

@media (max-width: 900px) { .feed-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 680px) { .feed-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .feed-grid { grid-template-columns: repeat(2, 1fr); } }

.post-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--ig-radius);
  overflow: hidden;
  cursor: pointer;
  background: #e8e8e4;
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-card:hover img { transform: scale(1.05); }

.post-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.post-card:hover .post-overlay {
  opacity: 1;
  background: rgba(0,0,0,0.38);
}

.post-stat {
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-stat svg { width: 15px; height: 15px; fill: white; }

.post-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 1rem;
  color: white;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-card.hidden { display: none; }

/* ── LOAD MORE ── */
.load-more-wrap {
  text-align: center;
  margin: 0.5rem auto 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-load-more svg { width: 15px; height: 15px; transition: transform 0.3s; }
.btn-load-more:hover svg { transform: translateY(2px); }
.btn-load-more.hidden { display: none; }

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.view-all-link:hover { opacity: 1; color: var(--ig-pink); }

/* ── LIGHTBOX ── */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-backdrop.open { display: flex; }

.lightbox {
  background: white;
  border-radius: 16px;
  display: flex;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  animation: lb-in 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-image {
  flex: 0 0 54%;
  background: #111;
  position: relative;
}

.lightbox-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.lightbox-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  color: #1a1a1a;
}

.lb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 1rem;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ig-orange), var(--ig-pink));
  padding: 2px;
  flex-shrink: 0;
}

.lb-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ccc center / cover no-repeat;
  border: 2px solid white;
}

.lb-username { font-weight: 500;}

.lb-caption {
  flex: 1;
}

.lb-caption strong { font-weight: 500; margin-right: 6px; }

.lb-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  gap: 16px;
}

.lb-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.lb-stat svg { width: 18px; height: 18px; fill: #c1c1c1; }

.lb-date {
  margin-top: 1rem;
  font-size: 1.4rem;
  color: #666666;
}

.lb-open-link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
  color: #20A0BF;
  border: 1px solid #20A0BF;
  padding: 7px 14px;
  border-radius: 7px;
  transition: background 0.2s;
}

.lb-open-link:hover { background: #20a0bf12; }

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.lb-close svg { width: 14px; height: 14px; fill: white; }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.lb-nav:hover { background: rgba(0,0,0,0.7); }
.lb-nav svg { width: 30px; height: 30px; fill: white; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }

@media (max-width: 620px) {
  .lightbox { flex-direction: column; }
  .lightbox-image { flex: 0 0 260px; }
  .profile-stats { gap: 1.25rem; }
  .follow-btn { margin-left: 0; }
}
