/* Instagram-like post styling tweaks */
.post-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

/* Listas de posts diferenciadas por vista */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-list--nearby .post-card {
  border-radius: 12px;
}

.post-list--profile .post-card {
  border-radius: 16px;
  border-width: 2px;
  border-color: #2D81FF;
}

/* Contenedor de multimedia dentro de las tarjetas de post */
.post-card .post-media {
  margin-top: 8px;
  border-radius: 10px;
  overflow-y: auto; /* Changed to scroll if content exceeds max-height */
  overflow-x: hidden;
  max-height: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Imágenes y videos ajustados al espacio disponible */
.post-card .post-media .media-item {
  width: 100%;
  max-width: 100%;
  max-height: 260px;
  display: block;
  flex-shrink: 0;
}

/* Reglas unificadas para las imágenes de publicaciones */
.post-card .post-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100px;
  max-height: 260px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

/* Reglas para los videos, manteniendo su comportamiento actual */
.post-card .post-media video {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100px;
  max-height: 260px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

/* Zoom / edición visual de media dentro del post */
.post-card .post-media img.media-zoomed,
.post-card .post-media video.media-zoomed {
  max-height: none;
  height: auto;
  border-radius: 0;
}

/* Botón de edición de media en el footer */
.post-footer { display:flex; gap:8px; margin-top:8px; }
.post-footer button { background:none; border:none; cursor:pointer; padding:6px; border-radius:6px; }
.post-footer .post-edit-media-btn {
  font-size: 13px;
  font-weight: 500;
}