/* ============================================================
   SAZA PERU - instagram-popup.css
   Popup estilo Instagram Desktop para el grid de Instagram del inicio.
   Aditivo: el HTML original dejaba el grid como placeholder sin popup.
   Mantiene la paleta y tipografía del theme.
   ============================================================ */

.instagram-grid__item {
  cursor: pointer;
}

.instagram-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.instagram-grid__item:hover img {
  transform: scale(1.05);
}

/* Overlay */
.ig-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.ig-popup-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.ig-popup {
  background: #fff;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
  position: relative;
}

.ig-popup__media {
  background: var(--color-section-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-popup__media img {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: cover;
}

.ig-popup__side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ig-popup__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgb(var(--color-base-border));
}

.ig-popup__avatar {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: rgb(var(--color-base-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ig-popup__user {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgb(var(--color-base-accent-dark));
}

.ig-popup__body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 1.4rem;
  line-height: 1.7;
  color: rgba(var(--color-base-text), 0.85);
}

.ig-popup__date {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgb(var(--color-base-border));
  font-size: 1.2rem;
  color: rgba(var(--color-base-text), 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.ig-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: rgb(var(--color-base-accent-dark));
  z-index: 2;
}

@media screen and (max-width: 750px) {
  .ig-popup {
    grid-template-columns: 1fr;
    max-height: 88vh;
    overflow-y: auto;
  }
  .ig-popup__media img { max-height: 45vh; }
}
